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

Dynamic Control Properties?

Discussion in 'Building With Reaktor' started by Majnun, Jan 3, 2007.

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

    Majnun Forum Member

    Messages:
    46
    Is it possible to set the min and max value properties, say on a fader for example, dymanically?

    In otherwords, could I set the min/max based on the output of something else (length of sample, etc.).

    How about the step size and mouse resolution?

    In particular I'm trying to set a fader's max value to correspond to the length of the tape deck output. I'm trying to create a scrubber for tape deck.

    I'm expecting this to be "No." but I imagine this is a common desire so maybe someone has worked out how to do this.

    Thanks in advance!
     
  2. Contrast

    Contrast NI Product Owner

    Messages:
    347
    Generally, it's not possible to dynamically modify the values in the properties panel. There are a couple exceptions such as poly/multi display, in those cases a input port on the module corresponds to a value in the properties panel.

    In a case like you describe, the best thing to do is set the fader to a range of 0..1 then scale it to your dynamic range. The equation is:

    m = minimum of desired range
    n = maximum of desired range
    x = some value that has a range 0..1 (your fader's output, whatever)

    x*(n-m)+m

    Obviously it can be simplified. If you want a range of 0..500 you only need to multiply by 500 as there is no need to add and subtract the 0.

    As for the step size or number of steps setting on the fader you should set it to the highest resolution you will need, and if you require a lower one, use the quantize module at some point along the line. The mouse resolution should almost always be set to a multiple of the number of steps (if not, then MIDI control, OSC control, and IC connections are not likely to work properly).

    I hope this helps, please don't hesitate to ask further questions if you run into some difficulty.
     
  3. Majnun

    Majnun Forum Member

    Messages:
    46
    excellent. that's a big help.
     
  4. Majnun

    Majnun Forum Member

    Messages:
    46
    Question:

    Will the quantize function cause the fader to "click" into the quantize positions? It still feels smooth, but the values are quantized behind the scenes, yes? Any way to give the user feedback on the fader (ie clicking into place)?
     
  5. Contrast

    Contrast NI Product Owner

    Messages:
    347
    There is, though it can be tricky.

    Basically you use an IC send module and control the fader with that. An explanation in words would take too long, so I've attached an example for you to take a look at.

    A few quick points.

    The IC send (labeled "to fader") expects a 0..1 range. That can be changed in the properties but of course you cannot dynamically alter that, so it is neccessary to quantize the 0..1 range before scaling, instead of scaling the fader's value and then quantizing.

    The order and value modules ensure that the output only changes when the fader moves, which may or may not be desirable behavior.

    Event loops must be on due to the IC send looping back to the fader, and I've enabled them in the instrument's properties. Normally you would put this construction in a macro and check enable event loops in that macro's properties.
     

    Attached Files:

  6. Majnun

    Majnun Forum Member

    Messages:
    46
    Right on! That's awesome. Thanks!
     
Thread Status:
Not open for further replies.