partials-dev / pulse

A time traveling metronome built with web technologies.
0 stars 0 forks source link

Tempo actually changes a beat later than it should #23

Open luca-aurelia opened 7 years ago

luca-aurelia commented 7 years ago

For example, starting with these settings

bpm 120, change by 5 bpm every 4 beats

You see the following beat durations

500 ms
500 ms
500 ms
500 ms

500 ms // first beat at 125 bpm, duration should be 480 ms
480 ms
480 ms
480 ms

The first step towards resolving this will be to write automated tests that catch the problem. Doing so may require a refactor of our audio code. But since accurate timing is the primary function of our app, it will be worth the effort. Tests will also guard against future regressions.