Hi
I am working on a beat repeat/stutter sample playback function, using slice: within a loop. When I first launch SPi and run this it’s fine. But if I change some parameters (.look to .choose, or the num value) and rerun it, it plays a slice from the middle of the loop before settling down to the ‘normal’ or expected sequence. If you copy-paste and run this it should work ok, but does it go out of sequence if you change some values?
use_sample_bpm :loop_amen
rmp = line(0, 7, steps: 8, inclusive: true)
puts rmp
/use rmp.look, .choose, rmp[3], e.g./
live_loop :stutt1 do
tick_reset
num = 8
num.times do
tick
sample :loop_amen, slice: rmp.look, num_slices: num
sleep 1.0/num
end
end
PD-Pi