ESP32Synth : An Audio Synthesis Library For The ESP32

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.

2 thoughts on “ESP32Synth : An Audio Synthesis Library For The ESP32

  1. 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.

    1. ” 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.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.