Page tree

Versions Compared

Key

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

...

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

Code Block
--detectprint if the hostsong isposition
in playback
function onNote(event)
	songPos = getBeatTime()
 	if isPlaying(songPos ~= -1) then
        print(getBeatTime())
    else
        print("Playback is stopped.") 
    end
end

...