Envelope problems. Driving me a bit nuts

Discussion in 'REAKTOR' started by berlov, Sep 9, 2017.

  1. berlov

    berlov New Member

    Messages:
    12
    (see attached image)

    This is an issue I've encountered in a couple of projects now; the basic function I'm trying to create is a means of detecting when an envelope is not being used. so a Compare/Equal module will simply read out 1 whenever the Envelope is at 0. Simplest thing in the world except that, uh, it's..... not? Doing that? Honestly what am I missing here? Am I even missing something? Have I just broken physics? What do I have to do to repair the laws of mathematics?

    Screen Shot 2017-09-09 at 17.47.24.png
     
  2. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,255
    primary envelopes never actually decay to 0, just very close to it.

    instead, check if it's smaller than a really small number, like .0000001
     
    • Informative Informative x 1
  3. berlov

    berlov New Member

    Messages:
    12
    Hm. What a strange, bewildering quirk.
    I got it to work when I changed the Compare/Equal to just a Compare (so I could set it to output when A is equal to or less than B) and set the B input to 0.000001. Bit anxious that this could be prone to stop working again depending on where the envelope decides to fall, but I'll leap that hurdle when I get to it I guess. Could always add an extra zero to the fraction :p
     
  4. colB

    colB NI Product Owner

    Messages:
    1,914
    Think of the maximum level (usually 1)
    Now as a thought experiment :) take half away... then take the answer and take half of that away... now take half of that away...
    The value drops quickly to start with, then tails away... it will get near to zero pretty quick, but never reach zero.

    That's basically how decay works in most natural/authentic/analog sounding envelopes. The decay time is varied by changing what fraction you take away at each step.
    It's pretty much what happens in a real analog electric circuit too.
     
    • Informative Informative x 2
    • Like Like x 1
  5. berlov

    berlov New Member

    Messages:
    12
    Gotcha -- Yeah, that makes sense actually.

    Laws of physics repaired :thumbsup:
     
    • Funny Funny x 1