Not sure if I should ask this on github considering I’m using Beta versions, but wanted to make sure I wasn’t missing something in how Sonic Pi operates in general.
I’m doing pretty basic stuff with a bunch of live_loop blocks. Playing external samples and synths etc. However, it seems that the only way some of the parameters take (including commenting out blocks in general) doesn’t actually update unless I fully stop and then run again, which of course breaks the timing.
I imagine that running threaded loops is still going on and takes time to clear out, but it seems like they just keep going regardless until I actually stop and restart. Seems mostly to happen using a with_fx block more than samples or synths, but again even commenting out huge parts of the files keep stuff running for seeming eternity.
The code:
sroot = "/home/hypostatic/music/samples/"
samples = sample_paths sroot + "_MM - Field Recordings/Andrei's Bell/"
load_samples sroot + "Cult of Montu/_Ideas/_MM - Field Recordings/Andrei's Bell/"
use_debug false
use_bpm 70
with_fx :echo,
phase: rrand(0.1, 1),
decay: [1, 5].tick,
max_phase: 5,
mix: (range 0, 1, step: 0.1).choose,
amp: 1 do
live_loop :andrei do
s = sample samples.tick,
amp: [0, 1, 2, 3].choose,
slice: 3, num_slices: rrand(1, 5),
start: (range 0, 1, step: 0.1).tick,
finish: (range 1, 0, step: 0.1).tick,
lpf: (range 30, 100, step: 2).look,
release: (range 0, 1, step: 0.1).choose,
attack: (range 0, 1, step: 0.1).look,
slide: 2,
rate: rrand(0.1, 1)
sleep [1,0.25,2].tick
if one_in(1)
kill s
end
end
sleep 1
end
live_loop :ch do
sync [:ah, :andrei].tick
use_synth :fm
play scale(:D2, :minor_pentatonic).choose
sleep 0.25
use_synth :dtri
play scale(:D3, :minor).choose, attack: rrand(0.01, 1)
sleep [0.125, 0.25, 0.5, 3].choose
end
live_loop :beat do
if one_in(3)
sync :andrei
end
sample :ambi_soft_buzz, attack: rrand(0.01, 0.2)
sleep 3
end
live_loop :beat2 do
sync :ah
sample :bd_808, amp: 1, beat_stretch: [0.5, 4].tick
sleep [0.5, 0.25, 0.5].tick
end
live_loop :ah do
sync :beat2
use_synth :dull_bell
5.times do
play scale(:G3, :minor, num_octaves: 3).mirror.choose, sustain: rrand(0.1, 0.3)
sleep [0.25, 0.5, 0.75].choose
end
sleep 12
end
live_loop :kik do
use_synth :fm
play [:c2, :c3, scale(:c4, :egyptian).choose].tick
sleep [0.5, 0.25, 0.25, 1, 0.5, 2].tick
end
Commenting everything out but the last block still plays all of the above for well beyond say the first blocks loop. I’ve let it go for several minutes and doesn’t stop after commenting it out.
Probably some misunderstanding on my part.