Home Forums Pianobook Kontakt knob script issue Reply To: Kontakt knob script issue

#4039
Liam MacLean
Participant

on init

make_perfview

set_ui_height_px(280)
set_ui_width_px(633)
message(“”)

declare $count := 0

set_control_par_str($INST_ICON_ID,$CONTROL_PAR_PICTURE,”rsz_lm_logo”)

declare ui_slider $cutoff(500000, 1000000)
make_persistent($cutoff)
declare $cutoffId
$cutoffId := get_ui_id($cutoff)
set_control_par_str($cutoffId, $CONTROL_PAR_PICTURE, “LM_Knob2”)
set_control_par($cutoffId,$CONTROL_PAR_MOUSE_BEHAVIOUR,-1000)

declare ui_slider $hpcutoff(1, 500000)
make_persistent($hpcutoff)
declare $hpcutoffId
$cutoffId := get_ui_id($hpcutoff)
set_control_par_str($hpcutoffId, $CONTROL_PAR_PICTURE, “LM_Knob2”)
set_control_par($hpcutoffId,$CONTROL_PAR_MOUSE_BEHAVIOUR,-1000)

declare ui_slider $Reverb(1,750000)
make_persistent($Reverb)
declare $ReverbId
$ReverbId := get_ui_id($Reverb)
set_control_par_str($ReverbId, $CONTROL_PAR_PICTURE, “LM_Knob2”)
set_control_par($ReverbId,$CONTROL_PAR_MOUSE_BEHAVIOUR,-500)

declare ui_slider $attack (50000, 1000000)
declare ui_slider $release (50000, 1000000)

make_persistent($attack)
make_persistent($release)

declare $attackId
declare $releaseId

$attackId := get_ui_id($attack)
$releaseId := get_ui_id($release)

set_control_par_str($attackId, $CONTROL_PAR_PICTURE, “LM_Knob2”)
set_control_par_str($releaseId, $CONTROL_PAR_PICTURE, “LM_Knob2”)
set_control_par_str($cutoffId, $CONTROL_PAR_PICTURE, “LM_Knob2”)
set_control_par_str($hpcutoffId, $CONTROL_PAR_PICTURE, “LM_Knob2”)

set_control_par($attackId,$CONTROL_PAR_MOUSE_BEHAVIOUR,-500)
set_control_par($releaseId,$CONTROL_PAR_MOUSE_BEHAVIOUR,-500)

move_control_px($Reverb,545,205)
move_control_px($attack,295,205)
move_control_px($release,425,205)
move_control_px($cutoff,545,115)
move_control_px($hpcutoff,425,115)

end on