Hi there,
as a (slightly boring, but anyway doable) form of intro for some live coding, I’d like to have a synth play a single note for a looong time.
With a large value for release or sustain, this is easily doable of course:
synth :prophet, note: :e1, sustain: 10000
However, I’d like to be able to control this synth somehow, after it’s been started mostly so I can turn it off at some point. Easy, in theory, with control
.
But if I start the synth and don’t want to restart it the time I reevaluate my code, I need to put it in a live_loop
, right? And at that moment I need the live_loop
to sleep.
Of course I can set the value for sleep to a high value too, but then the loop is not restarted for the amount of the sleep and I therefore my code changes with which I want to control the synth are not applied.
I tried putting the control node into the time state and get it out in a different loop, but even though the value was defined, controlling it didn’t change the sound.
live_loop :sing do
n = play 40, sustain: 10000
set :n, n
sleep 10000
end
live_loop :sing_control do
sleep 10
n = get[:n]
co = ring 70, 90
20.times do
control n, cutoff: co.tick, cutoff_slide: 2
sleep 2
end
end
Anyone got any other ideas or hints?