Dual Tone Audio

I don’t know if this would be usable to anyone but I have tried using Both Beep Pins in the Arduboy2 library to create overlapping tones This might be useful when playing SNDFX and game music at the same time.

An option for this is to use ArduboyTones for the music and BeepPin2 for the sound effects.


Something I’ve considered doing, when I find the time, is write a “player” function to replace beep.timer(). It would be something like:
beepPlay(const uint16_t *score)
I probably wouldn’t add this to the beep classes (unless it became very popular) but a developer could copy it into their sketch as a local function.

The score would be in PROGMEM and would be similar to the ArduboyTones format except that for each tone entry the frequency would be replaced by the count and the duration would be an 8 bit byte instead of a 16 bit word. Also, the low/high volume feature wouldn’t be available, of course.

The code should be smaller than using ArduboyTones and the scores would be smaller because of the duration values being a byte instead of a word.