Re: [Qutecsound-users] Button and ADSR
Brought to you by:
mantaraya36
From: Jim A. <mid...@sb...> - 2014-03-24 17:16:53
|
On 3/24/2014 9:54 AM, Gpp wrote: > Thank you. > The main issue is that once triggered the note doesn't stop, while I thought > its duration would have been the sum of Attack - Decay - Sustain - Release. > I have tried with madsr as well but it still needs an extra button's pushing > in order to stop the note. That's correct. The sustain parameter of an ADSR is not a time value, it's a level value, and by definition the envelope sustains at that level until some condition is met. With a note that has a negative p3, that condition will never be met. If you want the note to stop after some specific time, an ADSR is not the right envelope. Look at linseg. It takes a series of values that alternate between times and levels. If the last level is 0, the envelope will end. However, the _note_ will still be active -- you just won't hear anything (assuming the linseg is controlling amplitude). If you need to shut off the note, you'll still have to do something slightly different. --JA |