toneAC v1.2 - Twice the volume, higher quality, higher frequency, etc.

teckel:
I'm considering creating another library named something like ToneTiny or NewTone where it's a plug-in replacement for Tone including pin assignment but is much smaller, faster, and better quality. I know lots of people that have timer interrupt issues with the Tone library and are looking for an alternative. Not that toneAC doesn't provide that already, but toneAC is designed more for highly accurate AC switching speed and maximum volume.

It was so easy I just did it, NewTone is a working library. Plug-in replacement for the Tone library, but over 1,200 bytes smaller compiled code size, faster, better quality sound, etc. Also uses timer 1 if you're having a conflict on timer 2 with the Tone library and some other library or hardware. Seriously took 30 minutes to write.

A little bit surprising is that toneAC still produces slightly smaller code (60-170 bytes). This is possible because toneAC doesn't need to find the ports and masks for the pins as it's fixed. But, I believe NewTone still has a place for those who need smaller, tighter code, yet need the flexibility of connecting to any pin. toneAC is still better in every way, with the exception being the fixed pins, but that's also why it's so good.

I'll probably package up NewTone and upload it later today for those who need a flexible drop-in replacement for the Tone library.

Tim