Skip to content

Instantly share code, notes, and snippets.

@zunaito
Last active April 28, 2020 12:56
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zunaito/ccbd5ef89e445ba8540f675457af5308 to your computer and use it in GitHub Desktop.
Save zunaito/ccbd5ef89e445ba8540f675457af5308 to your computer and use it in GitHub Desktop.
seq for 3sis using asl functions + freq modulation
--- HOJE by @glia based on TONIGHT by @jlmitch5
-- output 1 > 3sis CENTRE inlet
-- output 2 > FREQ inlet
-- output 3 > HIGH inlet
-- (optional) connect LOW outlet to FM inlet + output ALL
seq = { 0, 4, 5, 7, 9, 2, 4, 7, 0 }
step = 2
switch = 1
a = math.random(2,8)
b = math.random(3,10)
c = math.random(1,6)
level = 10
time = 2.2
function init()
output[1]( loop { rtm
, to(function() return level/a end, function() return time/b end)
, rtm
, to(function() return -level/c end, function() return time/a end)
, rtm
, to(function() return -level/b end, function() return time/c end)
, rtm
, to(function() return -level/a end, function() return time/b end)
} )
output[3]( loop { rtm
, to(function() return level/a end, function() return time/b end)
, rtm
, to(function() return -level/c end, function() return time/c end)
} )
end
function rtm()
output[2].volts = seq[step]/12
output[2].slew = math.random(0,3)/100
step = ((step + math.random(0, 2)) % #seq) + 1
if step == 1 then
switch = (switch + 1) % 2
if switch == 1 then
a = math.random(2,8)
b = math.random(3,10)
c = math.random(1,6)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment