Created
December 9, 2016 21:52
-
-
Save Castlewood/167a23f37df8f43747111895d0e58059 to your computer and use it in GitHub Desktop.
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
#root = 'C:/samples' | |
root = '/home/pi/Google Drive/samples' | |
s = 0.25#Sixteenth note (semiquaver) | |
q = 0.5#Eight note (quaver) | |
c = 1 #Quarter note (crotchet) | |
m = 2 #Half note (minim) | |
sm = 4 #Whole note (semibreve) | |
guitar_part = 1 | |
bridge_part = 1 | |
bells_part=1 | |
#use_debug true | |
use_bpm 120 | |
################################## | |
################################## | |
###### Begin Live Edit Zone ###### | |
live_loop :main do | |
16.times do | |
sleep c | |
end | |
end | |
live_loop :piano do | |
sync :main | |
in_thread do | |
play_piano | |
end | |
in_thread do | |
#play_synth | |
end | |
end | |
live_loop :glock do | |
sync :main | |
synth = :pretty_bell | |
with_guitar = false | |
in_thread do | |
#play_glock(with_guitar, synth) | |
end | |
end | |
live_loop :bass do | |
sync :main | |
in_thread do | |
#play_bass(:fm) | |
end | |
end | |
live_loop :bass2 do | |
sync :main | |
in_thread do | |
#play_bass_2(:fm) | |
end | |
end | |
live_loop :drums do | |
sync :main | |
16.times do | |
#sample :bd_fat, amp: 10 | |
sleep 1 | |
end | |
end | |
live_loop :pulse do | |
sync :main | |
in_thread do | |
#play_pulse | |
end | |
end | |
live_loop :clouds do | |
sync :main | |
#play_clouds | |
end | |
###### End Live Edit Zone ###### | |
################################## | |
################################## | |
define :play_clouds do | |
puts bridge_part | |
if bridge_part<3 | |
play_bridge | |
elsif bridge_part==3 | |
play_finale | |
end | |
end | |
define :play_bridge do | |
in_thread do | |
with_fx :reverb, mix: 0.5 do | |
play_caitlin | |
end | |
end | |
in_thread do | |
with_fx :reverb, mix: 0.5 do | |
play_heartbeat | |
end | |
end | |
end | |
define :play_finale do | |
in_thread do | |
if bells_part==7 | |
stop | |
else | |
in_thread do | |
play_bells | |
end | |
in_thread do | |
play_bass3 | |
end | |
in_thread do | |
play_voices | |
end | |
in_thread do | |
play_bass_2(:fm) | |
end | |
end | |
end | |
end | |
define :play_glock do |with_guitar, synth| | |
part = guitar_part | |
1.times do | |
if with_guitar == false | |
play_glock_1(synth) | |
elsif with_guitar == true | |
if guitar_part ==1 | |
guitar_part=2 | |
elsif guitar_part ==2 | |
guitar_part=1 | |
end | |
in_thread do | |
play_guitar(part) | |
end | |
in_thread do | |
play_glock_2(synth) | |
end | |
end | |
end | |
end | |
define :play_piano do | |
use_synth :piano | |
with_fx :reverb, mix: 0.5 do | |
play :c6, decay: q + 0.2 | |
sleep q | |
play :e5, amp: 0.79 | |
sleep q | |
play :d6, decay: q + 0.2 | |
sleep q | |
play :e5, amp: 0.79 | |
sleep q | |
play :b5 | |
sleep c + q | |
play :c6 | |
play :e5, amp: 0.79 | |
sleep q | |
play :e5, amp: 0.79 | |
sleep q | |
play :d6, decay: q + 0.2 | |
sleep q | |
play :e5, amp: 0.79 | |
sleep q | |
play :b5 | |
sleep q | |
play :c6, decay: q + 0.2 | |
play :e5, amp: 0.79 | |
sleep c | |
play :a5 | |
sleep c | |
play :c6, decay: q + 0.2 | |
sleep q | |
play :e5, amp: 0.79 | |
sleep q | |
play :d6, decay: q + 0.2 | |
sleep q | |
play :e5, amp: 0.79 | |
sleep q | |
play :b5 | |
sleep c | |
sleep q | |
play :b5 | |
play :e5, amp: 0.79 | |
sleep c | |
play :c6, decay: q + 0.2 | |
sleep q | |
play :e5, amp: 0.79 | |
sleep q | |
play :a5 | |
sleep q | |
play :b5, decay: q + 0.2 | |
play :e5, amp: 0.79 | |
sleep c | |
play :g5 | |
sleep c | |
end | |
end | |
define :play_glock_1 do |synth| | |
use_synth synth | |
play :a4 | |
sleep s | |
sleep s | |
play :c5 | |
sleep s | |
sleep s | |
play :b4 | |
sleep s | |
sleep s | |
sleep s | |
play :a4 | |
sleep s | |
sleep s | |
sleep s | |
play :c5 | |
sleep s | |
sleep s | |
play :b4 | |
sleep s | |
sleep s | |
sleep s | |
sleep s | |
play :a4 | |
sleep s | |
sleep s | |
play :c5 | |
sleep s | |
sleep s | |
play :b4 | |
sleep s | |
sleep s | |
play :e4 | |
sleep s | |
play :a4 | |
sleep s | |
sleep s | |
play :c5 | |
sleep s | |
sleep s | |
play :a4 | |
sleep s | |
play :b4 | |
sleep s | |
sleep s | |
play :g4 | |
sleep s | |
sleep s | |
play :a4 | |
sleep s | |
sleep s | |
play :c5 | |
sleep s | |
sleep s | |
play :b4 | |
sleep s | |
sleep s | |
sleep s | |
play :a4 | |
sleep s | |
sleep s | |
sleep s | |
play :c5 | |
sleep s | |
sleep s | |
play :b4 | |
sleep s | |
sleep s | |
sleep s | |
sleep s | |
play :c5 | |
sleep s | |
sleep s | |
sleep s | |
play :c5 | |
sleep s | |
sleep s | |
sleep s | |
play :c5 | |
sleep s | |
sleep s | |
play :b4 | |
sleep s | |
sleep s | |
sleep s | |
play :b4 | |
sleep s | |
sleep s | |
sleep s | |
play :b4 | |
sleep s | |
sleep s | |
end | |
define :play_bass do |synth| | |
use_synth synth | |
4.times do | |
play :a3, release: 0.2 | |
sleep s | |
play :a3, release: 0.2 | |
sleep s | |
play :a3, release: 0.2 | |
sleep s | |
play :a3, release: 0.2 | |
sleep s | |
play :d4, release: 0.2 | |
sleep s | |
play :e4, release: 0.2 | |
sleep s | |
play :a4, release: 0.2 | |
sleep s | |
play :a4, release: 0.2 | |
sleep s | |
play :a4, release: 0.2 | |
sleep s | |
play :g4, release: 0.2 | |
sleep s | |
play :e4, release: 0.2 | |
sleep s | |
play :d4, release: 0.2 | |
sleep s | |
play 66, release: 0.2 | |
sleep s | |
play :g4, release: 0.2 | |
sleep s | |
play :c4, release: 0.2 | |
sleep s | |
play :b3, release: 0.2 | |
sleep s | |
end | |
end | |
define :play_guitar do |part| | |
amp = 1 | |
use_synth :blade | |
if part == 1 | |
play :a4, decay: m, amp: amp | |
sleep m | |
play :c5, decay: q + c + s, amp: amp | |
sleep m | |
play :d5, decay: q, amp: amp | |
sleep q | |
# play :a4, decay: s, amp: amp | |
sleep s | |
play :c5, decay: s, amp: amp | |
sleep s | |
play :d5, decay: q, amp: amp | |
sleep q | |
play :e5, decay: q, amp: amp | |
sleep q | |
play :a5, decay: q, amp: amp | |
sleep q | |
play :e5, decay: q, amp: amp | |
sleep q | |
play :d5, decay: q, amp: amp | |
sleep q | |
play :c5, decay: q, amp: amp | |
sleep q | |
play :e5, decay: q + s, amp: amp | |
sleep q + s | |
play :d5, decay: q + s, amp: amp | |
sleep q + s | |
play :c5, decay: c, amp: amp | |
sleep c | |
play :b4, decay: c, amp: amp | |
sleep c | |
play :a4, decay: q, amp: amp | |
sleep q | |
play :e5, decay: sm, amp: amp | |
sleep sm | |
else part == 2 | |
cue :guitar_half | |
play :a4, decay: m, amp: amp | |
sleep m | |
play :c5, decay: q + c + s, amp: amp | |
sleep m | |
play :d5, decay: q, amp: amp | |
sleep q | |
#play :a4, decay: s, amp: amp | |
sleep s | |
play :c5, decay: s, amp: amp | |
sleep s | |
play :d5, decay: q, amp: amp | |
sleep q | |
play :e5, decay: q, amp: amp | |
sleep q | |
play :a5, decay: q, amp: amp | |
sleep q | |
play :e5, decay: q, amp: amp | |
sleep q | |
play :d5, decay: q, amp: amp | |
sleep q | |
play :c5, decay: q, amp: amp | |
sleep q | |
play :e5, decay: q + s, amp: amp | |
sleep q + s | |
play :d5, decay: q + s, amp: amp | |
sleep q + s | |
play :c5, decay: c, amp: amp | |
sleep c | |
play :b4, decay: c, amp: amp | |
sleep c | |
play :a4, decay: q+m, amp: amp | |
end | |
end | |
define :play_glock_2 do |synth| | |
amp = 1 | |
use_synth synth | |
#play :a4 | |
sleep s | |
sleep s | |
#play :c5 | |
sleep s | |
sleep s | |
#play :b4 | |
sleep s | |
sleep s | |
sleep s | |
#play :a4 | |
sleep s | |
sleep s | |
sleep s | |
#play :c5 | |
sleep s | |
sleep s | |
#play :b4 | |
sleep s | |
sleep s | |
sleep s | |
sleep s | |
#play :a4 | |
sleep s | |
sleep s | |
#play :c5 | |
sleep s | |
sleep s | |
#play :b4 | |
sleep s | |
sleep s | |
#play :e4 | |
sleep s | |
#play :a4 | |
sleep s | |
sleep s | |
#play :c5 | |
sleep s | |
sleep s | |
#play :a4 | |
sleep s | |
#play :b4 | |
sleep s | |
sleep s | |
#play :g4 | |
sleep s | |
sleep s | |
#play :a4 | |
sleep s | |
sleep s | |
#play :c5 | |
sleep s | |
sleep s | |
#play :b4 | |
sleep s | |
sleep s | |
sleep s | |
#play :a4 | |
sleep s | |
sleep s | |
sleep s | |
#play :c5 | |
sleep s | |
sleep s | |
#play :b4 | |
sleep s | |
sleep s | |
sleep s | |
sleep s | |
play :c5, amp: amp | |
sleep s | |
sleep s | |
sleep s | |
play :c5, amp: amp | |
sleep s | |
sleep s | |
sleep s | |
play :c5, amp: amp | |
sleep s | |
sleep s | |
play :b4, amp: amp | |
sleep s | |
sleep s | |
sleep s | |
play :b4, amp: amp | |
sleep s | |
sleep s | |
sleep s | |
play :b4, amp: amp | |
sleep s | |
sleep s | |
end | |
define :play_bass_2 do |synth| | |
use_synth synth | |
4.times do | |
amp = 5 | |
play :a2, release: 0.2, amp: amp | |
sleep s | |
play :a2, release: 0.2, amp: amp | |
sleep s | |
play :a2, release: 0.2, amp: amp | |
sleep s | |
sleep s | |
#cue :one | |
play :a2, release: 0.2, amp: amp | |
sleep s | |
sleep s | |
play :a2, release: 0.2, amp: amp | |
sleep s | |
play :a2, release: 0.2, amp: amp | |
sleep s | |
#cue :two | |
sleep s | |
play :a2, release: 0.2, amp: amp | |
sleep s | |
sleep s | |
play :a2, release: 0.2, amp: amp | |
sleep s | |
#cue :three | |
sleep s | |
play :a2, release: 0.2, amp: amp | |
sleep s | |
play :a2, release: 0.2, amp: amp | |
sleep s | |
play :a2, release: 0.2, amp: amp | |
sleep s | |
end | |
end | |
define :play_synth do | |
use_synth :dsaw | |
amp = 0.3 | |
play :e5, amp: amp | |
sleep q | |
play :g5, amp: amp | |
sleep q | |
play :e5, amp: amp | |
sleep q | |
play :a4, amp: amp | |
sleep q | |
play :e5, amp: amp | |
sleep q | |
play :g5, amp: amp | |
sleep q | |
play :e5, amp: amp | |
sleep q | |
play :a4, amp: amp | |
sleep q | |
play :d5, amp: amp | |
sleep q | |
play :g5, amp: amp | |
sleep q | |
play :d5, amp: amp | |
sleep q | |
play :g5, amp: amp | |
sleep q | |
play :d5, amp: amp | |
sleep q | |
play :g5, amp: amp | |
sleep q | |
play :d5, amp: amp | |
sleep q | |
play :g5, amp: amp | |
sleep q | |
play :c5, amp: amp | |
sleep q | |
play :g5, amp: amp | |
sleep q | |
play :c5, amp: amp | |
sleep q | |
play :g5, amp: amp | |
sleep q | |
play :c5, amp: amp | |
sleep q | |
play :g5, amp: amp | |
sleep q | |
play :c5, amp: amp | |
sleep q | |
play :g5, amp: amp | |
sleep q | |
play :g4, amp: amp | |
sleep q | |
play :d5, amp: amp | |
sleep q | |
play :g4, amp: amp | |
sleep q | |
play :d5, amp: amp | |
sleep q | |
play :g4, amp: amp | |
sleep q | |
play :d5, amp: amp | |
sleep q | |
play :g4, amp: amp | |
sleep q | |
play :d5, amp: amp | |
sleep q | |
end | |
define :play_pulse do | |
use_synth :fm | |
with_fx :reverb, mix: 0.5 do | |
8.times do | |
play :a2, release: q, amp: 5 | |
sleep q | |
sleep s | |
play :a2, release: s, amp: 5 | |
sleep s | |
sleep c | |
end | |
end | |
end | |
define :play_caitlin do | |
part = bridge_part | |
1.times do | |
if part==1 | |
sample root + '/rain.wav', amp: 5 | |
sleep sm*2 | |
sample root + '/journey.wav', amp: 5 | |
sleep sm*2 | |
bridge_part=2 | |
elsif part==2 | |
sample root + '/nothing.wav', amp: 5 | |
sleep sm*2 | |
sample root + '/bells.wav', amp: 5 | |
bridge_part=3 | |
end | |
end | |
end | |
define :play_heartbeat do | |
2.times do | |
length = sample_duration root + '/heartbeat.wav' | |
sample root + '/heartbeat.wav', amp: 10 | |
sleep length | |
end | |
end | |
define :play_voices do | |
amp = 5 | |
use_sample_pack root + '/Chorus' | |
length = sample_duration :chorusfemalec5 | |
duration = length * s | |
if bells_part < 4 | |
with_fx :reverb, mix: 0.5 do | |
sample :chorusfemalec5, start: 0.2, finish: 0.2+(2*(q+s))/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep q | |
sleep q | |
sample :chorusfemaled5, start: 0.2, finish: 0.2+(2*(q+s))/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep q | |
sleep q | |
sample :chorusfemaleb4, start: 0.2, finish: 0.2+(c + q)/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep c + q | |
sample :chorusfemalec5, start: 0.2, finish: 0.2+(2*(q+s))/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep q | |
sleep q | |
sample :chorusfemaled5, start: 0.2, finish: 0.2+(2*(q+s))/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep q | |
sleep q | |
sample :chorusfemaleb4, start: 0.2, finish: 0.2+(2*q)/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep q | |
sample :chorusfemalec5, start: 0.2, finish: 0.2+(2*(q+s))/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep c | |
sample :chorusfemalea4, start: 0.2, finish: 0.2+(c+s)/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep c | |
sample :chorusfemalec5, start: 0.2, finish: 0.2+(2*(q+s))/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep q | |
sleep q | |
sample :chorusfemaled5, start: 0.2, finish: 0.2+(2*(q+s))/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep q | |
sleep q | |
sample :chorusfemaleb4, start: 0.2, finish: 0.2+(c+q)/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep c | |
sleep q | |
sample :chorusfemaleb4, start: 0.2, finish: 0.2+(2*(q+s))/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep c | |
sample :chorusfemalec5, start: 0.2, finish: 0.2+(2*(q+s))/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep q | |
sleep q | |
sample :chorusfemalea4, start: 0.2, finish: 0.2+(2*q)/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep q | |
sample :chorusfemaleb4, start: 0.2, finish: 0.2+(2*(q+s))/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep c | |
sample :chorusfemaleg4, start: 0.2, finish: 0.2+(c+s)/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep c | |
end | |
elsif bells_part > 3 | |
with_fx :reverb, mix: 0.5 do | |
sample :chorusfemalec5, start: 0.2, finish: 0.2+(2*(q+s))/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep q | |
sleep q | |
sample :chorusfemaled5, start: 0.2, finish: 0.2+(2*(q+s))/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep q | |
sleep q | |
sample :chorusfemaleb4, start: 0.2, finish: 0.2+(c + q)/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep c + q | |
sample :chorusfemalec5, start: 0.2, finish: 0.2+(2*(q+s))/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep q | |
sleep q | |
sample :chorusfemaled5, start: 0.2, finish: 0.2+(2*(q+s))/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep q | |
sleep q | |
sample :chorusfemaleb4, start: 0.2, finish: 0.2+(2*q)/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep q | |
sample :chorusfemalec5, start: 0.2, finish: 0.2+(2*(q+s))/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep c | |
sample :chorusfemalea4, amp: 10, start: 0.2, finish: 0.2+(c+s)/length, amp: amp, attack: 0.1, release: 0.1 | |
sleep c | |
cue :choruschorus | |
end | |
end | |
end | |
define :play_bells do | |
use_sample_pack root + '/TubularBellsVST' | |
part = bells_part | |
1.times do | |
if part==1 | |
sample :a3, amp: 5, release: 8 | |
sleep 8 | |
sample :c4, amp: 5, release: 4 | |
sleep 4 | |
sample :d4, amp: 5, release: 4 | |
sleep 4 | |
bells_part=2 | |
elsif part==2 | |
sample :a3, amp: 5, release: 8 | |
sleep 8 | |
sample :c4, amp: 5, release: 4 | |
sleep 4 | |
sample :b3, amp: 5, release: 4 | |
sleep 4 | |
bells_part=3 | |
elsif part==3 | |
sample :a3, amp: 5, release: 8 | |
sleep 8 | |
sample :c4, amp: 5, release: 4 | |
sleep 4 | |
sample :d4, amp: 5, release: 4 | |
sleep 4 | |
bells_part=4 | |
elsif part==4 | |
sample :a3, amp: 5, release: 8 | |
sleep 8 | |
sample :c4, amp: 5, release: 1 | |
cue :c4c4c4c4c4 | |
sleep 1 | |
sample :b3, amp: 5, release: 1 | |
sleep 1 | |
sample :a3, amp: 5, release: 1 | |
sleep 1 | |
sample :g3, amp: 5, release: 1 | |
sleep 1 | |
sample :b3, amp: 5, release: 1 | |
sleep 1 | |
sample :b3, amp: 5, release: 1 | |
sleep 1 | |
sample :a3, amp: 5, release: 1 | |
sleep 1 | |
sample :g3, amp: 5, release: 1 | |
sleep 1 | |
bells_part=5 | |
elsif part==5 | |
sample :a3, amp: 5, release: 8 | |
sleep 8 | |
sample :c4, amp: 5, release: 1 | |
sleep 1 | |
sample :b3, amp: 5, release: 1 | |
sleep 1 | |
sample :a3, amp: 5, release: 1 | |
sleep 1 | |
sample :g3, amp: 5, release: 1 | |
sleep 1 | |
sample :d4, amp: 5, release: 1 | |
sleep 1 | |
sample :b3, amp: 5, release: 1 | |
sleep 1 | |
sample :a3, amp: 5, release: 1 | |
sleep 1 | |
sample :g3, amp: 5, release: 1 | |
sleep 1 | |
bells_part=6 | |
elsif part==6 | |
sample :a3, amp: 5, release: 8 | |
sleep 8 | |
bells_part=7 | |
stop | |
end | |
end | |
end | |
define :play_bass3 do | |
use_synth :fm | |
if bells_part<6 | |
1.times do | |
play :a3, release: c+q | |
sleep c+q | |
play :a3, release: q | |
sleep q | |
play :a3, release: c+q+s | |
sleep c+q+q | |
play :a3, release: c+q | |
sleep c+q | |
play :a3, release: q | |
sleep q | |
play :a3, release: c+q+s | |
sleep c+q+q | |
play :f3, release: c+q | |
sleep c+q | |
play :f3, release: q | |
sleep q | |
play :f3, release: c+q+s | |
sleep c+q+q | |
play :e3, release: c+q | |
sleep c+q | |
play :e3, release: q | |
sleep q | |
play :e3, release: c+q+s | |
sleep c+q+q | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Designed to be played 'live' - experiment with adding or removing comments to play the various parts - change the synths and use the 'guitar' option in the Glock loopto vary the leads.
Requires sample pack for the 'Clouds' finale