Skip to content

Instantly share code, notes, and snippets.

@nicoder
Last active August 29, 2015 14:16
Show Gist options
  • Save nicoder/af062911f40ffbc87bff to your computer and use it in GitHub Desktop.
Save nicoder/af062911f40ffbc87bff to your computer and use it in GitHub Desktop.
20150306 sonic pi
# arpeggios
g = chord(:g, :major)
e = chord(:e, :minor)
c = chord(:c, :major)
d = chord(:d, :major)
chords = [g, e, c, d]
live_loop :main do
use_synth :beep
chords.each do |chord|
with_fx :echo, decay: 0.8, mix: 0.25, phase: 0.375 do
bass = [chord[0], chord.choose].choose - 24
with_synth :fm do
play bass, release: 3, amp: 1.5
end
4.times do
chord.each{|n| play n + 12, release: 0.2; sleep 0.25}
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment