Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {Make sure the 4-POLE LP FILTER is in the INSERT FX's first SLOT, This small script provides a on/off button for the fitler to be switched on/off}
- {Here is a link to the NKI example itself + Script:
- http://www.newgrounds.com/dump/item/ec6948e2d3b534411534f09138c067e1
- }
- on init
- message ("")
- make_perfview
- set_ui_height_px (100)
- declare ui_knob $cutoff (0,1000000,1)
- declare ui_knob $reso (0,1000000,1)
- declare ui_button $power
- set_text($cutoff, "Cutoff")
- set_text($reso, "Reso")
- set_text($power, "Filter Off")
- move_control($cutoff, 6,1)
- move_control($reso, 5,1)
- set_knob_label($cutoff,get_engine_par_disp($ENGINE_PAR_CUTOFF,-1,0,1))
- set_knob_label($reso,get_engine_par_disp($ENGINE_PAR_RESONANCE,-1,0,1))
- set_engine_par($ENGINE_PAR_CUTOFF,$cutoff, -1, 0, 1)
- set_engine_par($ENGINE_PAR_RESONANCE,$reso, -1, 0, 1)
- set_knob_unit($cutoff,$KNOB_UNIT_PERCENT)
- set_knob_unit($reso,$KNOB_UNIT_HZ)
- end on
- on ui_control ($cutoff)
- set_engine_par($ENGINE_PAR_CUTOFF,$cutoff, -1, 0, 1)
- set_knob_label($cutoff,get_engine_par_disp($ENGINE_PAR_CUTOFF,-1,0,1))
- end on
- on ui_control ($reso)
- set_engine_par($ENGINE_PAR_RESONANCE,$reso, -1, 0, 1)
- set_knob_label($reso,get_engine_par_disp($ENGINE_PAR_RESONANCE,-1,0,1))
- end on
- on ui_control ($power)
- if ($power = 1)
- set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,-1,0,1)
- set_text($power, "Filter On")
- end if
- if ($power = 0)
- set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,-1,0,1)
- set_text($power, "Filter Off")
- end if
- end on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement