A simple metronome engine