Skip to content

Instantly share code, notes, and snippets.

@emlyn
Created May 18, 2020 14:40
Show Gist options
  • Save emlyn/a6e12959fe41d09a3068859e377b1746 to your computer and use it in GitHub Desktop.
Save emlyn/a6e12959fe41d09a3068859e377b1746 to your computer and use it in GitHub Desktop.
# The Secret Garden by Pauline Hall
use_synth :saw
use_bpm 100
use_midi_defaults channel: 1
# play note/chord
define :pl do |ns, t, p=0.8|
if not ns.respond_to?('each')
ns = [ns]
end
ns.each do |n|
#midi n, sustain: t * p
play n, sustain: t * p * 0.5, release: t * p * 0.5
end
sleep t
end
# slur note/chord into next note
define :sl do |ns, t, p=1.2|
pl ns, t, p
end
in_thread name: :right_hand do
with_fx :reverb, room: 0.9, pan: 0.5 do
sl [:a4, :c5, :e5], 3
pl [:a4, :c5], 3
sl [:g4, :b4, :d5], 3
pl [:g4, :b4], 3
sl [:f4, :a4, :c5], 3
pl [:f4, :a4], 3
sl [:e4, :gs4, :b4], 3
pl [:e4], 3
sl :e5, 1
sl :d5, 1
sl :c5, 1
pl :a4, 3
sl :d5, 1
sl :c5, 1
sl :b4, 1
pl :g4, 3
sl :c5, 1
sl :b4, 1
sl :a4, 1
pl :f4, 3
sl :b4, 1
sl :a4, 1
sl :gs4, 1
sl :e4, 1
sl :c5, 1
pl :b4, 1
sl :a4, 3
sl :c5, 3
pl :a4, 7, 1
end
end
in_thread name: :left_hand do
with_fx :reverb, room: 0.9, pan: -0.5 do
sl :a3, 1
sl :c4, 1
sl :e4, 1
sl :a3, 1
sl :c4, 1
pl :e4, 1
sl :g3, 1
sl :b3, 1
sl :d4, 1
sl :g3, 1
sl :b3, 1
pl :d4, 1
sl :f3, 1
sl :a3, 1
sl :c4, 1
sl :f3, 1
sl :a3, 1
pl :c4, 1
sl :e3, 1
sl :gs3, 1
sl :b3, 1
sl :e3, 1
sl :gs3, 1
pl :b3, 1
sl :a3, 1
sl :c4, 1
sl :e4, 1
sl :a3, 1
sl :c4, 1
pl :e4, 1
sl :g3, 1
sl :b3, 1
sl :d4, 1
sl :g3, 1
sl :b3, 1
pl :d4, 1
sl :f3, 1
sl :a3, 1
sl :c4, 1
sl :f3, 1
sl :a3, 1
pl :c4, 1
sl :e3, 1
sl :gs3, 1
sl :b3, 1
sl :e3, 1
sl :gs3, 1
pl :b3, 1
pl :a3, 3
pl [:a3, :c4, :e4], 3
pl [:a3, :c4, :e4], 3
pl [:a3, :c4, :e4], 4, 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment