Hi _
I have a logic problem around a slider acting as a switch; I explain myself a little better.
This slider has 4 positions and depending on its position, I would have liked to give a different role to another slider; I tried with a function but it blocks me the other slider. For better understanding, here is my script:
Maybe I should try with an if ($tapeselector = 0...end if function ..?
on init
set_ui_height(2)
make_perfview
declare ui_slider $tapeselector(0, 3)
set_control_par(get_ui_id($TAPESELECTOR),$CONTROL_PAR_MOUSE_BEHAVIOUR,-1100)
set_control_par_str(get_ui_id($TAPESELECTOR),$CONTROL_PAR_PICTURE,"pv_world_knob_small")
move_control_px($tapeselector,98,8)
make_persistent($tapeselector)
declare ui_slider $wear (0, 1000000)
set_control_par(get_ui_id($wear),$CONTROL_PAR_MOUSE_BEHAVIOUR,-500)
move_control_px($wear,215,18)
end on
function control
select ($tapeselector)
case 0
$wear := get_engine_par($ENGINE_PAR_PHASIS_AMOUNT, -1, 1, -1)
$wear := get_engine_par($ENGINE_PAR_PHASIS_MOD_MIX/2, -1, 1, -1)
case 1
$wear := get_engine_par($ENGINE_PAR_TP_WARMTH,-1,1, $NI_MAIN_BUS)
$wear := get_engine_par($ENGINE_PAR_TP_HF_ROLLOFF,-1,1, $NI_MAIN_BUS)
case 2
$wear := get_engine_par($ENGINE_PAR_TP_WARMTH,-1,1, $NI_MAIN_BUS)
$wear := get_engine_par($ENGINE_PAR_TP_HF_ROLLOFF,-1,1, $NI_MAIN_BUS)
$wear := get_engine_par($ENGINE_PAR_SK_DRIVE, -1, 0, -1)
case 3
$wear := get_engine_par($ENGINE_PAR_SK_DRIVE, -1, 0, -1)
$wear := get_engine_par($ENGINE_PAR_BITS,-1,0, $NI_MAIN_BUS)
$wear := get_engine_par($ENGINE_PAR_BITS,-1,0, $NI_MAIN_BUS)
$wear := get_engine_par($ENGINE_PAR_FREQUENCY,-1,0, $NI_MAIN_BUS)
end select
end function
on ui_control($WEAR)
call control
end on