Skip to content

Instantly share code, notes, and snippets.

@trentgill
Created April 30, 2020 22:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save trentgill/5fe4ab12bdf6b6b7777687fd5394a5ff to your computer and use it in GitHub Desktop.
Save trentgill/5fe4ab12bdf6b6b7777687fd5394a5ff to your computer and use it in GitHub Desktop.
--- 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()
output[2].action = ar(0.01,2.5)
end
lydian = {0,2,4,6,7,9,11}
penta = {0,2,4,7,9}
penta2 = {2,4,6,9,11}
scale_ix = 1
scale_ix2 = 1
scale = lydian
level = 3
function n()
for n=1,2 do
scale_ix = (scale_ix + 3) % #penta +1
local note = penta[scale_ix]/12
ii.jf.play_voice( n, note, level )
end
end
function n2()
for n=1,3 do
scale_ix2 = (scale_ix2 + 1) % #penta2 +1
local note2 = penta2[scale_ix2]/12
ii.jf.play_voice( n+2, note2, level )
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment