-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- The template has now been split into two scripts: a UI script and a…
… note triggering script. These live on tabs 1 and 2 of the Scripts section. - Support for sequential round robins has been added. If you'd rather have sequential round robins, set $randomize_round_robins` to 0 in the note triggering script. - Bug fixes
- Loading branch information
Showing
3 changed files
with
184 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
{ | ||
|
||
PIANOBOOK PIANO TEMPLATE - UI SCRIPT | ||
|
||
There are two scripts in this template. The first script is the UI Portion. | ||
The second script controls the triggering of piano groups. The two scripts | ||
can be used independently of eachother. | ||
|
||
Note triggering scripts by Dave Hilowitz | ||
UI scripts by Angus-Roberts Carey (ARC Samples) | ||
|
||
} | ||
|
||
on init | ||
|
||
{ This controls how responsive the knobs are. Make sure to keep this negative if you want this to be controllable via vertical dragging. } | ||
declare $controlSensitivity := -500 | ||
|
||
{ DON'T EDIT BELOW THIS POINT UNLESS YOU KNOW WHAT YOU'RE DOING } | ||
|
||
message("") | ||
|
||
{ UI Stuff } | ||
{ Tell Kontakt we want a visible Performance View } | ||
make_perfview | ||
|
||
{ Set the UI height and width for a our Performance View } | ||
set_ui_height_px(280) | ||
set_ui_width_px(633) | ||
|
||
set_control_par_str($INST_ICON_ID,$CONTROL_PAR_PICTURE,"BLANK_ICON") | ||
set_control_par_str($INST_WALLPAPER_ID,$CONTROL_PAR_PICTURE,"Template_Skin") | ||
|
||
{ This variable will be used for setting volumes in the $Vol knob handler. } | ||
declare $count | ||
|
||
{ Declare top row of controls. These control volumes for the three busses. } | ||
declare ui_slider $One(1, 500000) | ||
make_persistent($One) | ||
declare $OneId | ||
$OneId := get_ui_id($One) | ||
set_control_par_str($OneId, $CONTROL_PAR_PICTURE, "ARC_Knob") | ||
set_control_par($OneId,$CONTROL_PAR_MOUSE_BEHAVIOUR, $controlSensitivity) | ||
|
||
declare ui_slider $Two(1, 500000) | ||
make_persistent($Two) | ||
declare $TwoId | ||
$TwoId := get_ui_id($Two) | ||
set_control_par_str($TwoId, $CONTROL_PAR_PICTURE, "ARC_Knob") | ||
set_control_par($TwoId,$CONTROL_PAR_MOUSE_BEHAVIOUR, $controlSensitivity) | ||
|
||
declare ui_slider $Three(1, 500000) | ||
make_persistent($Three) | ||
declare $ThreeId | ||
$ThreeId := get_ui_id($Three) | ||
set_control_par_str($ThreeId, $CONTROL_PAR_PICTURE, "ARC_Knob") | ||
set_control_par($ThreeId,$CONTROL_PAR_MOUSE_BEHAVIOUR, $controlSensitivity) | ||
|
||
{ Positions the top row of controls } | ||
move_control_px($One, 195,95) | ||
move_control_px($Two,295,95) | ||
move_control_px($Three,395,95) | ||
|
||
{ Declare knobs for the bottom row of controls } | ||
declare ui_slider $Vol(1,500000) | ||
make_persistent($Vol) | ||
declare $VolId | ||
$VolId := get_ui_id($Vol) | ||
set_control_par_str($VolId, $CONTROL_PAR_PICTURE, "ARC_Knob") | ||
set_control_par($VolId,$CONTROL_PAR_MOUSE_BEHAVIOUR,$controlSensitivity) | ||
|
||
declare ui_slider $FxOne(1, 1000000) | ||
make_persistent($FxOne) | ||
declare $FxOneId | ||
$FxOneId := get_ui_id($FxOne) | ||
set_control_par_str($FxOneId, $CONTROL_PAR_PICTURE, "ARC_Knob") | ||
set_control_par($FxOneId,$CONTROL_PAR_MOUSE_BEHAVIOUR,$controlSensitivity) | ||
|
||
declare ui_slider $FxTwo(1, 500000) | ||
make_persistent($FxTwo) | ||
declare $FxTwoId | ||
$FxTwoId := get_ui_id($FxTwo) | ||
set_control_par_str($FxTwoId, $CONTROL_PAR_PICTURE, "ARC_Knob") | ||
set_control_par($FxTwoId,$CONTROL_PAR_MOUSE_BEHAVIOUR,$controlSensitivity) | ||
|
||
{ Positions the bottom row of controls } | ||
move_control_px($Vol, 195,195) | ||
move_control_px($FxOne,295,195) | ||
move_control_px($FxTwo,395,195) | ||
|
||
end on | ||
|
||
on ui_control($One) | ||
{ Sets the volume of the `Group 1` bus. } | ||
set_engine_par($ENGINE_PAR_VOLUME, $One,-1,-1,$NI_BUS_OFFSET + 0) | ||
end on | ||
|
||
on ui_control($Two) | ||
{ Sets the volume of the `Group 2` bus. } | ||
set_engine_par($ENGINE_PAR_VOLUME, $Two,-1,-1,$NI_BUS_OFFSET + 1) | ||
end on | ||
|
||
on ui_control($Three) | ||
{ Sets the volume of the `Group 3` bus. } | ||
set_engine_par($ENGINE_PAR_VOLUME, $Three,-1,-1,$NI_BUS_OFFSET + 2) | ||
end on | ||
|
||
on ui_control($Vol) | ||
{ This loops through all groups and sets their volume according to the $Vol knob. } | ||
$count := 0 | ||
while ($count < $NUM_GROUPS) | ||
set_engine_par($ENGINE_PAR_VOLUME, $Vol, $count, -1, -1) | ||
inc($count) | ||
end while | ||
end on | ||
|
||
on ui_control($FxOne) | ||
set_engine_par($ENGINE_PAR_CUTOFF, $FxOne, -1,0,1) | ||
end on | ||
|
||
on ui_control($FxTwo) | ||
set_engine_par($ENGINE_PAR_SENDLEVEL_0, $FxTwo,-1,7 ,0) | ||
end on | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.