Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel

isNoteHeld()

Description

Function to detect , inside the onNote callback function if a note is held or not.

Info

isNoteHeld can only be called inside is specific to the onNote callback function. Calling this function inside other callback functions is not permitted.

Available in: processor Processor.

Return Values

Returns true, if onNote has received a note-on event , and false, if onNote has received a corresponding note-off event. The note events must come from outside the script, e.g., from the host software or another MIDI module.

Example

Code Block
-- detect inside onNote, if a note is held
function onNote(event)
    print("Note #: "..event.note..", "..tostring(isNoteHeld()))
    waitForRelease()
    print("Note #: "..event.note..", "..tostring(isNoteHeld()))
end
Panel

See Also: onNote isKeyDown, isOctaveKeyDown