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

« Previous Version 6 Next »

getBeatTime()

Description

Function to obtain the current song position as number of beats (quarter notes) since the start of the song.

Available in: Processor.

Return Values

When the host is in playback, the function returns a decimal with the number of beats (quarter notes) since the start of the song. The function returns -1, if the host is not in playback.

Example

--detect if the host is in playback
function onNote(event)
    if isPlaying() then
        print(getBeatTime())
    else
        print("Playback is stopped.") 
    end
end

See Also:

  • No labels