With MCUs becoming increasingly more powerful it was only a matter of time before they would enable some more serious audio-processing tasks. [Danilo Gabriel]’s ESP32Synth library is a good example here, which provides an ESP-IDF based 80+ voice mixing and synthesis engine. If you ever wanted to create a pretty impressive audio synthesizer, then all you really need to get started is an ESP32, ESP32-S3 or similar dual-core Espressif MCU that has the requisite processing power.
Audio output goes via I2S, requiring only a cheap I2S DAC like the UDA1334A or PCM5102 to be connected, unless you really want to use the internal DAC. With this wired up you get 80 voices by default, with up to 350 voices demonstrated before the hardware cannot keep up any more. You can stream multiple WAV files from an SD card for samples along with the typical oscillators like sinewave, triangle, sawtooth and pulse, as well as noise, wavetables and more.
In order to make this work in real-time a number of optimizations had to be performed, such as the removal of slow floating-point and division operations in the audio path. The audio rendering task is naturally pinned to a single core, leaving a single core for application code to use for remaining tasks. While the code is provided as an Arduino project, it uses ESP-IDF so it can likely be used for a regular ESP-IDF project as well without too much fuss.

Nice! I expect it will be most useful for standalone synthesizers as ESPs typically require too much current for use as modular synthesizers, but most of that usually goes to wireless features, so an RF silent module could sneak by. I’ll definitely give it a shot.
” as ESPs typically require too much current ” I doubt 100ma is going to break the bank on anything. Plus Wi-Fi can be turned on and off in code.
The real issue I see is that he wrote the code for arduino! When are people going to understand that ESP-IDF is only way to go for any hard core applications. Without getting to menuconfig that arduino does not give you access to, your tieing your hands on a plethra of features to unlock its real potential.
ESPs use a ton more than 100mA.. especially when wifi is on..can hit around 800mA during wifi transfers
the arduino core isnt bad, and you can still access ESP-IDF commands/features if you know what you are doing….
Looks very impressive but
I’d love to see a sample sound to see what’s possible with this library before I start tinkering with it.
Currently I am building an esp32 based modular synth (without wifi), 5 modules (wroom + small lcd + potentiometers + encoder) is drawing in total around on average 300mA.
From the Github: “ESP32Synth is not just a simple beep generator; it’s a full-fledged, mixing and synthesis engine written bare-metal over the ESP-IDF.”
Without WiFi it should cut it down a lot. I wonder how the ESP32P4 would perform in this application, faster processor and no radio.
There is already AMY, which is very powerful , has a neat command line, can deal with more voices than that, is multi-platform – runs even in a browser, can run in mesh mode with several instance on ESP-NOW, and is used on Amyboard and on Tulip Computer with an ESP32:
https://github.com/shorepine/amy
https://www.amyboard.com/
https://tulip.computer/
i wonder how those two compare
I’ve already tried using AMY and it’s a very interesting library, especially for its fidelity to DX7 and Juno. When I tried using it on the ESP32-DOWD-Q6 it didn’t work, it kept entering a Guru meditation error. Do you have any tips or solutions for this? And what is its maximum polyphony on the ESP32?
Makes me go back in-time to my electronics hobby project in 1980. Using the 1979 Texas Instruments SN76489. 💭
Thank you so much Maya Posch for this post here on Hackaday! Thank you so much for the compliments! And about the code being written for the Arduino IDE, I chose this one for beginners, to make it a little easier for them, but I’m sure it can be used with ESP-IDF in VS Code.