# 231123 0027 exploring define with spread
# Saved 231123 0027
# https://youtu.be/USOvqXtbcnA
# https://in-thread.sonic-pi.net/t/exploring-define-with-spread-sonicpi/8387
set_volume! 2
use_bpm 180
define :myspread do |n1,n2,a,b,c|
play n1 if spread(a,b).look
play n2 if spread(a,b+c).look
end
#define :myspreadsample do |n1,n2,a,b,c| # not used
#sample n1, amp: 0.7, cutoff: 86 if spread(a,b).look
#sample n2 if spread(a,b+c).look
#end
live_loop :a1 do
tick
/ bass /
kn = 16
use_synth_defaults release: [0.15,0.25,0.35].choose, cutoff: [70,80,90,100].look+line(-40,20,steps: 128).look
use_synth :saw
n3 = :c2
myspread(n3,n3+24,5,8,1)
/ kick /
sample :bd_fat, amp: 1 if spread(1,16).look
sample :bd_fat, amp: 2.5 if spread(1,16).rotate(2).look
/ chords /
with_fx :level, amp: 0.75 do
with_fx :reverb,room: 0.4 do
with_fx :ping_pong, mix: [0,1].choose do
sample :sn_dolf,amp: 1, finish: 0.045 if spread([1,2,1,3].choose,8).rotate(4).look and one_in(2)
use_synth :saw
mel =knit(0,16,1,16,2,16,3,16,4,16,1,16).look
note = :c5-0
case mel
when 0
when 1
play [note]
when 2
play [note,note+7]
when 3
play [note,note+3]
when 4
play [note-2,note+5]
end
end
end
end
sleep 0.5
end
2 Likes