#Welcome to Sonic Pi v2.5 #Kirstie Steele #Shake it off! #Taylor Swift use_bpm 148 #define how long various notes are quaver = 0.5 #half a beat crotchet = 1 #one beat minim = 2 #2 beats semibreve = 4 #4 beats #live loop that has the tune live_loop :tune do use_synth :pretty_bell with_fx :reverb, amp:2 do #play a line of music #note names #note lengths play_pattern_timed [:a, :b, :g, :a, :b],[quaver, quaver, minim, quaver, quaver] play_pattern_timed [:g, :d, :e, :e, :g, :e, :g],[crotchet,quaver,quaver,quaver,quaver,quaver,quaver] play_pattern_timed [:a,:a,:a, :b,:g,:e],[quaver,quaver,quaver,quaver,crotchet,crotchet] play_pattern_timed [:d,:b3,:a3,:g3,:g3,:g3],[crotchet,crotchet,quaver,quaver,quaver,quaver] play_pattern_timed [:a,:a,:a, :b,:g,:e],[quaver,quaver,quaver,quaver,crotchet,crotchet] play_pattern_timed [:d,:b3,:a3,:g3,:g3,:g3],[crotchet,crotchet,quaver,quaver,quaver,quaver] play_pattern_timed [:a,:a,:a, :b,:g,:e],[quaver,quaver,quaver,quaver,crotchet,crotchet] play_pattern_timed [:d,:b3,:a3,:g3],[crotchet,crotchet,quaver,quaver+crotchet] play_pattern_timed [:a, :b, :g, :a, :b],[quaver, quaver, minim, quaver, quaver] play_pattern_timed [:g],[semibreve] end end live_loop :chords do use_synth :subpulse with_fx :bitcrusher do 2.times do play_chord [:g,:d] sleep 0.5 end 2.times do play_chord [:g,:d] sleep 1 end 2.times do play_chord [:g,:d] sleep 0.5 end 2.times do play_chord [:g,:d] sleep 1 end play_chord [:g,:d] sleep 0.5 play_chord [:g,:d] sleep 1.5 2.times do play_chord [:a,:e] sleep 0.5 end 2.times do play_chord [:a,:e] sleep 1 end 2.times do play_chord [:a,:e] sleep 0.5 end 2.times do play_chord [:a,:e] sleep 1 end play_chord [:a,:e] sleep 0.5 play_chord [:a,:e] sleep 1.5 2.times do play_chord [:g,:a] sleep 0.5 end 2.times do play_chord [:g,:a] sleep 1 end 2.times do play_chord [:g,:a] sleep 0.5 end 2.times do play_chord [:g,:a] sleep 1 end play_chord [:g,:a] sleep 0.5 play_chord [:g,:a] sleep 1.5 2.times do play_chord [:g,:d] sleep 0.5 end 2.times do play_chord [:g,:d] sleep 1 end 2.times do play_chord [:g,:d] sleep 0.5 end 2.times do play_chord [:g,:d] sleep 1 end play_chord [:g,:d] sleep 0.5 play_chord [:g,:d] sleep 1.5 2.times do play_chord [:g,:d] sleep 0.5 end 2.times do play_chord [:g,:d] sleep 1 end 2.times do play_chord [:g,:d] sleep 0.5 end end end live_loop :drumBeat do 5.times do sample :elec_cymbal sample :drum_bass_hard sleep 1 sample :drum_snare_hard sleep 0.5 sample :drum_bass_hard sleep 1.5 sample :drum_snare_hard sleep 0.5 sample :drum_bass_hard sleep 0.5 sample :drum_bass_hard sleep 1 sample :drum_snare_hard sleep 1.5 sample :drum_bass_hard sleep 0.5 sample :drum_snare_hard sleep 0.5 sleep 0.5 end end