Piano de la Mer

This piece is 2 years old now… my code has changed much,
and I guess I’d write it differently today…

Eventually I retitled it ‘Teardrops in the Rain’, and changed
the ocean background for a sampled thunderstorm and
rain… which only seemed to make it feel sadder, but also
more… hopeful.

Eli…

set_volume! 1
piano_tune = [:Bb3, :g3, :Bb3, :a3, :g3, :c3]
piano_tune1 = [:g3, :r, :r, :c3, :r, :e4]
bell_tune = [:D4, :G4, :D4, :G3, :D4, :G4, :D4, :Bb4]
guitar_tune = [:G3, :D4, :G4, :D4, :Bb4, :D4, :G4, :D4]
violin_tune = [ :d4, :e3, :d4, :c3]
violin_tune1 = [ :d6, :c5, :d6, :e5]


live_loop :beat4 do
  sleep 4
end

live_loop :beat1 do
  sleep 1
end

live_loop :timer do
  wait 100
  set_volume! 0.8
  wait 10
  set_volume! 0.6
  wait 10
  set_volume! 0.4
  sleep 10
  set_volume! 0.2
  sleep 10
  set_volume! 0.05
  sleep 10
  set_volume! 0
  sleep 10
  stop
end

define :chime do
  at [1, 4, 12],
  [{:amp=>0.3}, {:amp=> 0.6}, {:amp=> 0.5}] do |p|
    sample :elec_chime, p
  end
end

define :toms do
  at [1, 2, 3],
  [{:amp=>0.7}, {:amp=> 1}] do |p|
    sample [:drum_tom_lo_soft, :drum_tom_hi_soft].choose, p
    sample :drum_tom_mid_soft, p
  end
end

with_fx :reverb, mix: 0.5 do
  live_loop :oceans do
    s = synth [:bnoise, :cnoise, :gnoise].choose, amp: rrand(0.2, 0.25), attack: rrand(0, 4), sustain: rrand(0, 2), release: rrand(1, 3), cutoff_slide: rrand(0, 5), cutoff: rrand(60, 100), pan: rrand(-1, 1), pan_slide: rrand(1, 5), amp: rrand(0.150, 0.3)
    control s, pan: rrand(-1, 1), cutoff: rrand(60, 70)
    sleep rrand(2, 4)
  end
end

sleep 10


live_loop :piano do
  sync :beat1
  use_synth :piano
  play_pattern_timed piano_tune,[0.5, 1].choose, amp: 2.2
  if one_in 5 then
    piano_tune = [:Bb3, :g3, :Bb3, :a3, :g3, :c3]
  else
    piano_tune = piano_tune.shuffle
  end
end

live_loop :piano1 do
  sync :beat4
  use_synth :piano
  play_pattern_timed piano_tune1,[ 1], amp: 1.8
  if one_in 5 then
    piano_tune1 = [:g3, :r, :r, :c3, :r, :e4]
  else
    piano_tune1 = piano_tune1.shuffle
  end
end

sleep 5

live_loop :do_chime do
  chime
  sleep 5
end

live_loop :do_toms do
  toms
  sleep 2.5
end

sleep 10

live_loop :bells do
  sync :piano
  use_synth :pretty_bell
  play_pattern_timed bell_tune,[0.5,0.25].choose, attack: 0.01, sustain: 0.25, amp: 0.75, decay: 0.25
  if one_in 5 then
    bell_tune = [:D4, :G4, :D4, :G3, :D4, :G4, :D4, :Bb4]
  else
    bell_tune = bell_tune.shuffle
  end
end
live_loop :guitar1 do
  sync :piano
  use_synth :pluck
  play_pattern_timed guitar_tune,[0.25], attack: 0.01, sustain: 0.55
end

live_loop :strings1 do
  sync :beat4
  with_fx :echo do
    use_synth_defaults amp: 1, attack: 1, sustain: 1, release: 3
    use_synth :blade
    play_pattern_timed violin_tune, [4]
  end
  sleep 0.1
end

sleep 10

live_loop :strings2 do
  sync :beat4
  with_fx :echo do
    use_synth_defaults amp: 1, attack: 1, sustain: 1, release: 3
    use_synth :blade
    play_pattern_timed violin_tune1, [4]
  end
  sleep 0.1
end
1 Like

Hi Eli,

nice small piece. I especially like the violin imitation with the blade synth and echo for vibrato :slight_smile:

Cu.