To learn Sonic Pi (and music making in general), I’m trying to translate some of my favorite music. Here’s what I’ve done with the chords from “Olson” by Boards of Canada:
# Boards of Canada OLSON chords use_bpm 30 live_loop "chords" do with_synth :dpulse do play (chord :e3, :major), sustain: 1, amp: 0.7 play :e2, sustain: 1, amp: 0.7 sleep 1.5 play (chord :fs3, :major), sustain: 0.5, amp: 0.7 play :fs2, sustain: 0.5, amp: 0.7 sleep 0.5 play (chord :cs3, :major), sustain: 1, amp: 0.7 play :cs2, sustain: 1, amp: 0.7 sleep 2 end end
Works, sounds good, but looks kind of ugly to me. I’m duplicating a lot of sustains and amps and stuff. How would you all go about “tightening” this code up? That is, making it more compact or concise while retaining flexibility.