I’ve gotten the first bit of functionality down, minus an issue with levels, which you can reproduce with the code below:
-- K3 invert level
level = 1.0
function key(n,z)
if z == 1 then
if n == 3 then
level = 1.0 - level
softcut.level(1, level)
end
end
end
function init()
file = _path.code .. "nc01-drone/lib/eb.wav"
softcut.buffer_read_mono(file, 0, 0, -1, 1, 1)
softcut.enable(1, 1)
softcut.buffer(1, 1)
softcut.loop(1, 1)
softcut.loop_start(1, 0)
softcut.loop_end(1, 3)
softcut.position(1,1)
softcut.rate(1, 1.0)
softcut.level_slew_time(1, 10.0)
softcut.level(1, 0.0)
softcut.play(1, 1)
softcut.level(1, level)
end
When the above script starts, it starts playing at full blast - I was expecting it to ramp up.
I then press K3, and get the 10-second slope until sound goes out, as I expected. Pressing K3 again, however, takes it straight back to 1.0, no slewing.
Is this the expected behaviour, or am I overlooking something obvious?