Skip to main content

Hardware Targets

Supported Boards

BoardPlatformAudio OutputStereo
ESP32 (esp32dev)pioarduinoInternal DAC (GPIO 25) or I2S DACYes (I2S DAC)
Arduino UnoATmega328PPWM output on pin 9No (mono only)

Configuration is in platformio.ini. ESP32 is the primary target.

Choosing the Audio Pin

python3 -m dsl.compiler song.jam --pin 26 -o src/main.cpp

Pins 25/26 select the ESP32 internal I2S DAC; any other pin emits PWM output on that pin. The web editor's /api/upload endpoint accepts the same pin parameter. Without --pin, Mozzi's platform default is used.

Control Pins

Generated sketches read a play/stop button, a restart button, and a master volume pot. Pin assignments are selected at C++ compile time per platform:

FunctionESP32Arduino Uno (AVR)
BTN_PLAY (play/stop toggle)GPIO 18D2
BTN_RESTART (restart from top)GPIO 19D3
POT_VOL (master volume)GPIO 32A0
POT_FREQ (reserved)GPIO 34A1

The volume pot is read against the platform's native ADC range (12-bit on ESP32, 10-bit on AVR).

Stereo Features

PAN and LFO PAN require ESP32 with an I2S DAC. When any instrument uses LFO PAN, the compiler emits MOZZI_STEREO and MOZZI_OUTPUT_I2S_DAC config macros and guards with #ifdef __AVR__ #error.

ESP32 Upload (WSL2)

Requires usbipd-win for USB passthrough and user in dialout group. PlatformIO must be on PATH (pip install platformio).