Advanced scripting - Event reference variables

Event reference variables can be used in actions to reference event values more flexibly than the #value# reference. Event reference variables are prefixed with "@event_" or "@e_" and are set automatically when the events in the command are evaluated. The event reference variables are set according to the first event for each event type. You can only use event reference variables in actions; you cannot set or reference them in events.

The following command will display the received controller while the button is in the off state and the received controller value while the button is in the on state:

[(state:0)(cc:1,1,0-127){text:#@e_cc#}]
[(state:1)(cc:1,1,0-127){text:#@e_ccvalue#}]
[(state:1)(press)(cc:1,1,0-127){text:#@e_cc#}]
[(state:0)(press)(cc:1,1,0-127){text:#@e_ccvalue#}]

Event reference variables

Event variable names are not case-sensitive.

Variable Description
@e_cc
@e_ccvalue
@e_ccchannel
@event_cc
@event_ccvalue
@event_ccchannel
These variables reference the controller, controller value, and channel for the command's first occurrence of a Control Change event.
@e_pc
@e_pcchannel
@event_pc
@event_pcchannel
These variables reference the program and channel for the command's first occurrence of a Program Change event.
@e_note
@e_notevelocity
@e_notechannel
@event_note
@event_notevelocity
@event_notechannel
These variables reference the key, velocity, and channel for the command's first occurrence of a Note On or Note Off event.
@e_state
@event_state
This variable references the current state (0/1) of the button.