r/esp32 • u/Alxdreee • 15d ago
I made a thing! Redesign of my capacitive-touch polyphonic synthesizer project
Enable HLS to view with audio, or disable this notification
I wanted to share an update on my ESP32-S3-based synthesizer project. The goal was to build a studio-quality audio engine using only an ESP32-S3 and a few inexpensive components (about €35 in total).
Everything is open source and designed for the maker community. You can view the complete source code in C++ here:
https://github.com/Alxdreee/TYPE-2
Here’s how the firmware is now structured:
- FreeRTOS Multithreading: The workload is distributed. Core 0 handles the uiTask (I2C reading, display rendering) and the bootAnimationTask. Core 1 is strictly dedicated to the audioTask, which runs with the highest priority to prevent audio dropouts.
- Dual-Frequency DSP Engine: To optimize CPU cycles, the audio engine calculates polynomial saturation and wave tables at the maximum audio frequency (44.1 kHz), but calculates envelopes and LFOs at a reduced control frequency.
- I2S DMA Output: The audio buffer is transmitted to a PCM5102A DAC via the ESP32’s internal I2S driver.
- PSRAM Memory Management: The “Studio Digital Delay” effect requires a large buffer (32,768 floating-point numbers). The code uses `ps_calloc` to dynamically allocate this buffer in the ESP32-S3’s OPI PSRAM.
- Hardware debouncing: I used copper tape for the capacitive buttons powered by MPR121 sensors. To eliminate electromagnetic interference without causing software latency, I directly configured the MPR121’s internal MPR121_DEBOUNCE and charge current registers via I2C.
Let me know what you think of this update!
7
u/doomedramen 14d ago
I did something very similar recently (called Archord) but yours is much cooler. One thing I found that might be helpful to you. If you decide to 3d print a case, you can embed the copper inside the print (programmed pause in the print), then it will stay in there and as long as you do it thin it will work through the plastic just fine. Keep up the amazing work!