Created
March 14, 2015 07:54
-
-
Save nicoder/f141dea91cceb01fe06b to your computer and use it in GitHub Desktop.
20150314 sonic pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define :mel do | |
play_pattern_timed [64, 59, 66, 59, 64, 59], [0.5] | |
play_pattern_timed [68, 64, 59], [0.25, 0.25, 0.5] | |
end | |
c = [:e, :b, :a, :a] | |
c2 = [:e, :b, :cs, :a] | |
chorus = [c, c, c2, c].flatten | |
live_loop :m1 do | |
sleep 4 | |
end | |
live_loop :m2 do | |
sync :m1 | |
sleep 16 | |
end | |
live_loop :mel do | |
sync :m1 | |
with_fx :distortion, distort: 0.95 do | |
mel | |
end | |
end | |
live_loop :bass do | |
sync :m2 | |
use_synth :fm | |
with_transpose -12 do | |
chorus.each do |n| | |
4.times do | |
play n, release: 0.6 | |
sleep 0.5 | |
end | |
end | |
end | |
end | |
live_loop :chords do | |
sync :m2 | |
use_synth :pulse | |
chorus.each do |n| | |
play chord(n, n == :cs ? :minor : :major), release: 2 | |
sleep 2 | |
end | |
end | |
live_loop :drums do | |
sync :m1 | |
with_fx :echo do | |
sample :drum_bass_hard | |
end | |
sleep 1 | |
sample :drum_snare_hard | |
sleep 1 | |
sample :drum_bass_hard | |
sleep 0.5 | |
sample :drum_bass_hard | |
sleep 0.5 | |
sample :drum_snare_hard | |
end | |
live_loop :cymbal do | |
sync :m1 | |
8.times do | |
sample :drum_cymbal_open | |
sleep 0.5 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment