-
Notifications
You must be signed in to change notification settings - Fork 6
Miscellaneous Functionality
To access alternate functions in your event processors, you may want to check the state of shift menus. To do that, use the following function:
if internal.shifts["MAIN"].query():
# The main shift menu is active.
passNote that you can access the states of other shift menus by changing the key string to one of the available options:
"MAIN""RECORD""DEBUG"
Although it is suggested to link extended functions only to the main shift menu to aid in simplicity.
To use a shift button (ie prevent that shift button from having the default action when released), use the following function:
if internal.shifts["MAIN"].use():
# The main shift menu is active, and we used the shift button.
passTo set/query extended modes for the controller, use the object internal.extendedMode.
Set the extended mode for an option.
Arguments:
-
new_mode(bool): On or Off -
option(event ID): the extended mode setting to change. Can be:eventconsts.INCONTROL_KNOBSeventconsts.INCONTROL_FADERSeventconsts.INCONTROL_PADS
-
force(bool): Whether the change should be forced (overrides error state). Don't change this. -
from_internal(bool): Whether the change was triggered by the script, or by the controller. Don't change this.
Example usage:
# Set the extended mode for faders to True
extendedMode.setVal(True, eventconsts.INCONTROL_FADERS)Query the extended mode for an option.
Arguments:
-
option(event ID): the extended mode setting to change. Can be:eventconsts.INCONTROL_KNOBSeventconsts.INCONTROL_FADERSeventconsts.INCONTROL_PADS
Example usage:
# Store the extended mode of the drum pads in a variable
variable = extendedMode.query(eventconsts.INCONTROL_PADS)Revert the extended mode for an option to its previous values.
Arguments:
-
option(event ID): the extended mode setting to change. Can be:eventconsts.INCONTROL_KNOBSeventconsts.INCONTROL_FADERSeventconsts.INCONTROL_PADS
Example usage:
# Revert the extended mode for knobs.
extendedMode.revert(eventconsts.INCONTROL_KNOBS)