Skip to content

Instantly share code, notes, and snippets.

@nicoder
Created January 5, 2015 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicoder/057c8d76aa3438158d8f to your computer and use it in GitHub Desktop.
Save nicoder/057c8d76aa3438158d8f to your computer and use it in GitHub Desktop.
20150105 sonic pi
l = sample_duration :loop_amen
live_loop :drums do
sample :loop_amen
sleep l
end
live_loop :notes do
sync :drums
with_fx :reverb do
with_fx :echo do
3.times do
play scale(:e3, :minor, num_octaves: 4)
.choose, amp: 0.5, cutoff: 130, attack: 0.3, release: 0.2
sleep rrand(0.125, l / 4.0)
end
end
end
end
live_loop :bass do
# sync :drums
play 40, amp: 4, release: l / 9.0
sleep l / 8.0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment