Moderato tempo
- Input
- 120 BPM
- Expected output
- 500 ms entre batidas
60000 divided by 120 gives 500; it is one of the most common starting tempos for practice because it stays comfortable both for counting and for playing.
metronome for music practice
BPM stands for beats per minute, and it is the number that sets the speed of any piece of music: the higher the BPM, the shorter the gap between one beat and the next, and that relationship is the foundation of any rhythmic practice with a metronome.
60000 divided by 120 gives 500; it is one of the most common starting tempos for practice because it stays comfortable both for counting and for playing.
60000 divided by 76 gives about 789 ms; slow tempos like this one are used to train precision before speeding up.
60000 divided by 200 gives 300 ms; at that short interval, the drift from a plain `setInterval` would already be audible, which is why the audio clock matters.
BPM stands for beats per minute. It is the standard measure of musical tempo. 60 BPM = one beat per second. 120 BPM = two beats per second. Common tempos: Largo (40–60), Andante (76–108), Allegro (120–168), Presto (168–200).
Divide 60000 (the number of milliseconds in a minute) by the BPM. At 90 BPM, for example, the interval is 60000/90, roughly 667 ms between one beat and the next.
It happens when the implementation relies only on `setInterval` to trigger the sound, because that timer is not guaranteed by the browser to fire at the exact millisecond; the fix is to schedule the sound against the `AudioContext` clock, which does not suffer that kind of drift.
It is the first beat of each measure, played with a louder or different sound to mark where the beat group restarts; in 4/4, it is beat 1 of every group of 4.
Most popular music sits between 60 and 180 BPM; below that range you enter very slow ballad tempos (Largo, Grave), and above it fast electronic genres like drum and bass, which often run past 160 to 180 BPM.