# 230114 0052 evening walk with organ_tonewheel YT Hydra
# saved 230114 0052
# YT https://youtu.be/FDOp7IBaSRs
# https://in-thread.sonic-pi.net/t/evening-walk-with-organ-tonewheel-yt-hydra-video-visuals/7457
# Created by https://linktr.ee/relaxnow
use_bpm 140
set_volume! 1
live_loop :time, delay: 0.01 do
#sample :elec_tick, rate: 2
sleep 1
end
with_fx :reverb, room: 0.8 do # 0.8
live_loop :evening_walk, sync: :time do
tick
/ change here /
bass = 5 # 5 1 2 5
# 0-5
# # 1 nice
# # 5 main riff nice
use_synth :bass_foundation # horn light
use_synth :organ_tonewheel # deep and wide
case bass
when 0
sleep [8*4].look
when 1
4.times do
use_synth [:bass_foundation, :organ_tonewheel, :organ_tonewheel].look
notes = [:f2].look
c = range(50,80,step: 2).mirror.look
play notes, cutoff: c
use_synth :beep
play notes+24
sleep [8].look
end
when 2
2.times do
use_synth [:organ_tonewheel].look
a = 2
notes = knit(:f2,a, :ds2, a).look
c = range(50,80,step: 2).mirror.look
play notes, cutoff: c
use_synth :beep
play notes+24
sleep [8].look
end
when 3
notes = [:f2,:f2,:c3, :f3,:f3,:c3].look
c = range(50,80,step: 2).mirror.look
play notes, cutoff: c
use_synth :beep
play notes+24
sleep [2,1,5, 2,1,5].look
/ riff 4 with :bass_foundation /
when 4
use_synth :bass_foundation # horn light
notes = [:f2,:f2,:c3, :f3,:f3,:c3, :as2,:c3,:cs3, :cs3,:as2, :c3,:as2,:gs2,:f2].look
c = range(50,80,step: 2).mirror.look
play notes, cutoff: c
use_synth :beep
play notes+24
sleep [2,1,5, 2,1,4, 0.5,0.5,2,1,5, 1,1,1,5].look
/ riff 4 with :organ_tonewheel /
when 5
use_synth :organ_tonewheel # deep and wide
notes = [:f2,:f2,:c3, :f3,:f3,:c3, :as2,:c3,:cs3, :cs3,:as2, :c3,:as2,:gs2,:f2].look
c = range(50,80,step: 2).mirror.look
play notes, cutoff: c
use_synth :beep
play notes+24, amp: 0.5
sleep [2,1,5, 2,1,4, 0.5,0.5,2,1,5, 1,1,1,5].look
end
end
/ kick /
live_loop :kick, sync: :time do
tick
sample :bd_fat, amp: [2,1,1,1,1].look if spread(3,5).look
sleep 1
end
/ noisy chopped sweep /
live_loop :noise1, sync: :time do
tick
use_synth :noise
cr = [70,80,90].choose + range(-30,0,steps: 0.125).reflect.look
use_synth_defaults release: [0.01,0.02,0.04].choose, cutoff: cr
n = [-12,5,-3,12,0, 0,0,0,0,0]
# n = [0,12]
play :c2+n.look, amp: [2,2,3].choose, pan: rdist(1)
sleep 0.5
end
end #end reverb
live_loop :offbeat, sync: :time do
# stop
tick
use_synth :beep #:saw :piano :tri :pluck :beep(nice)
# use_synth [:pluck,:saw,:tri].choose
amp = 0.5
amp = 0
r1 = 16 #16 #64
r2 = 2
r1 = knit(16,r2, 32, r2, 64,r2).look
amp = knit(0,r1,0.5,r1).look
amprep =16*4 #40
#puts amp = knit(0, amprep/5,0.125,amprep, 0.25,amprep,0.5,amprep).look
use_synth_defaults release: [0.1,0.2,0.4].choose-0.02, cutoff: [70,75,80,85,90].choose, pan: rdist(0.5), amp: amp
a = 5 #5nice 1 2 3 7 64
offbeat = 2 # 2nice #1
case offbeat
when 0
when 1
play knit(:f4,a, :gs4,a, :as4,a, :c5,a ).look if bools(1,0,0,0,0,0).look
when 2
play knit(:f4,a, :gs4,a, :as4,a, :c5,a ).look if bools(1,0,0,0,0,0).look
play knit(:f4,a, :gs4,a, :as4,a, :c5,a ).look+12 if bools(0,0,1,0,0,0).look
when 3
play knit(:f4,a, :gs4,a, :as4,a, :c5,a ).look if bools(1,0,0,0,0,0).look
play knit(:f4,a, :gs4,a, :as4,a, :c5,a ).look+12 if bools(0,0,1,0,1,0).look
when 4 #:saw
play knit(:f4,a, :gs4,a, :as4,a, :c5,a ).look if bools(1,0,0,0,0,0).look
play knit(:f4,a, :gs4,a, :as4,a, :c5,a ).look+12 if bools(0,0,0,0,1,1).look
end
sleep 0.25
end
# Hydra code
# https://hydra.ojack.xyz/?code=JTJGJTJGczAuaW5pdFNjcmVlbigxKSUwQSUyRiUyRnNyYyhzMCkucGl4ZWxhdGUoMTAwJTJDNTApLnRocmVzaCgwLjUpLm91dCgpJTBBc3JjKHMwKS5waXhlbGF0ZSgxNTAlMkM1MCkudGhyZXNoKDAuMikuY29sb3IoMSUyQzAlMkMwKS5vdXQobzApJTBBJTJGJTJGc3JjKHMwKS5waXhlbGF0ZSg1MCUyQzMwMCkudGhyZXNoKDAuMikub3V0KG8wKSUwQSUyRiUyRnNyYyhzMCkudGhyZXNoKDAuMDEpLmNvbG9yYW1hKDElMkMwJTJDMCkub3V0KG8xKSUwQXNyYyhzMCkudGhyZXNoKDAuMDMpLmNvbG9yYW1hKDElMkMwJTJDMCkuaW52ZXJ0KCkubHVtYSgwLjIpLm91dChvMSklMEFzcmMobzApLmJsZW5kKHNyYyhvMSkpLm91dChvMiklMEFzcmMoczApLnRocmVzaCgwLjAxKS5jb2xvcmFtYSgwJTJDMC4xNSUyQzEpLmFkZChzcmMobzApJTJDMC41KS5sdW1hKDAuNSkub3V0KG8zKSUwQXJlbmRlcigp
loveley creation!!
How did you do the hydra?
Live or with a recording?
And how(device, opsys) if live?
Thanks
PS: just the sp code tastes a little italian
How did you do the Hydra?
If we look at the hydra code from this YT Evening walk part 2 + hydra video visuals
Play a video of something you have recorded with your phone with vlc player on the computer.
Open Chrome on https://hydra.ojack.xyz/
s0.initScreen() // run this line 1 time to select video input from vlc
src(s0).out()
Run CTRL+ENTER or CTRL+SHIFT+ENTER
uncomment first line
//s0.initScreen(1) // run this line 1 time to select video input from vlc
src(s0).out() // this line shows the video from vlc in Chrome
Run CTRL+ENTER
Fullscreen vlc and Chrome. Then you have a video background for Sonic Pi.
You can hide/show Hydra code with CTRL+SHIFT+h
Be creative in hydra.
A hydra code could look like this
//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)
You select what to show with render()
render() // shows all 4 outputs
render(o0) // show output 1
render(o1) // show output 2
render(o2) // show output 3
render(o3) // show output 4
You can chose which output with “.out(o0)”
src(s0).out(o0) // this line shows the video in Chrome in output o0
In my Sonic Pi code I usually add the hydra code. Looks like this
# Hydra code
# https://hydra.ojack.xyz/?code=JTJGJTJGczAuaW5pdFNjcmVlbigxKSUwQSUyRiUyRnNyYyhzMCkucGl4ZWxhdGUoMTAwJTJDNTApLnRocmVzaCgwLjUpLm91dCgpJTBBc3JjKHMwKS5waXhlbGF0ZSg0NTAlMkMxNTApLnRocmVzaCgwLjIpLmNvbG9yKDElMkMwLjUlMkMwKS5vdXQobzApJTBBJTJGJTJGc3JjKHMwKS5waXhlbGF0ZSg1MCUyQzMwMCkudGhyZXNoKDAuMikub3V0KG8wKSUwQXNyYyhzMCkudGhyZXNoKDAuMDkpLm91dChvMSklMEFzcmMoczApLnRocmVzaCgwLjAzKS5jb2xvcmFtYSgxJTJDMCUyQzApLmx1bWEoMC4yKS5vdXQobzEpJTBBc3JjKG8wKS5ibGVuZChzcmMobzEpJTJDMSkuYWRkKHNyYyhvMyklMkMwLjEpLm91dChvMiklMEFzcmMoczApLnRocmVzaCgwLjAxKS5jb2xvcmFtYSgwJTJDMC4xNSUyQzEpLmRpZmYoc3JjKG8wKSUyQzAuNSkubHVtYSgwLjUpLm91dChvMyklMEFyZW5kZXIobzEp
I like the Sonic Pi editor so this time I used Hydra in Chrome browser.
You could also use Atom with the Sonic Pi plugin. Then you can make a setup like this which is really nice visually and you dont have to ALT+TAB. Here you have Sonic Pi open in the background and send Sonic pi code from Atom with ALT+r like you usually would. Remember to choose “Sonic Pi” as language in Atom, so you get the Sonic Pi code snippets like ll+TAB for live_loop
I have tried to gather what I know of hydra in some Google Docs, which you can find here @relaxnow | Linktree
Thanks for these great resources on Hydra.
Naoto har some really nice tutorials on Hydra aswell
Hydra Tutorials from Naoto Hieda
Can’t get this to work on MacOS Monterey (12.7.4). In Chrome, when I ran src.initScreen it doesn’t do anything. I tried to input VLC on the Hydra page by enabling Window Management in the settings, but when I select VLC as the window to share with it still doesn’t work. Not sure what to try next.