Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on init
- make_perfview
- declare $count {Used for Array counter}
- {declare all ui buttons, knobs etc}
- declare ui_slider $attack (0, 127)
- declare ui_slider $decay (0, 127)
- declare ui_slider $sustain (0, 127)
- declare ui_slider $release (0, 127)
- declare ui_button $b1
- declare ui_button $b2
- declare ui_button $b3
- declare ui_button $b4
- declare ui_knob $k1 (0, 127, 1)
- declare ui_knob $k2 (0, 127, 1)
- declare ui_knob $k3 (0, 127, 1)
- declare ui_knob $k4 (0, 127, 1)
- declare %gui[12] {move all IDs into array for easy recal}
- %gui[0] := get_ui_id($attack)
- %gui[1] := get_ui_id($decay)
- %gui[2] := get_ui_id($sustain)
- %gui[3] := get_ui_id($release)
- %gui[4] := get_ui_id($b1)
- %gui[5] := get_ui_id($b2)
- %gui[6] := get_ui_id($b3)
- %gui[7] := get_ui_id($b4)
- %gui[8] := get_ui_id($k1)
- %gui[9] := get_ui_id($k2)
- %gui[10] := get_ui_id($k3)
- %gui[11] := get_ui_id($k4)
- declare ui_menu $onoff {Show menu - set original value and position}
- add_menu_item ($onoff,"ADSR",0)
- add_menu_item ($onoff,"buttons",1)
- add_menu_item ($onoff,"knobs",2)
- $onoff := 0
- move_control($onoff,1,1)
- $count :=0 {Show sliders/ Reverb controls - Hide others}
- while ($count < 4)
- set_control_par(%gui[$count], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING)
- inc($count)
- end while
- $count := 4
- while ($count < 12)
- set_control_par(%gui[$count], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL)
- inc($count)
- end while
- end on
- on ui_control ($onoff)
- select ($onoff)
- case 0 {Show sliders - Hide buttons - Hide Knobs}
- $count :=0
- while ($count < 4)
- set_control_par(%gui[$count], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING)
- inc($count)
- end while
- $count := 4
- while ($count < 12)
- set_control_par(%gui[$count], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL)
- inc($count)
- end while
- case 1 {Hides sliders - Show buttons - Hide Knobs}
- $count :=0
- while ($count < 4)
- set_control_par(%gui[$count], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL)
- inc($count)
- end while
- $count := 4
- while ($count < 8)
- set_control_par(%gui[$count], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING)
- inc($count)
- end while
- $count := 8
- while ($count < 12)
- set_control_par(%gui[$count], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL)
- inc($count)
- end while
- case 2 {Hides sliders and buttons - show Knobs}
- $count :=0
- while ($count < 4)
- set_control_par(%gui[$count], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL)
- inc($count)
- end while
- $count := 4
- while ($count < 8)
- set_control_par(%gui[$count], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL)
- inc($count)
- end while
- $count := 8
- while ($count < 12)
- set_control_par(%gui[$count], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING)
- inc($count)
- end while
- end select
- end on
- on note
- {nothing at the moment just working on %gui}
- end on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement