ADSR working only on one oscillator on retrigger


    Mar 18 2016 | 1:55 am
    Hi community --
    I'm working on an additive poly synth. The additive part is based on 10 [cycle~] objects operating in parallel based on the overtone series (1/1, 1/2, 1/3, 1/4, etc.) and having their frequencies relative to each other stretched by some factor between 1 (no stretching) and 1.125 (a more or less arbitrary upper limit based on how it sounds). The amplitude of each [cycle~] object is determined by its place in the overtone series -- again, 1/1, 1/2, 1/3, 1/4, etc. In other words, unstretched, they sum to a low-overtone sawtooth wave. The stretching gives the timbre a bell-like quality.
    So: this synth is setup in a subsynth in a [poly~] object. The ADSR is in the subsynth and set by arguments to [adsr~ 10 2000 0. 0], again, with the intention of making a bell-like profile. My problem is that when a note is triggered before the 2 sec. decay is over, the new trigger only activates the fundamental in the additive synth. For example, if I hit a Bb and then an A, the Bb trigger initiates all 10 oscillators, but the A only triggers the 220Hz, so it sounds kind of "bong-thumm," rather than "bong-bong."
    I feel like I'm making a rookie mistake in here somewhere (which would be appropriate as I am decidedly not a programmer and relatively new to this), but I've sorted through all I can think of. I've pasted the patch below; I'd be grateful for any suggestions (including those not related to this question) that you might have.
    Thanks! DNL

    • Mar 20 2016 | 10:00 pm
      In the process of continuing to troubleshoot this, I've modified the patch considerably. Here is the updated version:
      One thing I've discovered is that what I thought it was doing is not actually what it's doing: it's not the fundamental that sounds with a retrigger -- I don't know where the oscillation is coming from but it's not the fundamental [cycle~] object. If you hit the same key repeatedly, it doesn't always play the same pitch; at first it plays what sound like random notes, then increasingly begins to repeats the same note. I've watched the input for the fundamental [cycle~] object and it responds the same way the [cycle~] objects for the partials respond, only once the [adsr~] envelope has completed its cycle.
      So, there are now two problems to solve here: first how can I get a set up so that I can retrigger an envelope before it's complete and, second, what is the source of this other sound? The former I will continue to work on (going back to look at some other implementations of [poly~] that use [line~] instead of [adsr~], for one) in the hopes that fixing it will resolve the latter, but I'd be grateful for any guidance you all can provide.
    • Mar 21 2016 | 8:39 am
      Hi!
      Please post the poly~ patcher as well and i'll take look!
      Best, c
    • Mar 21 2016 | 12:45 pm
      Thanks, c!
      Here are the contents of the [poly~] object:
      The patchers in the previous posts contain this, of course, for context, if that's helpful. I appreciate your willingness to take a look!
      DNL
    • Mar 25 2016 | 4:16 pm
      Maybe setting the note stealing attribute with @steal 1? Like: