Arduino library to play MOD, WAV, FLAC, MIDI, RTTTL, MP3, and AAC files on I2S DACs or with a software emulated delta-sigma DAC on the ESP8266 and ESP32
I need a tone() function that can redirect audio to the DAC. ChatGPT is hallucinating and recommended <AudioGeneratorTone.h>, which, of course, does not exist.
MP3 works fine, but I want to use tone() on the same speaker without additional wiring. I have seen Arduino SimpleTone <I2S.h>, but I don't know how to change the default pinout for ESP32. I2S.setBCLK(bclkPin), I2S.setDOUT(doutPin), or I2S.setLRCLK(wclkPin)? are unknown on Arduino 1.8.19. That's why I prefer ESP8266Audio.
I had a look into AudioGeneratorRTTTL.cpp, but I don't understand how the tones are generated. I decided to play RTTTL notes instead, but I feel this is overloading with unnecessary code and memory waste. Furthermore, the notes sound different, and the mapping is inaccurate.
I need a
tone()
function that can redirect audio to the DAC. ChatGPT is hallucinating and recommended<AudioGeneratorTone.h>
, which, of course, does not exist.MP3 works fine, but I want to use
tone()
on the same speaker without additional wiring. I have seen Arduino SimpleTone<I2S.h>
, but I don't know how to change the default pinout for ESP32.I2S.setBCLK(bclkPin)
,I2S.setDOUT(doutPin)
, orI2S.setLRCLK(wclkPin)
? are unknown on Arduino 1.8.19. That's why I prefer ESP8266Audio.I had a look into
AudioGeneratorRTTTL.cpp
, but I don't understand how the tones are generated. I decided to play RTTTL notes instead, but I feel this is overloading with unnecessary code and memory waste. Furthermore, the notes sound different, and the mapping is inaccurate.Click to expand
``` #includeI would be happy to see
beep()
with the same usage astone()
in the next release.