A simple API for building a metronome