what is it
The ESP32-MIDI-synth is a minimum effort synthesizer. It consists of only 11 resistors, a 6N318 optocoupler, an ESP32 and some sockets.
All of this is enough to make an 8 channel MIDI synthesizer.
The tones are produced by letting the ESP32 produce PWM signals. The API of the ESP32 has functions for PWM of LEDs and this is also made usable for audio.
Letting the ESP32 produce a frequency x is only 3 steps:
- ledcSetup(channel, pwm_frequency, resolution)
- ledcAttachPin(output_pin, channel)
- ledcWriteTone(channel, frequency)
(one resistor is on the back)
1 note played
3 notes played
make it yourself
- ESP32 code: esp32-sound.zip
You may want to add an opamp voltage follower before the audio-jack and a voltage divider to bring the signal to line level.
what does it sound like
The audio is quite loud (3.3V while line voltage is around 1.5V). Because of that the recording sounds distorted.
license of the source code and schematics
All of this is, of course, released in the public domain.
mediocresaw - a "supersaw" implemented using a couple of arduinos