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

no negative numbers!?

Discussion in 'REAKTOR' started by DanielxK48x, Sep 1, 2006.

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

    DanielxK48x New Member

    Messages:
    19
    Hi,

    Sorry for my bad english. :(

    I need a simple way to set all negative numbers to ZERO, but all positive numbers keep the values.

    Here some examples:

    event signal = -0.4 --> 0
    event signal = 1.5 --> 1.5

    I tried the separator-modul with a constant zero on the threshold-input and out on the HI-output - but this worked not correct!!!

    Please help me!!!
    Thank you!!! :)
     
  2. Comfy

    Comfy Forum Member

    Messages:
    392
    Perhaps this?
     

    Attached Files:

  3. kid_sputnik

    kid_sputnik NI Product Owner

    Messages:
    3,552
    i agree with comfy's implimentation, im just going to elaborate on it for the sake of education. the bhig thing here is, to remember that the seperator blocks/passes events. so, if you only use the hi output (as you said above you did), anything out of range will be blocked.

    the seperator and value modules are your friends, learn to use them as they will be used constantly if you get into reakltor event programming (which is necessary for most cool stuff in reaktor, especially sequencers and GUI-stuff). in this case, what is happening is that the hi output goes to the merge, and passes thru as normal. the low output acts as a trigger for the value module: what happens, is that ANY event hitting the Trig input sends out whatever value is at the In input (this can even be an audio signal, for sample-hold effects for event structures). if the input is unconnected, it is THE EXACT SAME THING as a constant of 0, so a zero is trggered everytime an event <= the threshold is recieved.

    i used uppercases above because this idea must be stressed, it is very important concept for reaktor builders. if you leave something unplugged, you cant jsut assume that it will be non-functional or off. so, if you had left the value's trigger unplugged, it would have actually been a constant of zero there. since cosntants only fire at startup/initialization, at every init the value at the Value's In input will be triggered (since the invisible constant of zero is an event, and ANY event triggers the value). i know this isnt what you originally asked, but i think its important to learn
     
  4. DanielxK48x

    DanielxK48x New Member

    Messages:
    19
    @COMFY

    OMG !
    This is a simple but very brilliant idea!
    THANKS SO MUCH !!!!
    This works fine!

    :) :) :)
     
  5. DanielxK48x

    DanielxK48x New Member

    Messages:
    19
    @kid_sputnik
    This is very nice!
    Thank you for this very detailed information!
     
  6. theologiae

    theologiae NI Product Owner

    Messages:
    652
    would a rectify work in this case? i use it a lot in my randomizing set ups the need to be purged of negitive values. should i be using comfy's set up. it looks like a more elegent solution, but how is it different from the recitfy?
     
  7. Contrast

    Contrast NI Product Owner

    Messages:
    347
    Rectify gets you the absolute value (ie -5 will become 5, -0.123 will become 0.123), whereas what comfy posted will just yield a 0 for any negative number...
     
  8. theologiae

    theologiae NI Product Owner

    Messages:
    652
    sweet,
    thanks
     
Thread Status:
Not open for further replies.