Skip to content

Instantly share code, notes, and snippets.

@jcavena
Forked from jimnanney/blue_monday.rb
Created August 27, 2016 20:56
Show Gist options
  • Save jcavena/6d11436dc14eac959418167c5cf24c5f to your computer and use it in GitHub Desktop.
Save jcavena/6d11436dc14eac959418167c5cf24c5f to your computer and use it in GitHub Desktop.
Sonic Pi - Blue Monday
define :mydrums do
2.times do
sample :drum_heavy_kick
sleep 0.5
end
8.times do
sample :drum_heavy_kick
sleep 0.125
end
4.times do
sample :drum_heavy_kick
sleep 0.5
end
end
define :mysynths do
with_fx :reverb do
with_synth :dsaw do
with_synth_defaults attack: 0.01, amp: 0.5, release: 0.5 do
notes = [:F, :C, :D, :D, :G, :C, :D, :D]
notes.each do |n|
2.times do
play note(n, octave: 2)
sleep 0.25
play note(n, octave: 3)
sleep 0.25
end
end
end
end
end
end
live_loop :bassline do
mydrums
end
sleep 8
live_loop :synth_notes do
mysynths
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment