Sonic Pi jam with Hydra visuals
# 241023 2233 bpm 220 define RingVector Sonic Pi jam with Hydra visuals
# Saved 241023 2233
# https://youtu.be/I8ptpE7iw0A
# https://in-thread.sonic-pi.net/t/sonic-pi-jam-with-hydra-visuals/9269
/ /
class SonicPi::Core::RingVector # r() only works on s() - doesnt work on an array like [].r()
def r(n)
self.rotate(n)
end
end
define :s do |a,b|
spread(a,b)
end
set_volume! 2
use_bpm 55
with_fx :reverb, room: 0.8 do
/ chord like saw synth /
live_loop :a1 do
tick
density [1,2,1,1,2,1].choose do
p =16
use_synth :saw
use_synth_defaults release: [0.1,0.2,0.3,0.4].choose, cutoff: [70,80,90,100,110].choose+knit(20,p*4,-20,p*2,0,p*2).look, pan: rdist(0.25)
saw_case = 2
case saw_case
when 0
when 1
on s(7,12).look do
play :c3+[0,0,0,0,12].look-0
play :c4+[0,0,0,0,12].rotate(2).look+knit(0,p, -2,p, -4,p, -5,p).look
end
when 2
play :c3+[0,0,0,0,12].look-0
play :c4+[0,0,0,0,12].rotate(2).look+knit(0,p, -2,p, -4,p, -5,p).look
end
sleep 0.25
end
end
/ beep and prophet bass /
live_loop :a2 do
tick
use_synth :beep
play :c2, amp: 3 if s(1,11).look
p = 16
use_synth :prophet
use_synth_defaults cutoff: line(70,100,step: 5).mirror.look
play :c5+knit(0,p, -2,p, -4,p, -5,p).look, amp: 2 if s(1,11).r(5).look
sleep 0.25
end
/ quick snare and noise /
live_loop :a3 do
tick
density [2,2,2,1,2].look do
puts f = rrand(0.01,0.2)
s = :sn_generic
s = 'sn', rrand_i(0,3)
rp = [0,12,24].choose
sample s, finish: f, amp: [2,1,0.7,0.5].look+0.5, pan: rdist(0.5), rpitch: rp if s(rrand_i(3,4),5).look and (s(0,64)+s(64,64)).look
sleep 0.25
end
end
end
/ kick /
live_loop :kick do
tick
sample :bd_fat, amp: 4 if s(1,2).look and (s(0,32)+s(32,32)).ramp.look
sleep 0.25
end
# // https://youtu.be/U5Li6n_zKlE?feature=shared&t=452 by Naoto Hieda
# src(o0).modulateHue(src(o0).scale(1.01),1).layer(osc(10,.95,2).mask(shape(4,0.25,1e-6)).color(1,1,1,[0,1])).rotate(0.001,0.00001).out()
// https://youtu.be/U5Li6n_zKlE?feature=shared&t=452 by Naoto Hieda
src(o0).modulateHue(src(o0).scale(1.01),1).layer(osc(10,.95,2).mask(shape(4,0.25,1e-6)).color(1,1,1,[0,1])).rotate(0.001,0.00001).out()