I’d like to try another version which is just drums and using a Ruby grid of 2x 32 bar phrases in 4/4 time, allocate kick and snare to this sequence in a jazzy fashion, ie a bit of swing. Can you try this please?
use_bpm 120
# Define a swing function
define :swing_sleep do |base_sleep, swing_factor|
sleep base_sleep * (1 + swing_factor)
sleep base_sleep * (1 - swing_factor)
end
# Kick pattern - a grid of 32 steps (1 = kick hit, 0 = rest)
kick_pattern = [
1, 0, 0, 0, 1, 0, 0, 1,
1, 0, 0, 0, 0, 1, 0, 0,
1, 0, 1, 0, 0, 0, 1, 0,
0, 1, 0, 0, 1, 0, 0, 0
]
# Snare pattern - another grid of 32 steps
snare_pattern = [
0, 0, 1, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0, 1, 0,
0, 0, 0, 1, 0, 0, 1, 0,
0, 0, 1, 0, 0, 1, 0, 0
]
# Swing factor for the jazzy feel (adjust this for more/less swing)
swing_factor = 0.15
# Base sleep duration (adjust for tempo)
base_sleep = 0.25 # This gives a quarter-note swing feel
live_loop :drums do
32.times do |i|
# Kick drum
if kick_pattern[i] == 1
sample :bd_haus, amp: 2
end
# Snare drum
if snare_pattern[i] == 1
sample :sn_generic, amp: 1.5
end
# Swing sleep
swing_sleep base_sleep, swing_factor
end
end
I haven’t got my head round these grids yet, is v impressive to me. Thanks for sharing this.
PS the explanations afterwards are very helpful.