Massive attack Dissolved girl cover in Sonic Pi inspired by ixi

Tip: Scroll down to line 148 to

/ on off melody voice here /

# 240602 0041 Massive attack Dissolved girl cover in Sonic Pi inspired by ixi
# Saved 240602 0041
# Created by https://linktr.ee/relaxnow
# My performance https://youtu.be/FHVVrppZHUM
# https://in-thread.sonic-pi.net/t/massive-attack-dissolved-girl-cover-in-sonic-pi-inspired-by-ixi/8908

# Inspiration
#  Walkthrough by ixi  https://www.youtube.com/watch?v=qNvOMT3fGLQ
#  Massive attack dissolved girl https://youtu.be/ABQjT6gDKu0 (original)


# Massive Attack - Dissolved Girl - piano cover by vkgoeswild
#  https://www.youtube.com/watch?v=be4eZzDyAjw
#  Sheet notes https://pianokafe.com/music/massive-attack-dissolved-girl/
# Synthesia piano tutorial https://youtu.be/-rFc2SG02Qs


# Tip: Scroll down to line 148 to
/ on off melody voice here /


use_bpm 132


live_loop :drums do
  
  tick
  puts "-------" if spread(1,64).look
  puts look if spread(1,16).look
  a = line(0,1, steps: 32).ramp.look
  
  # https://www.tutorialspoint.com/ruby/ruby_if_else.htm
  if a < 0.96 #comes in after 64 ticks
    sleep 0.5
  else
    / kick /
    sample :bd_haus, cutoff: 70+[0,3,6,-3,-6].choose+10, amp: [1.75,1,1].look+1 if bools(1,0,1,0, 0,1,0,0, 1,0,0,1, 0,0,0,0).look
    
    / snare /
    sn_amp = 0
    sn_amp = [1,1,1,1,1.5].look
    sn = 1
    sn = 64
    snare = knit(0,sn,1,sn,5,sn,1,sn).look
    / low pitch snare/
    sample :sn_dolf, finish: [0.125,0.125,0.75].choose, rate: [1,1,1,1,-1].look,rpitch: [0,0,12,24].look, amp: sn_amp, pan: rdist(0.5) if spread(snare,8).rotate(4).look
    / high pitch snare/
    sample :sn_dub, finish: [0.125,0.125,0.75].choose, rate: [1,1,-1].look, rpitch: [0,0,12,24].look+12, amp: sn_amp, pan: rdist(0.25) if spread(snare,8).rotate(6).look
    
    / hihat  /
    sample :sn_dolf, finish: 0.0081+[0.0001,0.0003,-0.0001,-0.0003].choose, amp: [1,1,1.5].look+[0,0,0,1].choose+0.5, cutoff: 115+[0,0,0,15].choose #if spread(2,2).rotate(4).look
    
    sleep 0.5
  end
end

with_fx :reverb, room: 0.8 do
  
  live_loop :fast_low_saw_synth do
    tick
    use_synth :saw
    use_synth_defaults cutoff: 80, release: 0.25
    n = [:f2].look
    a = line(0,1, steps: 32).ramp.look
    play n+[0,7,0,7].look, amp: a
    sleep 0.5
  end
  
  live_loop :piano_top_arp do
    tick
    use_synth :piano
    use_synth_defaults cutoff: 100, release: 0.25
    n = [:f5].look
    
    r = 64
    amp_arp = knit(1,r, 0,r-1, 2,1).look   # A bit of a mess here, not syncing
    case amp_arp
    when 0
      a = 0
    when 1
      #a = line(0,1, steps: 32).ramp.look   # 1.
      a = line(0,1, steps: 64).ramp.look
    when 2
      a = 0
      tick_reset # Trying to get fade in on arp again with tick_reset
    end
    
    play n+[5,-2,7-12].look, amp: a
    sleep [0.5,1,0.5].look
  end
  
  live_loop :piano_long_notes do
    tick
    use_synth :piano
    use_synth_defaults cutoff: 120, release: 1, sustain: 4
    n = [:f3].look
    
    amp = knit(0,6, 1,6).look
    
    play n+knit(0,1,3,1).look, amp: amp, pan: 0.75
    play n+knit(0,1,3,1).look+12, amp: amp, pitch: 0.01, pan: -0.75
    sleep 8
  end
  
  
  with_fx :bitcrusher, mix: 0 do # 0.25 for more crush (not used right now)
    
    live_loop :electrical_bass do
      tick
      a = line(0,1, steps: 32).ramp.look
      
      # https://www.tutorialspoint.com/ruby/ruby_if_else.htm
      if a < 0.625 #comes in after 32 ticks
        #if look < 31 #comes in after 32 ticks
        elbas_amp = 0
      else
        elbas_amp = 1
      end
      
      
      n = [:f2, :f2, nil, :bb2, :gs2,:gs2,:gs2,:f2, nil,  :c1,
           :f2, :f2, :g3,:bb2,:f3, :gs2,:gs2,:gs2,:f2, nil].look
      
      use_synth :dsaw
      use_synth_defaults cutoff: 90, release: 0.75, amp: elbas_amp
      play [n].look, pan: -0.5, pitch: -12+0.125
      
      use_synth :saw
      play [n].look, pan: 0.5
      
      s = 0.5
      sleep [s*2,s*2,  s,s*3, s,s,s,s,s*3,s,
             s*2,s*2,  s,s*2,s, s,s,s,s,s*4].look
    end
    
  end
  
  
  with_fx :flanger, mix: 0.8 do
    
    live_loop :voice do
      tick
      
      use_synth  :beep
      n = [:c5, :d5, :c5, :ds5,  :g5, :gs5 ,:g5,:gs5, :g5, :ds5, :ds5, :f5, :c5].look
      
      / on off melody voice here /
      amp_voice = 0.5 # on
      amp_voice = 0   # off
      
      play n, amp: amp_voice
      s = 0.5
      #16   0.5  1  8.5 = 16
      #                          1   1   0.5 1  1  1   1   1 = 7.5
      #                                                           +0.5+8 = 16
      sl = [s*12,s,s*2,s+8,      s*2,s*2,s,s*2,s*2,s*2,s*2,s*2, s+s*16]
      sleep sl.look
      
    end
  end
end
5 Likes

Very nice!
I think I’ll study your code. Some things I don’t understand yet.

1 Like

Thank you.
Just ask and I’ll try to explain.

Really lovely work - thanks for sharing!

1 Like