Tempo Shifting Metronome is a metronome app with the unique ability to automatically change the tempo while playing. It has customizable sounds, and can play a range of note divisions.
A metronome is used by musicians when learning a new piece, warming up before playing, or practising speed and dexterity exercises. In each of these cases it is useful to start at a slower tempo and gradually increase the tempo as proficiency grows. Ideally the tempo increases are small, incremental, and frequent. The player has to stop playing and select a new tempo each time, which is cumbersome and distracts from the focus on playing. This inspired me to create a tempo shifting metronome, which can increase the tempo gradually while playing, based on user-set parameters.
The UI design goal was clean and minimalist. Advanced settings for custom sounds and tempo shifting are collapsed by default, since they are not needed for basic metronome functions. The tempo shifting abilities will be unfamiliar to new users, so it was necessary to include user instructions, which are also collapsed by default to reduce visual clutter. The controls are triggered on 'pointerdown' events rather than 'clicked'. This gives a more responsive feel, and allows for more accuracy when tapping a tempo.
The main thread of a JavaScript app has some latency which will cause slight timing inconsistencies in a metronome. Web Audio API offers a precise audio clock, and so sounds can be scheduled in advance to play with sub-millisecond precision. This adds complexity to the implementation. Each sound must have a reference saved when it is scheduled in case playback needs to be altered or cancelled. The end result is a metronome which retains precise accuracy even at high tempos with small note divisions.
Tempo Shifting Metronome on GitHub ↗