1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

The decay time

Discussion in 'Building With Reaktor' started by gorgoglionemeister, Mar 15, 2008.

Thread Status:
Not open for further replies.
  1. gorgoglionemeister

    gorgoglionemeister Forum Member

    Messages:
    39
    What's the decay time? I set the D input of the ADSR - Env module to 0 (1 ms) but the signal doesn't go from the peak to 0 in 1 ms... Thanks. Antonio
     
  2. CList

    CList Moderator

    Messages:
    3,299
    Read "The Maths Sticky" thread at the top of the forum, I have a post in there about envelope times.

    - Chris
     
  3. herw

    herw NI Product Owner

    Messages:
    6,421
    i am just working on new envelope modules in core. The ADSR module is very (!) tricky constructed (cookiemonster (Gerald List) and i have analysed it last weekend five hours) and there is no more secret now.
    The decay time is as CList mentioned endless in the sence of reaching sustain level. The decay algorithm of the ADSR core cell reaches 1/8 of the difference between the velocity level and the sustain level in the choosen decay "time".
    I am working on another time management. The new algorithm calculates the factor of an exponential function which decreases from 101% down to 1% within the decay time. On the output i have only to subtract 1% and that's it.
    The picture demonstrates an example of the new algorithm: the level decreases from 1 to sustain level 0.5 in 10 seconds (R=80). I have choosen here the release phase to start the algorithm. The grid steps of the audio table are normed to one second.
    I have added another picture with an exponential attack phase.
     

    Attached Files:

    Last edited: Mar 25, 2008
  4. Horuschild

    Horuschild NI Product Owner

    Messages:
    1,635
    It would be great if there could be some control over the sustain time like in the Access Virus envelopes. I have looked endlessly in the Core ADSR but I don't understand it and would not know how to mod it for that.
     
  5. CList

    CList Moderator

    Messages:
    3,299
    I forget how the virus env. works. Is that basically a hold time for an ADHR?

    CList
     
  6. herw

    herw NI Product Owner

    Messages:
    6,421
    let me hear your suggestions. I am working on several envelope core modules.
    NIs module is mathematically not perfect but there are several interesting tricks mainly using bit-logic and common memories.
    The nomenclature of inputs, outputs, macros and memories is terrible and mistakable.

    my road map is:
    • D (decay)
    • AD (attack-decay)
    • AR (attack-release)
    • ADSR
    • ...
    every phase with negative, positive curvature and linear curve and end-of-phase clocks.
     
    Last edited: Mar 25, 2008
  7. Horuschild

    Horuschild NI Product Owner

    Messages:
    1,635

    Its a slope. I don't really know how to describe it in a tech sense but I can certainly hear it when I use the virus. I'll hook it up latter and make some samples.

    This is the description from the manual, they are more likely to describe it better then I.
     
    Last edited: Apr 19, 2008
  8. CList

    CList Moderator

    Messages:
    3,299
    Ah, so the sustain phase is a linear ramp based on that "slope" value and some time constant. Is there a 5th knob for the ADSR for setting that slope value? (ADS Slope R)

    Note that from the picture and the way it's described (as linear);
    if you have a "sustain slope" of -10, the sustain will go to 0 sooner if the sustain level is low than when it's high (as opposed to the exponential release phase which will always take the same amount of time to decay regardless of the sustain level). This also means that the output can actually go to 0, which the release will take a really long time to do.

    It should be fairly easy to add it as a new phase to the core existing adsr (once you understand the existing ADSR), I'd do it now, but I have to run...

    Cheers,
    C
     
  9. herw

    herw NI Product Owner

    Messages:
    6,421
    adding a sustain slope is nearly like using the attack phase with actual output level and negativ "b" (see latch output). Latch output "a" has to be set to 1.
     
  10. ehdyn

    ehdyn NI Product Owner

    Messages:
    547
    Any chance you could share this, or explain how to implement?

    The Zobel envelope from let's say "Cloud#9" would be greatly enhanced with this. I use those very often.
     
  11. herw

    herw NI Product Owner

    Messages:
    6,421
    i am working on it and i will share when it is done.
     
  12. ehdyn

    ehdyn NI Product Owner

    Messages:
    547
    Wow, that's extremely generous of you to share your work!

    The envelopes are one of the weakest links in Reaktor.
    The graphic you posted looks like it's just the thing to get a more natural and modern response from some of my favorite instruments.

    Greatly appreciated!
     
  13. herw

    herw NI Product Owner

    Messages:
    6,421
    explaining is very difficult :eek:

    second attachment is the formula for a decraesing decay function (positive curvature).
    v is velocityOn, D are the sample ticks for the decay time, t is the momentan sample tick. The silly exponential basis is build in the macro x (first attachment).
     

    Attached Files:

  14. ehdyn

    ehdyn NI Product Owner

    Messages:
    547
    Very nice to see it demonstrated so clearly.
    I'll have to study this tonight.

    Are you planning to offer adjustable slope curvature?
     
  15. theologiae

    theologiae NI Product Owner

    Messages:
    652
    thanks for all the info......as i hide in the corners.
     
  16. herw

    herw NI Product Owner

    Messages:
    6,421
    It is possible - but be patient it is not a project of hours, days or weeks because i'll publish only when it is 100% bugfree.
    In the meantime you can use the normal ADSR from primary or Core. The Core-macro is very flexible: f.i. try modulating the time coefficients or modulating the gate sensitivity (not only 0 or 1).
    Or download the REAL TIME ENVELOPE or the PROGRAMMABLE ENVELOPE
     
    Last edited: Mar 27, 2008
  17. herw

    herw NI Product Owner

    Messages:
    6,421
    :)
     

    Attached Files:

  18. ehdyn

    ehdyn NI Product Owner

    Messages:
    547
    That positive curve looks exactly as I was hoping.
    Can't wait to see it billowing in and out per "x".

    I'm saving up my foolish questions for later;)

    Good work Mr. Krass!
     
  19. herw

    herw NI Product Owner

    Messages:
    6,421
    the first picture shows a negative curve ;-) (first non foolish question)
    but ask - it keeps me on the road.

    btw: road - think about the envelope function like a road. You are driving through the function (envelope) from left to right (looking like a bird). If you have to drive right then it is a negative curve if you are driving left it is a positive curve.
     

    Attached Files:

    Last edited: Mar 28, 2008
  20. ehdyn

    ehdyn NI Product Owner

    Messages:
    547
    Ah, I see. Thanks for clarifying.
    The nomenclature is slightly counter-intuitive to me.

    From now on I'll try to visualize the envelope from a different perspective. Need to walk inside of it. See from it's eyes.
    From that perspective I can see how "positive" would denote a force, or tension entering into-acting upon-compacting it. "Negative" can be imagined as a relaxation of this pressure-allowing it to relax-expand.


    If it were a lung-"positive" would be during the contraction phase?
    Exhalation, or Inhalation?

    Ok, now I've thoroughly confused myself.

    Anybody ever make a lung oscillator? J/K
     
    Last edited: Mar 28, 2008
Thread Status:
Not open for further replies.