ABetterMetronome using TAAE (a source code example)
Over the past few weeks I've come across an unusual amount (for me :-) of talk about metronomes and timing. After looking through a bunch of code I found that alot of people are using NSTimer or performSelector:withObject:afterDelay: or some other "not the most accurate" mechanism. Sometimes this may be fine for your app but if you want rock-solid metronome performance, IMO, the best way is to count frames. The audio sub-system will always deliver 44,100 (for example) samples per second so if you piggy-back off of this fact you can have the tightest metronome performance around.
So, I put together an example - hope it helps someone! Please comment and make suggestions if you know of a better way to handle anything here.