The event class describes the properties of events.
On this page:
Class
Event Class
Constructor
Event Constructor
Event(type)
Description
Constructor to create a new Event object of the specified type.
Available in: Processor.
Arguments
type | The type of event. See Event Types for details. | enum or number |
---|
Return Values
Returns a new Event object of the specified type.
The fields of the Event object must be set after its creation.
Example
-- create new note-on event function onNote(event) local newEvent = Event(EventType.noteOn) newEvent.note = event.note + 12 newEvent.velocity = event.velocity local id = postEvent(newEvent) waitForRelease() releaseVoice(id) end