Greetings, and thanks in advance for any advice you have!
While learning Sonic Pi, I’ve been asking friends to name songs that I could then try to imitate. One of them asked for “Seven Nation Army” by The White Stripes.
Here’s what I came up with (at the bottom of this post).
Question: Is this how you’d structure the cue/sync commands? Something feels a bit awkward about what I did, but I kind of think this is the best we can do. (I know Sonic Pi is built for live coding, not hard-coding songs, but still…)
Another side question: my bass doesn’t sound dampened like the bass in the song. If I play around enough, I should be able to mimic virtually any musical sound with Sonic Pi, right?
Okay, here’s my code:
================
## My rendition of White Stripes, Seven Nation Army
live_loop :bl, sync: :bassline do
2.times do
2.times do
with_fx :reverb, room: 0.9, damp: 0.5 do
sample :bass_thick_c, attack: 0.02, rpitch: 4.5, decay: rand(0.1..0.2), sustain: rand(0.25..0.35), pitch_dis: 0.01, release: 0.5
sleep 0.75
sample :bass_thick_c, rpitch: 4.5, sustain: 0.15
sleep 0.25
sample :bass_thick_c, rpitch: 7.5, sustain: 0.15
sleep 0.33
sample :bass_thick_c, rpitch: 4.5, sustain: 0.15
sleep 0.33
sample :bass_thick_c, rpitch: 2, sustain: 0.2
sleep 0.33
sample :bass_thick_c, attack: 0.02, rpitch: 0.5, decay: rand(0.1..0.2), sustain: rand(0.45..0.55), pitch_dis: 0.01, release: 0.3
sleep 1
sample :bass_thick_c, attack: 0.02, rpitch: -0.5, decay: rand(0.1..0.2), sustain: rand(0.45..0.55), release: 0.3
sleep 1
end
end
cue :bassdrum
end
cue :snare
end
live_loop :bd, sync: :bassdrum do
loop do
sample :drum_bass_hard, amp: rand(0.9..1.2)
sleep 0.5
end
end
in_thread do
sync :snare
loop do
sleep 0.5
sample :drum_snare_soft, amp: 1.5
sleep 0.5
end
end
in_thread do
cue :bassline
end