ESP32 Mozzi Synthesizer Code
Drum machine with external DAC support for higher quality audio output and playing long music.
Parts and sourceBefore you start
Check the exact Speaker configuration against the upstream wiring or parts list.
Upstream README
esp32-mozzi-synthesizer-code
Code for a tiny synthesizer built with an ESP32, running the Mozzi library. It's simple, compact, and powerful.
You can find the info of the Hardware here :https://www.pcbway.com/project/shareproject/ESP32_Mozzi_synthesizer_3a3e8f1a.html
Project Overview
This project implements a versatile drum machine and synthesizer using the ESP32 microcontroller and the Mozzi audio synthesis library. The codebase includes multiple implementations showcasing different audio output methods and feature sets, from basic internal DAC output to advanced web-controlled drum machines with external DACs.

Folder Structure
platformio/bluetooth_speaker/
Standalone Bluetooth A2DP speaker for a classic ESP32 and MAX98357A, converted from the Arduino sketch. See the project README for wiring and build instructions.
platformio/drum_internal_dac/
Basic drum machine implementation using ESP32's built-in 8-bit DAC for audio output.
platformio/drum_external_dac/
Basic drum machine implementation using ESP32's external DAC for audio output.

platformio/drum_external_dac_long_music/
Drum machine with external DAC support for higher quality audio output and playing long music.

Wave form UI

Drum tracks

platformio/drum_external_dac_web/
Web-controlled drum machine with external DAC and modern web interface:
- WiFi-enabled browser control
- Real-time step sequencer with retro Mac-style UI
- Connect to
DrumMachine-APWiFi and visithttp://192.168.4.1 - Before building, copy
src/config_wifi.example.htosrc/config_wifi.hand set your ownAP_PASSWORD(8-63 characters).config_wifi.his ignored by git, and the build stops if it is missing.
Drum pads

Sequencer section

Getting Started
- Install PlatformIO for VS Code
- Open desired project folder
- Build and upload:
pio run --target upload - For web versions: Connect to WiFi AP and open browser to IP address
Configuration
- Each project includes a
platformio.inifile with ESP32-specific settings - Modify
config_wifi.hfor custom WiFi settings (web versions) - Audio output pins and DAC settings can be adjusted in the respective configuration files
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Test thoroughly on hardware
- Submit a pull request with clear description
License
This project is licensed under the MIT License – see the LICENSE file for details.