# 230118 2232 evening walk part 3 YT and Hydra
# Saved 230118 2232
# Backup
# YT https://youtu.be/xV5KJ2P6w5I
# Created by linktr.ee/relaxnow
# https://in-thread.sonic-pi.net/t/yt-evening-walk-part-3-hydra-video-visuals-using-flok-cc-for-writing-hydra-code-on-other-screen/7474
live_loop :time, delay: 0.01 do
sleep 1
end
with_fx :reverb, room: 0.7 do
live_loop :main, sync: :time do
tick
/ top mel /
use_synth :beep
# puts amp = line(0,0.7,steps: 32).mirror.look
amp = knit(0.4,32, 0.4,32).look
use_synth_defaults release: [0.1,0.1,0.4].choose, amp: amp
top = 4 #3 # Change here
case top
when 0
when 1
play :c5 if bools(1,0,0, 1,0,0).look
when 2
play :c5 if bools(1,0,0, 1,0,0, 1,0,0, 1,1,0).look
when 3
play [:c5,:c5,:c5,:ds5,:ds5,:ds5,:g5,:g5,:g5].look if bools(1,1,1, 1,0,1).look
when 4
play [:c5,:c5,:c5,:ds5,:ds5,:ds5,:g5,:g5,:g5].look, pan: 0.5 if bools(1,1,1, 1,0,1).look
play [:c5,:c5,:c5,:ds5,:ds5,:ds5,:g5,:g5,:g5].look-12, pan: -0.5 if bools(1,1,1, 1,0,1).rotate(1).look
end
/ bass /
use_synth :saw
cur = 32
puts cu = knit(60,cur, 70,cur, 80,cur).look #60
use_synth_defaults release: [0.1,0.1,0.5].choose, cutoff: [130,cu,cu,cu,cu].look
bass = 4 #3 # Change here
case bass
when 0
when 1
play :c2, amp: [2,1,1,1,1].look if spread(3,5).tick
when 2
play knit(:c2,48, :as2,16).look, amp: [2,0,0.5,0,1].look if spread(3,5).tick #nice
when 3
play knit(:c2,48, :as2,16, :g2,48, :gs2,16).look+12, amp: [2,0,0.5,0,1].look if spread(5,7).tick
when 4
play knit(:c2,48, :as2,16).look, amp: [2,0,0.5,0,1].look if spread(3,5).tick
play knit(:c2,48, :as2,16, :g2,48, :gs2,16).look+12, amp: [2,0,0.5,0,1].look if spread(5,7).tick
end
/ kick /
drum = 1 # Change here
case drum
when 0
when 1
sample :bd_haus, cutoff: 80, amp: 3 if bools(1,0,0,0,0, 0,0,0,0,0,0).look #11
end
sleep 0.25
end
with_fx :krush do |krush|
live_loop :hithatnoise do
tick
bs = line(0.1,0.4,steps: 32).look
sample [135,145,135,135,146].look, rpitch: [0,0,12].choose, beat_stretch: bs # mute here with #
sleep 0.25
m = [0,0.5,0.9].look
control krush, mix: m
end
end #end_krush
end #end_reverb
# -----------------------------------------------
# Hydra setup with two Chrome browsers A and B.
# to show visuals and hide code in browser A
# and see/write code in browser B on another screen
# Tool https://flok.cc/
#
# Hydra code (remove # when using in hydra)
# //s0.initScreen(1)
# src(s0).modulate(noise(1,time%0.25+0,1)).thresh(0.05).scale(1.2).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.01).colorama(1,0.5,0).luma(0.1).out(o1)
# src(o0).diff(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.4).out(o3)
# render(o3)
#
# // CTRL+ENTER in flok = run
Hydra code
//s0.initScreen(1)
src(s0).modulate(noise(1,time%0.25+0,1)).thresh(0.05).scale(1.2).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.01).colorama(1,0.5,0).luma(0.1).out(o1)
src(o0).diff(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.4).out(o3)
render(o3)
// CTRL+ENTER in flok = run
Hydra setup with two Chrome browsers A and B
to show visuals and hide code in browser A
and see/write code in browser B on another screen
Tool https://flok.cc/
Create a “Hydra” session
Enter with 2 users in two Chrome browsers.
On “A” hide code with CTRL+SHIFT+h. A show only visuals
On “B” you can see and write in code. B show code that control visuals on A and B