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

Changing min/max range for block controls

Discussion in 'REAKTOR' started by rachMiel, Oct 6, 2015.

  1. rachMiel

    rachMiel NI Product Owner

    Messages:
    325
    It's not obvious to me how to change the range of a knob in a block.

    For example, in the Bento LFO, the Frequency knob goes from 0 to 100 hz. If I change its min/max values (in Properties) from 0/1 to 0/.5, it limits the knob upper range to its midpoint, which = 12 hz (not 50). And doing this seems to screw up the modulation range values.

    How would I change the range to something like: min=.1 max=2 and have the modulation stay within this range?

    In general, what's the best way to change block control ranges and have the correct values show up in the display?
     
  2. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    have the knob range from 0 to 1. then after modulation multiply it by 1.9 and add 0.1, should work.

    for the display, i think you can find the value macro, and multiply the input by 0.019 then add 0.001 and the display should range from 0.1 to 2
     
  3. rachMiel

    rachMiel NI Product Owner

    Messages:
    325
    Oy, what a mess.

    I guess changing the control ranges is working *against* the paradigm NI expects builders to use with the blocks.

    I can understand the choice to limit ranges to 0 to 1 or -1 to 1 to emulate classic modular synth ranges ... but Frequency doesn't output either of these, it outputs 0 to 100 (hz). Forcing builders to go through gobs of hoops to simply change the min/max output range of a knob? It just doesn't make sense to me.

    However, since I'm the only person who seems to be bothered by this, I'm clearly using blocks in a way NI didn't intend them to be used. Sigh ...
     
  4. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    'gobs of hoops'

    it's two simple steps, which i outlined above. ALL knobs range from 0 to 1, including the freq knob in the bento box oscillator. you can check in properties.

    it does this so that no matter what the actual range of the knob, the modulation can be done with the same macro each time (in the smoother A/B macros). once the modulation is complete, you can pass the modulated value back to primary to display the modulation, and then change the value by multiplying by the range then adding the minimum value.
     
    • Like Like x 1
  5. rachMiel

    rachMiel NI Product Owner

    Messages:
    325
    That might be the best/easiest fix. But it's still a bit of a kludge, right? A bit duct tape-y.

    I'm not criticizing your coding, which is top-notch. I'm saying that it's kind of strange that NI chose to design block controls so that a kludge like this is needed to do something as everyday as specifying the output range. I'm sure they could have figured out a way to work the modulation while letting users set the control range. It's an odd design decision on their part ... unless I'm missing something fundamental.
     
  6. Big Gnome

    Big Gnome NI Product Owner

    Messages:
    574
    It seems an awful lot more kludgey to me to have all modulation contingent upon an arbitrary range on a per-control basis. The way it's handled presently is extremely sensible--everything is 0-1 and gets scaled to the appropriate range inside the Process macro.
     
    • Like Like x 2
  7. rachMiel

    rachMiel NI Product Owner

    Messages:
    325
    Gnome: It still seems too inflexible to me, too difficult to accomplish what should be an extremely simple task = changing control output range.

    arachnaut: "... am I just warped and crazy?" If so, join the club! ;-)
     
  8. colB

    colB NI Product Owner

    Messages:
    3,969
    Nope, it's not a kludge, it's the best approach. I've been using 0..1 and scaling for most of my stuff for years.

    Two advantages:
    1 It standardises the controls, so they become more generic.
    2 It is MUCH easier and cheaper to map curves to a 0..1 range. Want to fake an exp curve to 0..1? Prior to scaling just square it or cube it. Job done! Want a fake a log curve? Subtract from 1, square it, then subtract from 1.

    The simple process that Don outlined to scale the result can be made into a macro, so you just set tour min and max with quick constants, and you're done.

    EDIT: Also potentially useful it the fact that zero and one can both be represented exactly as floating point numbers.
     
    Last edited: Oct 7, 2015
  9. rachMiel

    rachMiel NI Product Owner

    Messages:
    325
    sala and colB, yous guys are speaking from the perspective of the engineer, someone who's happy to go under the hood and soup things up.

    I'm talking from the perspective of the user, someone who just wants to change the output range of a control ... something they do all the time in Reaktor with other non-block controls ... and find that it can't be done in blocks without going under the hood.

    This might be the downside of following the modular synth paradigm. But the designers could have kept the users more in mind and compromised, providing an easy and convenient way to change a block control's output range. Then you have the best of both worlds: modular, but flexible.
     
  10. Chet Singer

    Chet Singer NI Product Owner

    Messages:
    822
    I've grown to like the 0-to-1 paradigm for block knobs. The only customization required is in the display macro, and everything else in those knob macros can remain unchanged. I may even begin using this technique for non-block ensembles, because I like how those little gray modulation arrows move in real time.
     
  11. rachMiel

    rachMiel NI Product Owner

    Messages:
    325
    This fix works except that the animated modulation pointer doesn't fit the fixed value pointer except when min/max are set to 0/1.

    I have to get to work, have no more time to fiddle. Maybe someone could fix it?
     

    Attached Files:

  12. rachMiel

    rachMiel NI Product Owner

    Messages:
    325
    My take on NI's naming conventions is that they did not make user/builder understandability a priority.

    It's an engineering-centric rather than user-centric approach to UI design, and you see it all through Reaktor, from the lowest to highest levels.

    It's an antiquated approach to design, back from the time when humans had to learn to speak computer instead of vice-versa.
     
  13. sowari

    sowari Moderator Moderator

    Messages:
    27,759
    to keep this as an authentic Modular structure, you can connect the Bento Box CVP in between the output of rat e first LFO and the Mod A Input of the second LFO.

    The Level knob will then govern how much the first LFO is modulating the second LFO and the Offset knob can offset this modulation.

    i can't upload screenshots because i am on a train. but with this method you stay true to the Modular Spirit.

    btw, you can just connect the Bento Box CVP to the Mod A Input of an LFO. if you attach a Constant to the Input of the CVP, you can limit how much the Level knob modulates the LFO - try 0.25 as an example. Again you can use the Offset, to change the range of the modulation.

    sowari
     
  14. Blinksonic°

    Blinksonic° New Member

    Messages:
    7
    Hi guys,
    I was looking for a way to manage the min/max range of a knob for a new build following the Blocks framework too.
    This post starts to be old but well referenced, just in case you don't have find a solution, here is a simple method for converting a range of 0 to 1 with the range values of your choice :

    - create a new core cell
    - inside it, create in/out ports
    - in the contextual menu, go to"library", then "math" and add the macro called " [x,y]->[u,v] "
    - link the 2 ports of the top to the "in" and "out" port of the Core Cell you previously created
    - on ports "x" and "y" create quick constants with the values 0 and 1
    - on ports "u" and "v" create quick constants with the exact range value you want. "u" will be minimum and "v" the maximum
    - plug the core cell between the output of your knob and the parameter you want to modulate. That's it !

    It works perfectly for me. For exemple, I can control the pitch of my primary macro "resynth" with a range of -24 and +24 inside a BLOCKS ecosystem.

    Thanks a lot to Efflam Le Bivic, who kindly helps me and submits this solution !
     
    • Informative Informative x 1