This script use $ENGINE_PAR_INTMOD_INTENSITY for control the amount intensity of a modulator (PB_PITCH) on the source section, but it returns percent values. What is the value for set that correctly?
$test/80000 gives 12 st but the knob moves within a range of 0-12, not -12 to 12, and if the knob min is set to -1000000 (which I'll like to keep to 0), when the knobs is around 6 st, the invert button turns on.
$ENGINE_PAR_MOD_TARGET_INTENSITY gives that value, but I'll prefer not use it since doesn't show the "-" on the negative values , add it needs to add the line $MOD_TARGET_INVERT_SOURCE and set the knob range to -1000000 as knob min.
Code: Select all
on init
declare $count
declare ui_knob $test (0,1000000,1)
set_knob_unit($test,$KNOB_UNIT_ST)
declare $mod_idx
$mod_idx := find_mod(0,"PB_PITCH")
$test := get_engine_par($ENGINE_PAR_INTMOD_INTENSITY,0,$mod_idx,-1)
set_knob_label($test, get_engine_par_disp($ENGINE_PAR_INTMOD_INTENSITY, 0, $mod_idx, -1))
end on
on ui_control ($test)
set_engine_par($ENGINE_PAR_INTMOD_INTENSITY,$test, 0, $mod_idx, -1)
set_knob_label($test, get_engine_par_disp($ENGINE_PAR_INTMOD_INTENSITY, 0, $mod_idx, -1))
end on