Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##| Electrician title Screen
- ##| Composed by David Bunch
- ##| Arranged for Sonic Pi by Nuclear Bastard
- ##| Original work (c) 1984 by Synapse Software
- use_bpm 180 # 180 for NTSC timing. Use 150 for PAL
- # Define timing in fractions of BPM
- _w = 1.0/1 # whole note
- _h = 1.0/2 # half note
- _q = 1.0/4 # quarter note
- _e = 1.0/8 # eightth note
- _s = 1.0/16 # sixteenth note
- _t = 1.0/32 # thirty-second note
- use_synth_defaults sustain: 0, attack: 0, release: _h
- use_synth :square
- define :background_loop_3x do
- play_pattern_timed [:B2, :E3, :Ds3, :E3], [_h, _h, _h, _h]
- end
- define :background_loop_break1 do
- play :D3, attack: 0, sustain: 0, release: _h
- sleep _h
- play :Cs3, attack: 0, sustain: 0, release: _h
- sleep _h
- play :B2, attack: 0, sustain: _h, release: _h
- sleep _w
- end
- define :background_loop_break2 do
- play :Cs3, attack: 0, sustain: 0, release: _h
- sleep _h
- play :Ds3, attack: 0, sustain: 0, release: _h
- sleep _h
- play :E3, attack: 0, sustain: _h, release: _h
- sleep _w
- end
- define :background_loop do
- 3.times do
- background_loop_3x
- end
- background_loop_break1
- 3.times do
- background_loop_3x
- end
- background_loop_break2
- end
- define :two_measure_rest do
- sleep 8
- end
- define :opening_horn do
- play :F4, attack: 0, sustain: _q, release: 0
- play :B4, attack: 0, sustain: _q, release: 0
- sleep _h + _q
- play :F4, attack: 0, sustain: _q, release: 0
- play :B4, attack: 0, sustain: _q, release: 0
- sleep _q
- sleep _w * 3
- end
- define :melody_fg do
- play_pattern_timed [:E4, :B4, :Fs4, :B4, :Gs4, :B4, :A4, :B4],[_h, _h, _h, _h, _h, _h, _h, _h], sustain: 0, attack: 0, release: _h
- play_pattern_timed [:Gs4, :B4, :Fs4, :B4, :E4, :B4, :Ds4, :B4],[_h, _h, _h, _h, _h, _h, _h, _h], sustain: 0, attack: 0, release: _h
- play_pattern_timed [:E4, :B4, :Fs4, :B4, :Gs4, :B4, :A4, :B4],[_h, _h, _h, _h, _h, _h, _h, _h], sustain: 0, attack: 0, release: _h
- play_pattern_timed [:Gs4, :B4, :Fs4, :B4, :Ds4, :B4],[_h, _h, _h, _h, _h, _h], sustain: 0, attack: 0, release: _h
- play :E4, sustain: _h, attack: 0, release: _h
- sleep _w
- end
- define :melody_bg do
- play :B3, sustain: _w, release: _h
- sleep _w + _h
- play :A3
- sleep _h
- play :Gs3, sustain: _w, release: _h
- sleep _w + _h
- play_pattern_timed [:Fs3,:E3,:Fs3,:Gs3],[_h,_h,_h,_h]
- play_pattern_timed [:Fs3,:E3,:Fs3,:Ds3,:B2],[_h,_h,_h, _h, _h]
- play :B3, sustain: _w, release: _h
- sleep _w + _h
- play :A3
- sleep _h
- play :Gs3, sustain: _w, release: _h
- sleep _w + _h
- play_pattern_timed [:Fs3,:E3,:Fs3,:Gs3,:Fs3],[_h,_h,_h,_h, _h]
- play_pattern_timed [:B2,:Cs3,:Ds3],[_q,_q,_q]
- sleep _q
- play :E3, sustain: _h, release: _h
- sleep _w
- end
- define :melody_mix do
- in_thread do
- melody_fg
- end
- in_thread do
- melody_bg
- end
- end
- define :dark_bridge do
- play_pattern_timed [:E3,:Fs3,:G3,:E3],[_h,_h,_h,_h]
- play :B3, sustain: _h, release: _h
- sleep _w
- play :A3
- sleep _h
- play :G3
- sleep _h
- play :A3, sustain: _h, release: _h
- sleep _w
- play :G3
- sleep _h
- play :Fs3
- sleep _h
- play :G3, sustain: _q, release: 0
- sleep _q
- play :Fs3, sustain: _q, release: 0
- sleep _q
- play :E3, sustain: _q, release: _q
- sleep _h
- play :B2, sustain: _h, release: _h
- sleep _w
- #--------------------------
- play_pattern_timed [:E3,:Fs3,:G3,:E3],[_h,_h,_h,_h]
- play :B3, sustain: _h, release: _h
- sleep _w
- play :A3
- sleep _h
- play :G3
- sleep _h
- play :A3, sustain: _h, release: _h
- sleep _w
- play :G3
- sleep _h
- play :Fs3
- sleep _h
- play :E3, sustain: _w, release: _w
- sleep _w * 2
- end
- in_thread(name: :bg_loop) do
- loop do
- background_loop
- end
- end
- in_thread do
- loop do
- two_measure_rest
- 2.times do
- opening_horn
- end
- melody_fg
- 2.times do
- in_thread do
- melody_fg
- end
- melody_bg
- end
- 2.times do
- dark_bridge
- end
- 2.times do
- in_thread do
- melody_fg
- end
- melody_bg
- end
- end
- end
Add Comment
Please, Sign In to add comment