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. herw

    herw NI Product Owner

    Messages:
    6,421
    that's no problem: instead of x you have to set x/T, where T is the time in seconds you want to set.

    ciao herw
     
  2. ZooTooK

    ZooTooK NI Product Owner

    Messages:
    1,751
    There's my draft so far. Skärmavbild 2014-01-28 kl. 20.53.47.png Skärmavbild 2014-01-28 kl. 20.51.43.png
    decay and release are non-linear already. It is only the attack that is linear.
     
  3. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    here's a simple primary solution:

    http://www.nireaktor.com/wp-content/uploads/2014/01/pic31.png

    i'm not sure this is the type of exponential curve you want on an attack - wouldn't you technically want more of a logarithmic shape (not technically, but visually)? it would be easy to fix this for just one stage using the St output of the 4-ramp.

    anyway, this is probably the easiest method, and it solves the annoying timing issues with the primary ADSR.

    donwload is available here - http://www.nireaktor.com/reaktor-tutorials/creating-custom-envelopes-in-reakto/
     
  4. ZooTooK

    ZooTooK NI Product Owner

    Messages:
    1,751
    I've attached three examples of envelopes. First Salamanderanagrams primary solution above. Skärmavbild 2014-01-28 kl. 22.27.41.png
    The decay stage doesn't look that good I'd say.

    Then a simple adsr Skärmavbild 2014-01-28 kl. 22.30.44.png and last a simple adsr which output is multiplied by it self. Skärmavbild 2014-01-28 kl. 22.33.29.png Skärmavbild 2014-01-28 kl. 22.46.12.png . I'd say the last is my prefered.

    My example above Skärmavbild 2014-01-28 kl. 20.53.47.png is looking like a Minimoog and sounds a bit different from the example included in this post. It's often used in illustrations but I don't know how common it actually is.
     
  5. ZooTooK

    ZooTooK NI Product Owner

    Messages:
    1,751
    double post
     
  6. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    ahh, thanks for saying that - i felt something was weird with the decay too.
    now i think i know what the problem is - check out the decay when the sustain is set close to zero, it looks a lot better!
    so i need to somehow scale the decay section... an interesting problem, but probably one that could be solved with a few modules.

    edit - eyep, got the decay section fixed, and of course the release section needs some work too - it looks better because you always get the smooth tail, but it's wrong, just like the decay.

    edit 2 - okay, fixed now, with proper decay and release, you can download from the same location. let me know if you find any errors, primary is not great for this sort of stuff. if anybody wanted to really use this i would suggest translating at least the 'scale up' and 'scale down' macros into core, you could save a lot of CPU.
     
    Last edited: Jan 29, 2014
  7. herw

    herw NI Product Owner

    Messages:
    6,421
    You are right. Squaring or raising to the power of 3, 4, etc. is only a quick and unsatisfying solution, especially when using different curves for every phase. Another reason is the CPU: the more power modules you are using the more the algorithm is inefficient (in core too). Another reason is that it is difficult to get a simple termination condition because in primary f.i. you get two events when squaring. You have to use value- and order-modules to prevent unwished condition values. If you want to build it in primary you can use the multiramp envelope to get well defined phase length like you did some posts above. But you have to do much mathematics to get a proper translation without jumps.
    Another reason is that the power-function is difficult to handle when changing the curve continously (f.i. pitch modulated etc.). And last but not least: all phases have to get the actual value from the last preceding phase. So you have to use a common memory - only possible in core with OBC connections.

    ciao herw
     
    Last edited: Jan 29, 2014
  8. owen_vallis

    owen_vallis Forum Member

    Messages:
    74
    I did some experiments with this a while back, and actually I think both herw and Salamanderanagram helped me out with various stuff (thanks for that :). I now have two core cells that do either a log attack, or an exp attack, and are modifications of the core adsr. The log one also has a hold stage. In general my thoughts about the log attack approach ended up being that it emulates an RC filter, so you can get nice results by passing a step function through an LP filter. The exp just needed some tweaking in the attack module.

    Here is a picture of the mod to the attack module in the exp version, hope that helps. Shouldn't take any more CPU then the regular core ADSR, and it should get you all the bells and whistles that come with the core ADSR.
     

    Attached Files:

  9. Octaviu5

    Octaviu5 NI Product Owner

    Messages:
    37
    Hello!
    Im new here. and i dont know much about reaktor.
    Would you share them modules with me? thank you very much.
     
  10. Paule

    Paule NI Product Owner

    Messages:
    7,555
    Last edited: May 6, 2020
  11. Octaviu5

    Octaviu5 NI Product Owner

    Messages:
    37
    bad luck :(
     
  12. Paule

    Paule NI Product Owner

    Messages:
    7,555
    Please follow the links to the user library
    upload_2020-5-6_23-47-43.png
     
  13. Octaviu5

    Octaviu5 NI Product Owner

    Messages:
    37
    I appreciate your help. but its just that im still new in the whole reaktor world, and that block seems a bit too complicated for me.
    what i need is just a simple adsr envelope with variable slope.Thanks anyways.
     
    • Informative Informative x 1
  14. Paule

    Paule NI Product Owner

    Messages:
    7,555
    Then take the solution from zootook #24
    upload_2020-5-6_23-54-9.png
    multiply the output by itself. that's not difficult.

    Isn't a release knob variable?
     
  15. Michael O'Hagan

    Michael O'Hagan NI Product Owner

    Messages:
    1,163
    there is a factory ahdsr envelope with curve control of the a, d and r stages in the factory content now.

    hit enter, then type ahdsr, it will come up, you want the "library" one.
     
    • Like Like x 2
  16. Octaviu5

    Octaviu5 NI Product Owner

    Messages:
    37
    I did check it and seems like it has curve control for A and D but no R. But i guess its something.

    Thank you.
     
  17. Michael O'Hagan

    Michael O'Hagan NI Product Owner

    Messages:
    1,163
    just look inside the core cell and add another controls to the r bend input.

    I have no idea why NI made it without that control on the panel, but it's already built into the module.
     
  18. Michael O'Hagan

    Michael O'Hagan NI Product Owner

    Messages:
    1,163
    Here is one that has all controls enabled from one of my projects, you can just use this.
     

    Attached Files:

    • Like Like x 1
  19. Octaviu5

    Octaviu5 NI Product Owner

    Messages:
    37
    Thank you sir.
    This whole reaktor thing seems quite fascinating.
    I have had this idea of creating a sort of sequel to Synth1 with some extra bells and whistles, and seems like with reaktor i will be able to do it.
    If it only stopped crashing every 5 mins.

    Thank you very much.
     
  20. Paule

    Paule NI Product Owner

    Messages:
    7,555
    Fine Michael.
    Reaktor or Synth 1?