Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

On this page:

 

Classes

Event Class

Error rendering macro 'excerpt-include'

No link could be created for 'Event Class'.

Event Constructor

Event(type)

Description

Constructor to create a new Event object of the specified type.

Available in: Processor.

Arguments

typeThe 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

  • No labels