hi @GWB70
i propose that way
bd_01 = (ring 1,0,0,0, 0,0,0,0, 1,0,0,1, 0,0,1,0) + (ring 1,0,0,0, 0,0,0,0, 1,0,1,1, 0,0,2,0)
sn_01 = (ring 0,0,0,0, 1,0,0,0, 0,0,0,0, 1,0,0,0)
hh_01 = (ring 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1)
live_loop :drums_01 do
16.times do
sample :bd_808, amp: bd_01.tick('bd')
sample :sn_generic, amp: sn_01.tick('sn')
sample :drum_cymbal_closed, amp: hh_01.tick('hh')
sleep 0.25
end
end
- you can easily read the all pattern in just a sight.
- you can play on the intensity of each step (0 to 4,5 6 as you want but take care not to saturate)
- you can change easily the sample using the auto completion from the editor rather using an array in which you don’t have the sonic pi instruments suggested.
Then we can go further and introduce a method not to repeat ourselves
# pattern 01
bd_01 = (ring 1,0,0,0, 0,0,0,0, 1,0,0,1, 0,0,1,0) + (ring 1,0,0,0, 0,0,0,0, 1,0,1,1, 0,0,2,0)
sn_01 = (ring 0,0,0,0, 1,0,0,0, 0,0,0,0, 1,0,0,0)
hh_01 = (ring 0,0,1,0, 0,0,1,0, 0,0,1,0, 0,0,1,0)
# pattern 02
bd_02 = (ring 1,0,0,0, 0,0,1,0, 0,0,1,0, 0,0,1,0)
sn_02 = (ring 0,0,0,0, 1,0,0,0, 0,0,0,0, 1.5,1,1,1)
hh_02 = (ring 0,2,1,0, 0,0,1,0) * 2
define :seq do |bd_ring, sn_ring, hh_ring|
16.times do
sample :bd_fat, amp: bd_ring.tick('bd'), cutoff: 50
sample :drum_snare_hard, amp: sn_ring.tick('sn')
sample :drum_cymbal_closed, amp: hh_ring.tick('hh'), cutoff: 110
sleep 0.25
end
end
at [0, 4, 8, 16, 20, 24 ] do
seq bd_01, sn_01, hh_01
end
at [12, 16+12] do
seq bd_02, sn_02, hh_02
end
you can keep on using the live_loop
# pattern 01
bd_01 = (ring 1,0,0,0, 0,0,0,0, 1,0,0,1, 0,0,1,0) + (ring 1,0,0,0, 0,0,0,0, 1,0,1,1, 0,0,2,0)
sn_01 = (ring 0,0,0,0, 1,0,0,0, 0,0,0,0, 1,0,0,0)
hh_01 = (ring 0,0,1,0, 0,0,1,0, 0,0,1,0, 0,0,1,0)
# pattern 02
bd_02 = (ring 1,0,0,0, 0,0,1,0, 0,0,1,0, 0,0,1,0)
sn_02 = (ring 0,0,0,0, 1,0,0,0, 0,0,0,0, 1.5,1,1,1)
hh_02 = (ring 0,2,1,0, 0,0,1,0) * 2
define :seq do |bd_ring, sn_ring, hh_ring|
16.times do
sample :bd_fat, amp: bd_ring.tick('bd'), cutoff: 50
sample :drum_snare_hard, amp: sn_ring.tick('sn')
sample :drum_cymbal_closed, amp: hh_ring.tick('hh'), cutoff: 110
sleep 0.25
end
end
live_loop :drums do
3.times do
seq bd_01, sn_01, hh_01
end
seq bd_02, sn_02, hh_02
end
And change the sample used into the seq method.
Hope it helps
Good coding !