Skip to content

Instantly share code, notes, and snippets.

--- subharmonic pitch source
magic = 1/math.log(2)
function init()
output[1].volts = 0
metro[1].time = 1.0
metro[1].event = next_step
metro[1]:start()
--input[1].mode( 'stream', 0.002)
--- subharmonic pitch source
magic = 1/math.log(2)
function init()
output[1].volts = 0
metro[1].time = 1.0
metro[1].event = next_step
metro[1]:start()
--input[1].mode( 'stream', 0.002)
--- timeline sequencer
-- aka 'function tracker'
-- out1: pitch
-- out2: volume
-- out3: filter cf
scale = {0,6,11,-12,-1,4,0,0,7,6,4,1}
scaleIX = 1
function next_note()
--- emulating a small subset of Cold Mac
-- bank of functions
-- args: input
-- output: transformed version of input
last_integral = 0
last_input = 0
function clamp(v,min,max)
return math.max( math.min(v,max), min )
end
--- emulating Three Sisters' SPAN control
-- input 1 == frequency
-- input 2 == span
-- output (1,2,3) == low, centre, high
function init()
input[1].mode( 'stream', 0.01 )
for i=1,3 do output[i].slew = 0.01 end
--- just friends poly sequencer
function init()
metro[1].event = n
metro[1].time = 0.2
metro[1]:start()
metro[2].event = n2
metro[2].time = 0.21
metro[2]:start()
--- timeline sequencer
-- aka 'function tracker'
-- WARNING. NON FUNCTIONAL
line = 1 -- this makes it start at line 1!
function timeline_step(count)
if count == 1 then
print'1'
return
function init()
-- start stuff
input[2].mode( 'change' )
--output[1]( macroseq(0.3) )
--output[2]( lfo(0.4) )
--output[3]( lfo(2) )
output[3].scale{ 0,3,7,10 }
output[3]( zoom() )
TARGET = without
WRLIB=submodules/wrLib
WRDSP=submodules/wrDsp
LUAS=submodules/lua
CC = gcc
LD = gcc
SRC = main.c \
--- druid.lua
-- a tiny shell for crow
local keycodes = include("druid/lib/keycodes")
local word = ""
local prompt = "> "
local console = {}
local CONSOLE_LEN = 6
local hist = {}