Created
September 25, 2014 18:34
-
-
Save mileszs/c58357e1de41d2424885 to your computer and use it in GitHub Desktop.
Crude code for a blues song via 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
# Welcome to Sonic Pi v2.0 | |
def e7 | |
play chord(:e4, :dom7), release: 0.40 | |
sleep 0.5 | |
play chord(:e4, :dom7), release: 0.25 | |
sleep 0.25 | |
end | |
def a7 | |
play chord(:a4, :dom7), release: 0.40 | |
sleep 0.5 | |
play chord(:a4, :dom7), release: 0.25 | |
sleep 0.25 | |
end | |
def b7 | |
play chord(:b4, :dom7), release: 0.40 | |
sleep 0.5 | |
play chord(:b4, :dom7), release: 0.25 | |
sleep 0.25 | |
end | |
def deep_e7 | |
play chord(:e2, :dom7) | |
sleep 0.75 | |
end | |
def deep_a7 | |
play chord(:a2, :dom7) | |
sleep 0.75 | |
end | |
def deep_b7 | |
play chord(:b2, :dom7) | |
sleep 0.75 | |
end | |
in_thread do | |
use_synth :prophet | |
4.times { e7 } | |
4.times { a7 } | |
8.times { e7 } | |
8.times { a7 } | |
4.times { b7 } | |
4.times { a7 } | |
4.times { e7 } | |
4.times { b7 } | |
end | |
in_thread do | |
4.times { deep_e7 } | |
4.times { deep_a7 } | |
8.times { deep_e7 } | |
8.times { deep_a7 } | |
4.times { deep_b7 } | |
4.times { deep_a7 } | |
4.times { deep_e7 } | |
4.times { deep_b7 } | |
end | |
in_thread do | |
120.times do | |
use_synth :supersaw | |
play choose(scale(:e4, :minor_pentatonic, num_octaves: 3)), release: 0.3, cutoff: rrand(60, 120) | |
sleep 0.25 | |
end | |
end | |
in_thread do | |
40.times do | |
sample :drum_heavy_kick, rate: 0.8 | |
sleep 0.50 | |
sample :drum_heavy_kick, rate: 0.8 | |
sleep 0.25 | |
end | |
end | |
in_thread do | |
4.times do | |
3.times do | |
sleep 0.5 | |
sample :drum_snare_hard, rate: 0.8 | |
sleep 1 | |
end | |
1.times do | |
sleep 0.5 | |
sample :drum_snare_hard, rate: 0.8 | |
sleep 0.5 | |
sample :drum_snare_hard, rate: 0.8 | |
sleep 0.125 | |
sample :drum_snare_hard, rate: 0.8 | |
sleep 0.125 | |
sample :drum_snare_hard, rate: 0.8 | |
sleep 0.125 | |
sample :drum_snare_hard, rate: 0.8 | |
sleep 0.125 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment