the adsr~ retrigger function with function~ ?

    Jun 05 2014 | 10:35 pm
    I tried to use the function~ object as an adsr~ object to both add curves and to have a visual representation of the envelope. And it's done!
    But I have a "little" problem : How to have the retrigger function of the adsr~ object on the function~ object? How to restart the envelope when a second note is played before the end of the first?
    To be clear, here a part of the help file of the adsr~ object : "adsr~'s retrigger function ensures click-free operation when another note-on arrives before adsr~ is ready. When this happens, adsr~ quickly ramps to 0, allowing sound parameters to be changed, then it triggers the new envelope."
    Do you know how to do this with function~ ?
    In send you my patch in attachment.
    Thank you for your help.

    • Jun 07 2014 | 8:09 am
      Nobody? It would be helpful. The patch is almost finished, there is "just" this point to fix!
    • Jun 07 2014 | 7:50 pm
      1 - a note on triggers the envelop of function~ until the sustain point 2 - a note off allows to go from the sustain point until the end of the envelop
      So, two bangs : 1-note on , 2-note off, 1-note on , 2-note off, etc...
      But if a second note is triggers before the end of the first, function~ "doesn't understand" and take the note on of the second note as the note off of the first.
      Do you know how to fix that? adsr~ object does that, what about function~?
      Please, may be it is obvious, but I don't know how to do that... Thanks
    • Jun 08 2014 | 3:44 am
      Done. May be it's not the best way, but it seems to work. In attachment the patch, if it can help someone.