Last active
February 15, 2018 09:16
-
-
Save emlyn/cbb11852bb1827578811 to your computer and use it in GitHub Desktop.
Toby's Sonic Pi songs
This file contains 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
use_bpm 120 | |
use_synth :dsaw | |
p = [[:c4,:M7],[:a4,:m7],[:d4,:m7],[:g4,:dom7],[:e4,:m7],[:a4,:dom7],[:d4,:m7],[:g4,:dom7]] | |
in_thread do | |
sleep 8 | |
12.times do | |
sample :loop_breakbeat, rate: sample_duration(:loop_breakbeat)/4 | |
sleep 4 | |
end | |
end | |
define :a do | |
8.times do | |
r,t=p.tick(:a) | |
with_transpose -12 do | |
with_fx :ixi_techno do | |
play chord(r, t) | |
end | |
sleep 1 | |
with_fx :wobble do | |
play chord(r, t) | |
end | |
end | |
sleep 1 | |
end | |
end | |
with_fx :level, amp: 0.3, amp_slide: 16 do |f| | |
control f, amp: 1 | |
a | |
end | |
define :b do | |
with_fx :reverb do | |
with_fx :slicer do | |
in_thread do | |
8.times do | |
r,t=p.tick(:a) | |
play_pattern_timed chord(r,t), 0.5 | |
end | |
end | |
8.times do | |
r,t=p.tick(:a) | |
play_pattern_timed chord(r,t).reverse, 0.5 | |
end | |
end | |
end | |
end | |
b | |
with_fx :distortion, amp: 2 do | |
with_transpose 12 do | |
a | |
end | |
end | |
sleep 8 | |
with_fx :level, amp: 1, amp_slide: 8 do |f| | |
control f, amp: 0 | |
2.times do | |
sample :loop_breakbeat, rate: sample_duration(:loop_breakbeat)/4 | |
sleep 4 | |
end | |
end | |
4.times do | |
sample :drum_bass_hard | |
sample :drum_snare_hard | |
sleep 1 | |
end | |
in_thread do | |
8.times do | |
sample :loop_breakbeat, rate: sample_duration(:loop_breakbeat)/4 | |
sleep 4 | |
end | |
end | |
with_fx :distortion, amp: 2 do | |
a | |
end | |
b | |
sample :drum_cymbal_open, amp: 2 | |
with_fx :level, amp: 1, amp_slide: 12 do |f| | |
control f, amp: 0 | |
3.times do | |
sample :loop_breakbeat, rate: sample_duration(:loop_breakbeat)/4, amp: 2 | |
sleep 4 | |
end | |
end |
This file contains 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
in_thread do | |
uncomment do | |
2.times do | |
sample :drum_bass_hard | |
sleep 0.5 | |
sample :drum_bass_hard | |
sample :drum_cymbal_closed | |
sleep 0.25 | |
sample :drum_cymbal_closed | |
sleep 0.25 | |
end | |
4.times do | |
sample :drum_bass_hard | |
sleep 0.5 | |
end | |
end | |
cue :aa | |
64.times do | |
sample :drum_bass_hard | |
sleep 0.5 | |
sample :drum_cymbal_closed | |
sleep 0.5 | |
end | |
end | |
chorusnotes = scale(:a3, :minor_pentatonic, num_octaves: 2).shuffle + [62, 69, 62, 60, 57, 57] | |
define :chorus do | |
with_fx :ixi_techno, mix: 0.8 do | |
with_synth :prophet do | |
play_pattern_timed chorusnotes, 0.5, amp: 0.5 | |
end | |
end | |
end | |
define :verse do | |
with_synth :saw do | |
play_pattern_timed [60, 72, 60, 69, 60, 67, 60, 64, 60, 60], 0.5, amp: 0.5, attack: 0.1, decay: 0, sustain: 0.3, decay: 0.1 | |
play_pattern_timed [72, 69, 67, 64, 60, 60], 0.5, amp: 0.5, attack: 0.1, decay: 0, sustain: 0.3, decay: 0.1 | |
end | |
end | |
uncomment do | |
sync :aa | |
uncomment do | |
chorus | |
sleep 1 | |
2.times do | |
verse | |
sleep 1 | |
end | |
chorus | |
sleep 1 | |
verse | |
sleep 1 | |
chorus | |
end | |
with_fx :level, amp_slide: 4 do |fx| | |
control fx, amp: 0.5 | |
chorus | |
sleep 1 | |
control fx, amp: 0.25 | |
with_fx :slicer, mix: 0.8 do | |
with_synth :prophet do | |
play_pattern_timed [62, 69, 62, 60, 57, 57], 0.5, amp: 0.25 | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment