Almost working version of the rhythm trainer.