YT Evening walk part 2 + hydra video visuals

# 230114 2225 Evening walk part 2
# Saved 230114 2225
# YT https://youtu.be/pt5SLMXcsuk
# https://in-thread.sonic-pi.net/t/yt-evening-walk-part-2-hydra-video-visuals/7460
# Created by linktr.ee/relaxnow

live_loop :time, delay: 0.01 do
  sleep 1
end


use_bpm 80

with_fx :reverb, room: 0.7 do
  with_fx :krush do |krush|
    
    live_loop :bass, sync: :time do
      tick
      a = 16
      notes = knit(:f2,a, :fs2,a).look
      notes = knit(:f2,a, :ds2,a, :fs2,a, :cs2,a).look
      #notes = :f2
      #notes = :ds2 # :f2, :f#2 :as2 :as1 :cs2 :ds2
      #notes = :f2
      
      / bass voice 1 /
      use_synth :saw
      use_synth_defaults release: [0.2,0.3,0.6].choose, cutoff: [70,80,90,100].look
      play notes if bools(1,1,0,0).look
      
      / bass voice 2 /
      use_synth :sine
      use_synth_defaults release: 0.6
      play notes if bools(1,1,0,0).look
      
      / snare /
      puts amp = range(0.4,1,step: 0.01).look
      sample :sn_generic, finish: [0.04,0.06,0.08].choose, amp: amp if bools(0,0,1,0).look
      
      
      / fx control krush /
      my_krush = 1  # restart manually code to take effect if you change here
      b = 32#64
      my_krush = knit(0,b, 1,b, 0,b, 2,b).look  # auto switching different types of applying krush
      case my_krush
      when 0
        puts m = 0
      when 1
        puts m = range(0,0.7,step: 0.025).mirror.look
      when 2
        puts m = rrand(0,0.7)
      end
      control krush, mix: m
      
      
      sleep 0.5
    end
    
    
    / offbeat short notes /
    live_loop :offbeat, sync: :time do
      #stop
      tick
      use_synth :saw #:saw
      use_synth_defaults release: [0.1,0.2,0.4].choose, cutoff: [70,80,90,100].look-20
      notes = [:f4,:f4,:f4,:f4,:fs4, :f4,:f4,:f4,:f4,:c4, :f4,:f4,:f4,:f4,:fs4, :f4,:f4,:f4,:f4,:ds4,].look #nice
      #notes = [:f4,:f4,:f4,:f4,:fs4, :f4,:f4,:f4,:f4,:c4, :f4,:f4,:f4,:f4,:fs4, :f4,:f4,:f4,:f4,:ds4,].look+[0,0,12].choose #nice
      #notes = [:f4,:f4,:f4,:f4,:fs4, :f4,:f4,:f4,:f4,:c4, :f4,:f4,:f4,:f4,:fs4, :f4,:f4,:f4,:f4,:ds4,].look+[0,0,7,12].choose
      #         1           1             1           1            1             1           1
      
      offbeat = 2  # 1 & 2 nice
      c = 16
      d = 16
      offbeatselector = 2 # if manual change then restart code to avoid out of sync
      offbeatselector = knit(1,d, 2,d, 3,d, 4,d).look
      case offbeatselector
      when 0
        puts offbeat = knit(0,c).look
      when 1
        puts offbeat = knit(1,c).look
      when 2
        puts offbeat = knit(2,c).look
      when 3
        puts offbeat = knit(1,c, 2,c*2).look
      when 4
        puts offbeat = knit(1,c, 2,c*4, 0,c*2).look
      end
      
      
      
      / mute top here with offbeat = 0 /
      # NB might go out of sync since different sleep value
      #offbeat = 0  # mute top with offbeat = 0
      ##offbeat = 1  # slow offbeat top
      ##offbeat = 2  # fast offbeat top
      case offbeat
      when 0
        sleep 0.25
      when 1
        play notes if bools(1,0,0).look
        sleep 0.25
      when 2
        play notes if bools(1,0,0,0,1,0).look
        sleep 0.125
      end
      
      
    end
    
    
  end #end_krush
  
  / kick /
  live_loop :kick, sync: :time do
    sample :bd_fat, amp: 4
    sleep 3.5
    sample :bd_fat, amp: 2, rate: 4 if one_in(2)
    sleep 0.5
  end
  
end #end_reverb

# Hydra code
# https://hydra.ojack.xyz/?code=JTJGJTJGczAuaW5pdFNjcmVlbigxKSUwQSUyRiUyRnNyYyhzMCkucGl4ZWxhdGUoMTAwJTJDNTApLnRocmVzaCgwLjUpLm91dCgpJTBBc3JjKHMwKS5waXhlbGF0ZSg0NTAlMkMxNTApLnRocmVzaCgwLjIpLmNvbG9yKDElMkMwLjUlMkMwKS5vdXQobzApJTBBJTJGJTJGc3JjKHMwKS5waXhlbGF0ZSg1MCUyQzMwMCkudGhyZXNoKDAuMikub3V0KG8wKSUwQXNyYyhzMCkudGhyZXNoKDAuMDkpLm91dChvMSklMEFzcmMoczApLnRocmVzaCgwLjAzKS5jb2xvcmFtYSgxJTJDMCUyQzApLmx1bWEoMC4yKS5vdXQobzEpJTBBc3JjKG8wKS5ibGVuZChzcmMobzEpJTJDMSkuYWRkKHNyYyhvMyklMkMwLjEpLm91dChvMiklMEFzcmMoczApLnRocmVzaCgwLjAxKS5jb2xvcmFtYSgwJTJDMC4xNSUyQzEpLmRpZmYoc3JjKG8wKSUyQzAuNSkubHVtYSgwLjUpLm91dChvMyklMEFyZW5kZXIobzEp

Hydra Code in Chrome

//s0.initScreen(1)  // run this line 1 time to select video input from vlc
//src(s0).pixelate(100,50).thresh(0.5).out()
src(s0).pixelate(450,150).thresh(0.2).color(1,0.5,0).out(o0)
//src(s0).pixelate(50,300).thresh(0.2).out(o0)
src(s0).thresh(0.09).out(o1)
src(s0).thresh(0.03).colorama(1,0,0).luma(0.2).out(o1)
src(o0).blend(src(o1),1).add(src(o3),0.1).out(o2)
src(s0).thresh(0.01).colorama(0,0.15,1).diff(src(o0),0.5).luma(0.5).out(o3)
render(o1)
3 Likes