221027 Where to take this (sketch)

# 221027 0045 Where to take this
# Saved 221027 0045
# Created by https://linktr.ee/relaxnow
# https://in-thread.sonic-pi.net/t/221025-where-to-take-this-sketch/7202


live_loop :time, delay: 0.01 do
  sleep 1
end



with_fx :level, amp: 4 do
  with_fx :reverb do
    
    
    / piano /
    with_fx :level, amp: 0.25 do
      live_loop :piano, sync: :time do
        use_synth :piano
        use_synth_defaults release: 0.125
        
        a = 4
        pianoriff = knit(1,a, 2,a).tick(:p)
        
        #        pianoriff = 2                            # change here 0-2
        #                                        # 1
        #                                        # 2 Nice
        
        case pianoriff
        when 0
          stop
        when 1
          tick
          5.times do
            play :g4 if bools(1,0,0,0,0).look
            sleep knit(0.75,4, 0.25,1).look
          end
          play :c5 if bools(0,0,1,0,0).look
          sleep 0.25*3
          play :f4 if bools(0,0,1,1,0).look
          sleep 0.25
        when 2
          5.times do
            tick
            play [:g4,:c5, :c4, :ds4, :f4, :g4].look
            sleep knit(0.75,4, 0.25,1, 7,1).look
          end
          sleep 0.25
        end
      end
    end #end level of piano
    
    
    
    
    
    
    
    / bass /
    live_loop :bass, sync: :time do
      # stop
      tick
      a = 4
      
      bassriff = 1 #knit( 1,a, 1,a, 2,a).look                             # change here 0-2
      #                                                                   # 1
      #                                                                   # 2 (needs more work - doesnt fit with piano)
      
      case bassriff
      when 0
        stop
      when 1   # break sleep 5
        use_synth :fm
        use_synth_defaults release: 0.4
        play knit([:c2,:c3],1, [:ds2,:ds3],1, [:g1,:g2],1, [:gs1,:gs2],2).look
        use_synth :saw
        a=0.1
        use_synth_defaults release: 0.15
        play knit([:c2+a,:c3+a],1, [:ds2+a,:ds3+a],1, [:g1+a,:g2+a],1, [:gs1+a,:gs2+a],2).look
        #sleep 5
        sleep [5,5,5,5,0.75].look
      when 2   # riff                  (needs more work)
        use_synth :fm
        use_synth_defaults release: 0.25
        play knit([:c2,:c3], 1, [:ds2,:ds3],1, [:g1,:g2],1, [:gs1,:gs2],2).look
        use_synth :saw
        a=0.1
        use_synth_defaults release: 0.15
        play knit([:c2+a,:c3+a],1, [:ds2+a,:ds3+a],1, [:g1+a,:g2+a],1, [:gs1+a,:gs2+a],2).look
        sleep [0.25,0.25,0.25,2   ,2+0.25*3].look#2 3 #7
      end
      
    end
    
    
    / clicks /
    live_loop :clicks, sync: :time do
      tick
      a = 16
      
      clicksriff = knit(1,a, 2,a/4).look                                  # potentiel switch of song character
      #                                                                   # change here 0-2
      #clicksriff = 0                                                     #
      
      case clicksriff
      when 0
      when 1
        c = range(50,130,step: 1).shuffle.look
        sample  :mehackit_robot1, finish: 0.02, rate: 2, amp: 2, pan: rrand(-0.5,0.5), cutoff: c if bools(1,1,0).look
        sample  :mehackit_robot3, finish: 0.03, amp: 2, pan: 0.5, cutoff: c if bools(1,0,1,1).look
      when 2
        c = range(50,130,step: 1).shuffle.look
        sample  :mehackit_robot1, finish: 0.02, amp: 2, pan: -0.5, cutoff: c if bools(1,1,0).look
        sample  :mehackit_robot4, finish: 0.03, amp: 2, pan: 0.5, cutoff: c if bools(1,0,1,1).look
      end
      sleep 0.25
    end
    
  end #end reverb
  
  
  
  / kicks /
  live_loop :kicks, sync: :time do
    tick
    a = 16
    
    kicksriff = knit(1,a, 2,a/4, 0,a, 3,a/4).look
    #kicksriff = 0
    
    case kicksriff
    when 0
    when 1
      sample  :bd_fat, finish: 0.2, amp: 3 if bools(1,0,0,0,0).look
      sample  :bd_fat, finish: 0.2, amp: 1, rate: 2 if bools(0,0,1,0,0).look
    when 2
      sample  :bd_fat, finish: 0.2, amp: 2 if bools(1,0,0,0,1).look
      sample  :bd_fat, finish: 0.2, amp: 1, rate: 2 if bools(0,0,1,0,0).look
    when 3
      sample  :bd_fat, finish: 0.2, amp: 2 if bools(1,0,0,1,1).look
      sample  :bd_fat, finish: 0.2, amp: 1, rate: 2 if bools(0,0,1,0,0).look
    end
    sleep 0.25
  end
  
end #end level

1 Like