15 #include "EventDelay.h" 51 void start(
unsigned int delay_milliseconds)
53 set(delay_milliseconds);
65 set((
unsigned int) (60000.f/bpm));
78 if ((now<deadline) || stopped)
return false;
80 deadline=now-(now-deadline)+ticks;
Metronome(unsigned int delay_milliseconds=0)
Constructor.
void setBPM(float bpm)
Set the beats per minute.
bool ready()
Call this in updateControl() or updateAudio() to check if it is time for a beat.
A metronome class which is like an EventDelay which retriggers itself when the delay time is up...
void start(unsigned int delay_milliseconds)
Set the time between beats and start the metronome.
A non-blocking replacement for Arduino's delay() function (which is disabled by Mozzi).
void start()
Start the metronome.
unsigned long audioTicks()
An alternative for Arduino time funcitions like micros() which are disabled by Mozzi when it takes ov...