220920 2338 Late night sketch in Sonic Pi with Hydra visuals

# 220920 2338 late night sketch in Sonic Pi with Hydra
# 220920 2338 saved
# My performance https://youtu.be/E_jYn0DewXo
# create by https://linktr.ee/relaxnow


use_bpm 88


with_fx :level, amp: 4 do
  with_fx :reverb, room: 0.7 do
    
    
    live_loop :chords do
      tick
      
      a = 32
      use_synth knit(:dsaw,a, :dpulse,a, :saw,a, :dtri,a).look
      
      n1 = [:e2, :e4,:b4,:g3].look
      n2 = [:c2, :d4,:g4,:c3].look
      n3 = [:a2, :e4,:c4,:g3].look
      notes = knit(n1,32*2, n2,32, n3,32).look
      
      play notes, release: 0.125, pan: 0.5 if spread(3,7).look
      play notes+12, release: 0.125, pan: -0.5 if spread(5,7).look
      sleep 0.25
    end
    
    
    live_loop :bass do
      tick
      use_synth :saw
      
      n1 = [:e2, :e4,:b4,:g3].take(1).look
      n2 = [:c2, :d4,:g4,:c3].take(1).look
      n3 = [:a2, :e4,:c4,:g3].take(1).look
      notes = knit(n1,32*2/16, n2,32/16, n3,32/16).look
      
      play notes-12, release: 1, cutoff: 85
      sleep 4
    end
    
    
    live_loop :hihat do
      #stop
      use_synth :noise
      tick
      notes = [:c4].look
      play notes, release: 0.01, amp: range(0.1,0.6,step: 0.01).mirror.look
      sleep 0.25
    end
    
    
    live_loop :kick do
      sleep 3
      sample :bd_haus, amp: 2, cutoff: 85
      sleep 1
    end
    
    
    with_fx  :ixi_techno do
      with_fx :level, amp: 0.5 do
        
        live_loop :randomSamples do
          sleep 4
          sleep 2
          sample :glitch_robot1, beat_stretch: 12, rate: 8 # if one_in(2)
          sleep 4
          sample :glitch_robot2, beat_stretch: 8, rate: 2 if one_in(2)
          sleep 2
          sample :glitch_perc3, beat_stretch: 2, rate: 8 if one_in(2)
          sleep 4
          sample :glitch_perc5, beat_stretch: 8, rate: 2 if one_in(2)
          sleep 8
        end
        
      end
    end
    
    with_fx :ping_pong, mix: 0.4 do
      
      live_loop :highMelody do
        puts "##########################################################################"
        puts "##########################################################################"
        puts "##########################################################################"
        puts "##########################################################################"
        sleep 8
        16.times do
          tick
          use_synth :beep
          puts "#################################################"
          puts play ring(:g6, :fs5, :e6, nil).look, release: 0.125 if bools(1,1,0,0,1).look
          sleep 2
        end
      end
      
    end
    
  end
end


# Hydra code original
# https://hydra.ojack.xyz/?code=JTJGJTJGJTIwbGljZW5zZWQlMjB3aXRoJTIwQ0MlMjBCWS1OQy1TQSUyMDQuMCUyMGh0dHBzJTNBJTJGJTJGY3JlYXRpdmVjb21tb25zLm9yZyUyRmxpY2Vuc2VzJTJGYnktbmMtc2ElMkY0LjAlMkYlMEElMkYlMkYlMjAlMjJlZ2clMjBvZiUyMHRoZSUyMHBob2VuaXglMjIlMEElMkYlMkYlMjBBbGV4YW5kcmUlMjBSYW5nZWwlMEElMkYlMkYlMjB3d3cuYWxleGFuZHJlcmFuZ2VsLmFydC5iciUyRmh5ZHJhLmh0bWwlMEElMEFzcGVlZCUzRDEuMiUwQXNoYXBlKDk5JTJDLjE1JTJDLjUpLmNvbG9yKDAlMkMxJTJDMiklMEElMEEuZGlmZiglMjBzaGFwZSgyNDAlMkMuNSUyQzApLnNjcm9sbFgoLjA1KS5yb3RhdGUoJTIwKCklM0QlM0V0aW1lJTJGMTAlMjApLmNvbG9yKDElMkMwJTJDLjc1KSUyMCklMEEuZGlmZiglMjBzaGFwZSg5OSUyQy40JTJDLjAwMikuc2Nyb2xsWCguMTApLnJvdGF0ZSglMjAoKSUzRCUzRXRpbWUlMkYyMCUyMCkuY29sb3IoMSUyQzAlMkMuNzUpJTIwKSUwQS5kaWZmKCUyMHNoYXBlKDk5JTJDLjMlMkMuMDAyKS5zY3JvbGxYKC4xNSkucm90YXRlKCUyMCgpJTNEJTNFdGltZSUyRjMwJTIwKS5jb2xvcigxJTJDMCUyQy43NSklMjApJTBBLmRpZmYoJTIwc2hhcGUoOTklMkMuMiUyQy4wMDIpLnNjcm9sbFgoLjIwKS5yb3RhdGUoJTIwKCklM0QlM0V0aW1lJTJ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