-
Notifications
You must be signed in to change notification settings - Fork 18
Home
Danilo Gabriel edited this page Aug 29, 2026
·
2 revisions
ESP32Synth is a highly optimized, ultra-efficient, polyphonic synthesizer library for ESP32 microcontrollers. It has been tested on the S3 and the classic model but is compatible with all others.
Designed for raw performance, it uses 100% fixed-point 32-bit math in its hot paths. Zero floats. Zero compromises. This allows it to render hundreds of simultaneous voices (up to 500 on the ESP32-S3) while maintaining pristine audio quality at 48kHz.
- Extreme Polyphony: CPU and RAM highly optimized. Renders 300+ voices easily.
- Multiple Output Modes: I2S (16/32-bit), Hardware PWM (Zero-jitter ISR), PDM, DAC, and Custom Hooks.
- Advanced Synthesis: Saw, Square, Triangle, Sine, Noise, Wavetables, Multi-zone Samples, and SD Card Streaming.
- Modulation & FX: Built-in ADSR, Vibrato, Tremolo, Portamento and Arpeggiator.
- Tracker-Style Instruments: Create complex instruments with wave-morphing and volume sequencing.
Include the library and the notes definitions. Set the master volume to a safe level to prevent integer clipping.
#include <Arduino.h>
#include <ESP32Synth.h>
ESP32Synth synth;
void setup() {
synth.setMasterVolume(200);
synth.begin(4, 15, 2);
synth.setEnv(0, 50, 100, 200, 300);
}
void loop() {
synth.noteOn(0, c4, 255);
delay(1000);
synth.noteOff(0);
delay(1000);
}The example above initializes the synthesizer via I2S using standard pins (BCK=4, WS=15, DATA=2) and plays a middle C (C4).