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1, 1, 1, 0, 1, 0, 0],
[1, 1, 1, 1, 0, 1, 0, 1],
[1, 1, 1, 1, 0, 1, 1, 0],
[1, 1, 1, 1, 0, 1, 1, 1],
[1, 1, 1, 1, 1, 0, 0, 0],
[1, 1, 1, 1, 1, 0, 0, 1],
[1, 1, 1, 1, 1, 0, 1, 0],
[1, 1, 1, 1, 1, 0, 1, 1],
[1, 1, 1, 1, 1, 1, 0, 0],
[1, 1, 1, 1, 1, 1, 0, 1],
[1, 1, 1, 1, 1, 1, 1, 0],
[1, 1, 1, 1, 1, 1, 1, 1]]
BD = [1, 0, 1, 0, 1, 0, 1, 0]
#(255.downto(2)).each do |i|
32.times do
tick
sample :drum_snare_soft,amp:1 if SN_all[67].look == 1
sample :drum_bass_soft,amp:1 if BD.look == 1
sample :drum_cymbal_open,amp:0.2
sleep 0.5
end
#end
All 8 beat patterns are generated by python code:
>>> r = itertools.product([0,1],repeat = 8)
>>> for s in r:
print(list(s))