overtone/overtone — pull request #141 by soulflyer (2012-08-20 05:04:25+00:00)
Title: Added bar to metronome

Osc events can be scheduled to happen at the beginning of the next bar using (metro-bar metro) in exactly the same way that we use (metro-beat metro)
The beats per bar can be set using (metro-bpb metro n)
Changing bpb and bpm on the fly works, but with some small timing issues when changing bpm (only noticeable if the change is large) due to the limitations of the at function. So far I have not found a way to ensure that bpm changes can be forced to happen only at the start of a bar, so whereas the calculated bar length changes directly from the old value to the new, there may be a bar consisting of some beats at the old bpm and some at the new bpm depending on when the change happens. This causes a slight pause before the first beat of a new bar if the bpm is adjusted downwards. Conversely the first beat of a new bar when changing the bpm up may happen a little to soon. This should present no problems in most cases, but needs to be considered if you want to play with radical timing changes.
As far as I can tell there is no effect whatsoever if metronome is used as before.