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

onNote(event)

Description

This callback function is called when the script module receives a note-on event.

Available in: Processor.

Arguments

event

Fields

.typeThe type of event (1 = noteOn). See Event Types for details.number
.idThe note ID of the note-on event.number
.noteThe note number in the range of 0 to 127.number
.velocityThe note-on velocity in the range of 0 to 127.number

Example

-- print note ID, note number and velocity
function onNote(event)
    local id = postEvent(event)
    print("ID: "..id..", Note #: "..event.note..", Velocity: "..event.velocity)
end

1 Comment