Optional audioOptional tempo?: numberOptional timeAudio context
Loop duration by absolute beat index
Private nextListener callbacks for next measure
Metronome position
Private resetReset position is scheduled
Current score
Tempo in beats per minute
Time signature
Private timerPrecise timer
Private onPrivate onSchedule a callback at given time
Optional data: anySet current score
Set time signature
Private start
Metronome runs a precise timer that can start, pause, and stop.
It has a tempo and time signature, which control how time is counted.
It keeps track of the current position in these units of measurement:
It can be given a score of players with events, which will be played in sync with the metronome.
Example