Permutation of 4 note timing = Beatnik


#1
# BongoRythmns
# 7 Dec 2018
# use the tabla samples
# take 4 not combinations and permutate them to derive rythmn patterns
# play the bongos in the rythmn patterns

tabla= sample_names(:tabla)
tabla=tabla.slice(9,tabla.length)

#use_bpm 90
t1=[0.25,0.25,0.25,0.25]
t2=[0.125,0.25,0.25,0.25]
t2a=t2.permutation.to_a
t3=[0.125,0.125,0.125,0.25]
t3a=t3.permutation.to_a
t4=t2a+t3a
t4=t4.push(t1)
puts t4.length,t4

live_loop :foo do
  j=tick
  sample(tabla[j],amp:0.8)
  k=((j/4).floor)%49
  t5=t4[k]
  puts k,j,t5
  t5=t5.ring
  sleep t5[j]
end


#2

Very neat. Useful use of .permutate and .floor methods