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

getNoteDuration(note)

Description

Function to measure the time delta between the last note-on event of the specified note and the call of this function.

Available in: Processor.

Arguments

noteThe note number in the range of 0 to 127.number

Return Values

Returns the time delta in milliseconds.

Example

-- print the time delta between note-on and note-off
function onRelease(event)
    postEvent(event)
    print(getNoteDuration(event.note), "ms")
end

1 Comment