Beat

A clock that fires a trigger on every beat at a given tempo.

Parameters

NameTypeDescription
BeatoutputTriggerFires once at the start of every beat.
PhaseoutputFloatHow far the current beat has come, from 0 at its start to 1 at its end.
CountoutputIntHow many beats have passed since the start or the last reset, starting at 0.
TempoFloatHow fast the beats come, in the chosen unit.
UnitEnumWhether the tempo is a number of beats per minute or the number of seconds between two beats.Choices: BPM, Seconds
SubdivisionFloatHow many triggers there are per beat of the tempo.
RunningBoolWhether the clock is running. While off, it holds still.
ResetTriggerStarts a new beat right away and sets the count back to 0.

Beat is a metronome. It fires a trigger on every beat, counts the beats and reports how far along the current beat is. The count starts at 0, so the first beat after a start or reset is beat 0.

The tempo can be given as beats per minute, as on a drum machine, or as the number of seconds between two beats. The subdivision multiplies it. A subdivision of 2 gives two triggers per beat, and a subdivision of 0.25 gives one trigger every four beats. Changing the tempo while the clock runs does not make the phase jump; the current beat just continues at the new speed.

While Running is off the clock pauses where it is and continues from there when it is turned on again. A reset starts a new beat that moment and fires a trigger for it.

The phase is useful on its own. Fed into a Remap with an easing curve it gives a movement that repeats in time with the beat.

Keywords: clock, tempo, bpm, metronome, pulse, rhythm, tick