Some idea how to stop envgen?
I would like it to stop when I release a key before It reaches the end of the duration. A kind of reset.
I would aprecaite any clue... Thanks,
x.x
Stop envgen
Some idea how to stop envgen?
I would like it to stop when I release a key before It reaches the end of the duration. A kind of reset.
I would aprecaite any clue... Thanks,
x.x
are you running envgen to a [line] or a [line~] object?
if you're going to a [line~], then change that to [line 0 1], which gives you control rate line object which updates every millisecond.
just put a [spigot] after the output of [line],
send a 0 to the right inlet of [spigot] to stop any more data flow, and send a 1 when you trigger a new note to open it up again.
then, if you need to go back to audio rate, just add [lop~ 1000] to smooth the steps out.
That works!
It is a pity envgen doesn´t include a restart message.
Anyway it is running for me...
Thanks mod
x.x
@mod said:
then, if you need to go back to audio rate, just add [lop~ 1000] to smooth the steps out.
That's actually not such a great idea if you want the best quality. The time constant of a first order lowpass at 1000 Hz isn't enough to really smooth out the steps, and reducing the cutoff frequency until the output is smooth would slow the transients. 1000 Hz is pretty fast compared to what was used in a lot of analog polysynths, but it still results in an unnecessary drop in quality (admittedly this is something I obsess about to an unhealthy degree). It would be better (equivalent to the original envgen~ output) to use another [line~] to do the smoothing. But that seems like a waste of CPU time, and slowing down the [line 0 1] rate too much would result in timing errors.
Would something with a [samphold~] work better?
yeah, i thought about samphold~ too. for signals, that's maybe the best way
Oops! Looks like something went wrong!