3.5

Table Of Contents
206MainStage Effects
Event methods
Event.send(): Send the event.
Event.sendAfterMilliseconds(number ms): Send the event after the specified value has
elapsed (can be an integer or a floating point number).
Event.sendAtBeat(number beat): Send the event at a specific beat (floating point
number) in the host timeline.
Event.sendAfterBeats(number beat): As above, but uses the beat value as a delay in
beats from the current position.
Event.trace(): Print the event to the plug-in console. See Use the Trace object.
Event.toString(): Returns a String representation of the event.
Event properties
Event.toarticulationID(integer number): Sets the articulation ID from 0–254.
Event.channel(number): Set MIDI channel 1 to 16.
Event.beatPos: Retrieves the event’s exact beat position.
Event types
The Event object is a prototype for the following event types. All event types inherit the
methods and channel properties described above.
The event types and their properties are passed to HandleMIDI as follows:
NoteOn.pitch(integer number): Pitch from 1–127.
NoteOn.velocity(integer number): Velocity from 0–127. A velocity value of 0 is
interpreted as a note off event, not a note on.
NoteOff.pitch(integer number): Pitch from 1–127.
NoteOff.velocity(integer number): Velocity from 0–127.
PolyPressure.pitch(integer number): Pitch from 1–127.
PolyPressure.value(integer number): Define a pressure value from 0–127.
ControlChange.number(integer number): Controller number from 0–127.
ControlChange.value(integer number): Controller value from 0–127.
ProgramChange.number(integer number): Program change number from 0–127.
ChannelPressure.value(integer number): Aftertouch value from 0–127.
PitchBend.value(integer number): 14-bit pitch bend value from -8192–8191. A value of 0
is center.
TargetEvent.target(string): Create user definable MIDI CC messages or control plug-in
parameters.
TargetEvent.value(float): Sets the target value.
Load the corresponding Tutorial setting to view the script in the Script Editor. This will help
you to understand the syntax structure and layout of code and comments. See Use the
MainStage Scripter MIDI plug-in Script Editor.