Skip to content

Instantly share code, notes, and snippets.

@bland-industries
Last active November 11, 2015 04:20
Show Gist options
  • Save bland-industries/971477d4af4ee1bf9fbf to your computer and use it in GitHub Desktop.
Save bland-industries/971477d4af4ee1bf9fbf to your computer and use it in GitHub Desktop.
My second SonicPi song from sheet music. This is a small portion of the song "Girl Anachronism" by The Dresden Dolls. Still need to work on it.
# First Part
bar = 2.0
half = bar/2.0
quarter = bar/4.0
eighth = bar/8.0
sixteenth = bar/16.0
use_synth :piano
in_thread(name: :top) do
twelth = bar/12.0
1.times do
sleep half
play chord(:e5), release: twelth
sleep twelth
play chord(:gb5), release: twelth
sleep twelth
play chord(:a5), release: twelth
sleep twelth
play chord(:c6), release: twelth
sleep twelth
play chord(:e6), release: twelth
sleep twelth
play chord(:gb6), release: twelth
sleep twelth
end
10.times do
sleep quarter
end
1.times do
play chord(:c5), release: sixteenth, amp: 0.5
sleep sixteenth
play chord(:gb5), release: sixteenth, amp: 0.5
sleep sixteenth
play chord(:a5), release: sixteenth, amp: 0.5
sleep sixteenth
play chord(:c6), release: sixteenth, amp: 0.5
sleep sixteenth
play chord(:c5), release: sixteenth, amp: 0.5
sleep sixteenth
play chord(:g5), release: sixteenth, amp: 0.5
sleep sixteenth
play chord(:a5), release: sixteenth, amp: 0.5
sleep sixteenth
play chord(:c6), release: sixteenth, amp: 0.5
sleep sixteenth
end
end
in_thread(name: :bottom) do
bar = 6.25
4.times do
1.times do
bar = bar - 0.25
half = bar/2.0
quarter = bar/4.0
eighth = bar/8.0
sixteenth = bar/16.0
play chord(:c4), release: sixteenth, amp: 0.5
sleep sixteenth
play chord(:gb4), release: sixteenth, amp: 0.5
sleep sixteenth
play chord(:a4), release: sixteenth, amp: 0.5
sleep sixteenth
play chord(:c5), release: sixteenth, amp: 0.5
sleep sixteenth
end
3.times do
bar = bar - 0.25
half = bar/2.0
quarter = bar/4.0
eighth = bar/8.0
sixteenth = bar/16.0
play chord(:c4), release: sixteenth, amp: 0.5
sleep sixteenth
play chord(:g4), release: sixteenth, amp: 0.5
sleep sixteenth
play chord(:ab4), release: sixteenth, amp: 0.5
sleep sixteenth
play chord(:c5), release: sixteenth, amp: 0.5
sleep sixteenth
end
end
end
# there is one bar in between the first and second part.
# still need to figure that out.
sleep 2.0
# second Part
bar = 2.0
half = bar/2.0
quarter = bar/4.0
eighth = bar/8.0
sixteenth = bar/16.0
use_synth :piano
define :mainFirstTop do
play chord(:c4), release: sixteenth
sleep sixteenth
play chord(:gb4), release: sixteenth
sleep sixteenth
play chord(:a4), release: sixteenth
play chord(:c4), release: sixteenth
sleep sixteenth
play chord(:c5), release: sixteenth
sleep sixteenth
end
define :mainNextTop do
play chord(:c4), release: sixteenth
sleep sixteenth
play chord(:g4), release: sixteenth
sleep sixteenth
play chord(:ab4), release: sixteenth
play chord(:c4), release: sixteenth
sleep sixteenth
play chord(:c5), release: sixteenth
sleep sixteenth
end
in_thread(name: :top) do
loop do
1.times do
mainFirstTop
3.times do
mainNextTop
end
end
1.times do
mainFirstTop
2.times do
mainNextTop
end
play chord(:eb5), release: sixteenth
sleep sixteenth
play chord(:gb5), release: sixteenth
sleep sixteenth
play chord(:a5), release: sixteenth
sleep sixteenth
play chord(:c6), release: sixteenth
sleep sixteenth
end
end
end
define :repeatsFirstBottom do
play chord(:d3), release: sixteenth
sleep sixteenth
play chord(:d3), release: sixteenth
sleep sixteenth
play chord(:d4), release: eighth
sleep eighth
end
define :repeatsNextBottom do
play chord(:f3), release: sixteenth
sleep sixteenth
play chord(:f3), release: sixteenth
sleep sixteenth
play chord(:f4), release: eighth
sleep eighth
end
in_thread(name: :bottom) do
loop do
4.times do
repeatsFirstBottom
end
2.times do
repeatsNextBottom
end
play chord(:f3), release: sixteenth
sleep sixteenth
play chord(:f3), release: sixteenth
sleep sixteenth
play chord(:f4), release: sixteenth
sleep sixteenth
play chord(:f4), release: (sixteenth + quarter)
sleep (sixteenth + quarter)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment