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

Need help building an exponential attack

Discussion in 'REAKTOR' started by Dilated, Jan 25, 2014.

  1. Dilated

    Dilated New Member

    Messages:
    6
    Or does anyone know where to find a macro with that feature? I basically need a normal ADSR which has an exponential attack.
    Would be grateful if anyone can help!
     
  2. ZooTooK

    ZooTooK NI Product Owner

    Messages:
    1,751
    Put an multipier at the output and multiply by it self.
     
  3. Dilated

    Dilated New Member

    Messages:
    6
    Really? Can you post a macro?

    Edit.. I tried but it doesn't do anything?
     
  4. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
  5. Dilated

    Dilated New Member

    Messages:
    6
    Thanks salamanderanagram! You think you can post a macro? That would be sweet!
     
  6. herw

    herw NI Product Owner

    Messages:
    6,421
    this is square not exponential!
     
  7. ZooTooK

    ZooTooK NI Product Owner

    Messages:
    1,751
    true
     
  8. Dilated

    Dilated New Member

    Messages:
    6
    If anyone can post a working solution here would be great!
     
  9. herw

    herw NI Product Owner

    Messages:
    6,421
    you can use the macro Multi-BP env
    Multi-BP Env.jpg
    you will find it here:
    Macro/Building Blocks/Envelopes

    ciao herw
     
  10. colB

    colB NI Product Owner

    Messages:
    3,969
    er... square IS exponential where the exponent is 2.

    @OP
    Sometimes this is absolutely fine for an exponential control curve. Just use a control with range of 0..1, square it and then scale the result to your needs, and you have a very cheap exponential curve...
    It's no use if you want the user to be able to adjust the curve though. in that case, there's a core macro for approximation of power function x^y. Again, stick to an input range between 0 and 1. That way, the end result is always between 0 and 1. After the exponentiation has been applied, scale the final result to your application.
     
  11. ZooTooK

    ZooTooK NI Product Owner

    Messages:
    1,751
    squared envelopes sound pretty good in my ears and is VERY simple to create. Take the output of an envelope and connect it to both inputs of a multiplyer.
     
    Last edited: Jan 26, 2014
    • Like Like x 1
  12. Dilated

    Dilated New Member

    Messages:
    6
    Thanks herw! That did the trick!
     
  13. herw

    herw NI Product Owner

    Messages:
    6,421
    ? ? ? sorry but you are absolutely wrong:

    square is a power function y=x^2 with constant exponent (f.i. 2) and variable basis. Other examples are x^3, x^(-4) etc.
    Exponential functions like y=2^x (or 1.5^x, 3^(-x) etc) have a constant basis and variable exponent.
    mathematics.jpg
    ciao herw
     
    Last edited: Jan 27, 2014
  14. colB

    colB NI Product Owner

    Messages:
    3,969
    Squaring is not a form of "exponential function". But it is a process of exponentiation, and therefor is exponential. This is the first time in the thread that anyone has mentioned exponential functions.
    It is an important distinction though, and I suppose we should have first asked what the op meant by exponential attack.
    In my experience with envelopes, I've never heard one described as having a "power attack"...
    I think we're missing a trick there in marketing terms
    Col
     
  15. herw

    herw NI Product Owner

    Messages:
    6,421
    The main point is that an attack curve is an exponential function because in analog hardware synths the envelope is produced by charging and discharging of a capacitor.
    If you are interested how to realize such curves then you can follow here:
    Hüllkurven (envelopes)

    ciao herw
     
    Last edited: Jan 27, 2014
  16. ZooTooK

    ZooTooK NI Product Owner

    Messages:
    1,751
    I think the marketing term we're looking for is "snappy". I always wondered how NI got away with those linear envelopes. The breakpoint envelope is nice but very complicated to use.
     
  17. colB

    colB NI Product Owner

    Messages:
    3,969
    So if the aim is to build an accurate model of an envelope from an analogue synth, then using an exponential function is important.
     
  18. Dilated

    Dilated New Member

    Messages:
    6
    After trying the breakpoint envelope a bit I find it a little bit hard to work with.. especially with the release time. Someone experienced should try and build an ADSR with switchable functions log/lin/exp :)
     
  19. herw

    herw NI Product Owner

    Messages:
    6,421
    true - i am working since two years. Calculations are clear for me but i must invest time to build.
    The universal formula is
    Bild 1.jpg
    Have a look to the movie: http://www.reaktor-forum.de/download/file.php?id=2562
    Start and stop several times the movie and have a look to the green formula especially for b=0.999!

    The advantage of exponential growing is that from step to next step (SampleRateTicks) you mainly need only a fix multiplication (for several envelope phases) independently with which value the phase (attack, decay, release) starts.

    ciao herw
     
    Last edited: Jan 28, 2014
  20. ZooTooK

    ZooTooK NI Product Owner

    Messages:
    1,751
    I've got an idea to manipulate the input times while in that phase. I'm going to work on this next coming week... I'll report here.
     
    Last edited: Jan 28, 2014