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

_get_engine_par?

Discussion in 'Scripting Workshop' started by Quoid, Feb 19, 2008.

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

    Quoid NI Product Owner

    Messages:
    570
    Hey all,

    Trying to figure out what to set my min,max and display ratio for part of a script I am making. Real simple idea right now:

    Code:
    on init
    
    declare ui_knob $Reverb (0, 1000000, 1000000)
    $Reverb := _get_engine_par($ENGINE_PAR_SENDLEVEL_0, -1, 7, 0)
    set_knob_unit($Reverb, $KNOB_UNIT_DB)
    
    end on
    
    on ui_control ($Reverb)
    _set_engine_par($ENGINE_PAR_SENDLEVEL_0,$Reverb,-1,7,0)
    
    end on
    But I would like the display of the knob to correctly mimic the value on the first send's knob. infinity to 12db. Was hoping I could get a clue.
     
  2. Thonex

    Thonex NI Product Owner

    Messages:
    208
    I think you need to put this line after your _set_engine_par line:

    _get_engine_par($ENGINE_PAR_SENDLEVEL_0,-1,7,0)
     
  3. T.S.

    T.S. NI Product Owner

    Messages:
    581
    Actually T, I think this may be more like it:

    set_knob_label($Reverb, _get_engine_par($ENGINE_PAR_SE NDLEVEL_0,-1,7,0)

    T.S.
     
  4. Thonex

    Thonex NI Product Owner

    Messages:
    208
    ahh.. I think you're right... I'm not at my DAW... where I have all my notes :)

    Thanks for correcting me.

    Cheers,

    T
     
  5. Quoid

    Quoid NI Product Owner

    Messages:
    570
    So replace my set_knob_unit with the above or like Thonex said after my set_engine_par?

    Thanks guys.
     
  6. Thonex

    Thonex NI Product Owner

    Messages:
    208
    Like I said... but use his syntax.
     
  7. T.S.

    T.S. NI Product Owner

    Messages:
    581
    Hi Quoid,

    No don't replace what you have, but like Thonex says, put what I show above right under "_set_engine_par($ENGINE_PAR_SENDLEVEL_0,$Reverb,-1,7,0)
    ".

    T.S.
     
  8. Nickie Fønshauge

    Nickie Fønshauge NI Product Owner

    Messages:
    845
    Correct, except it is
    Code:
    set_knob_label($Reverb, _get_engine_par_disp($ENGINE_PAR_SENDLEVEL_0,-1,7,1)
    you'll want to use.
     
  9. Quoid

    Quoid NI Product Owner

    Messages:
    570
    Thanks Guys and Gals, you rock!
     
Thread Status:
Not open for further replies.