[quote author=Paul Stoffregen link=msg=2636838 date=1456622768] Tim, will this create inaccurate (lower) frequencies if a significant number of interrupts occur during the delayMicroseconds() calls?
For example, someone could use Serial.print() right before calling TimerFreeTone(). Or they could have another library like Servo or FreqMeasure running, which is constantly servicing interrupts from the timers. In fact, if they need this timer-free code, it's a safe bet they probably have a project already doing something useful with all the timers, which often involves interrupts.
Wouldn't it be better to read micro() at the beginning, and then in busy loops for the delays, so you can automatically adapt to interrupts consuming CPU time? [/quote]
Thanks for the suggestion. I did some testing and the overhead is lower in a "while" loop checking millis() than a "for" loop. I figured it would be the other way around. Anyway, I'll probably take your advice and change the way the note duration is calculated and looped.