230605 Live coding with Sonic pi og Hydra (YT live stream)

Testing out how to live stream with OBS on YouTube


# 230605 0004 Live coding with Sonic pi og Hydra (YT live stream)
#  https://www.youtube.com/live/-5Sm8OgEKX4?t=110


# If you don't try then you have already failed

/ From scratch + nothing planned /


use_bpm 45

with_fx :krush, mix: 0 do |krush|
  with_fx :ixi_techno, phase: 16, mix: 0 do |ixi|
    with_fx :reverb, room: 0.7 do
      
      
      
      live_loop :a1 do
        tick
        
        i = [0,0.2,0.4,0.6].choose
        k = 0
        control ixi, mix: i
        control krush, mix: k
        
        use_synth :saw
        use_synth_defaults release: [0.05,0.1,0.2].choose, cutoff: [60,70,80,100].choose
        root = :c2
        bassn = knit(0,16, -2,16, 0,8, 3,8)
        p = spread(3,5)
        p1 = spread(3,5)
        p2 = spread(5,7)
        n = [0,-2,0,-2,-7,3,7]
             play root+bassn.look if p.look
             play root+12+12+n.look if p2.look
        n = [0,2,3,-2,5,0,12]
             play root+12+12+n.reverse.look if p1.look
        
        drum = 2
        case drum
        when 0
        when 1
          sample :bd_haus, cutoff: 70, amp: 1.8 if bools(1,0,0,0).look
        when 2
          sample :bd_haus, cutoff: 70, amp: 1.5 if (bools(1,0,0,0)*3+bools(1,0,0,1)).look
        end
        
        sleep 0.125
      end
    end
  end
end

Hydra webcam on keyboard with blue color

s0.initCam() 
src(s0).luma(0.4).thresh(0.2).pixelate(100,100).blend(o0,0.8).scale(1.04).color(0,0,1).out()