# 240924 2332 Two functions prepared and from scratch session 01
# That is it for now. Thank you for watching
# Saved 240924 2332
# Created by https://linktr.ee/relaxnow aka livecodingdk on youtube
# https://youtu.be/3RKwAllxrRU
# https://in-thread.sonic-pi.net/t/two-functions-prepared-and-from-scratch-session-01/9217
set_volume! 2
class SonicPi::Core::RingVector
def r(n)
self.rotate(n)
end
end
define :s do |a,b|
spread(a,b)
end
live_loop :b1 do
tick
sample :bd_haus, cutoff: 70, amp: 4 if s(1,16).look
sample :bd_haus, cutoff: 70, amp: 3 if s(1,16).r(3).look
sample :bd_haus, cutoff: 110, amp: 3 if s(1,16).r(7).look
sample :bd_haus, cutoff: 90, amp: 3 if s(1,16).r(11).look
density [1,1,2].look do
density [1,2,1,1,4,1].look do
sample :sn_generic, finish: [0.01,0.02,0.03].choose, cutoff: 110, amp: 3, rpitch: [0,12,-12].choose, pan: rdist(0.8) if s(7,16).r(11).look
sleep 0.25
end
end
end
#with_fx :krush, mix: 0.6,res: 0.2 do
with_fx :reverb, room: 0.4 do
live_loop :a1 do
tick
sample :bd_fat, amp: 2 if (s(1,7)*3+s(4,7).r(2)).look
sample :bd_fat, amp: 2, rpitch: 24 if (s(3,7).r(3)*3+s(4,7).r(4)).look
sample :bd_fat, amp: 2, rpitch: 24+12 if (s(2,7).r(1)*5+s(6,7).r(2)).look
sleep 0.25
end
with_fx :ping_pong do
live_loop :a2 do
tick
sample :elec_tick, rpitch: 12, pan: rdist(0.5) if s(4,15).look
use_synth :prophet
use_synth_defaults cutoff: [60,70,80,90].choose, amp: 1.5, release: 3, attack: 1.5
play :c1 if s(1,7*3).look
use_synth :beep
use_synth_defaults amp: 0.75
a = 12
play :c5+knit(0,a, -2,a, -2,a, -5,a, -12,a).look if s(1,12).r(5).look
use_synth_defaults amp: 0.5, release: 0.2
play :c5+knit(0,a, -2,a, -2,a, -5,a, -12,a).look+12 if s(1,9).r(2).look
sleep 0.25
end
end
end
#end
Live coding gives us a valuable glimpse into the mind and creative approach of the composer! Thanks for sharing.
PD_Pi
1 Like