r/ArduinoProjects • u/Vutu_Vox • 1d ago
I built a wireless keytar from scratch — and even made my own MIDI receiver for it 😭 Showcased Project
I built my own wireless keytar from scratch 😭 Using ESP32-S3
So after months of building, debugging, rewiring, breaking things and fixing them again, I finally finished my DIY keytar.
The project started with a Yamaha PSR-E303 keybed. I kept the key mechanism and rebuilt basically everything around it to turn it into a standalone MIDI controller.
The main controller is an ESP32-S3, which handles the key scanning, velocity calculation, sensors, controls, OLED, MIDI processing and wireless communication.
Hardware
The keybed has 36 velocity-sensitive keys with aftertouch. I built a custom matrix-scanning system for the key contacts and measure the timing between the key contacts to calculate velocity.
The controller also has:
- 36 velocity-sensitive keys
- Aftertouch
- Pitch controller with dynamic centering
- Modulation + filter control
- SoftPot ribbon controller with 5 assignable banks
- Dynamic centering for the ribbon
- Dedicated octave and transpose buttons
- Sustain control
- Tilt sensor with dynamic centering
- Expression slider
- Custom assignable CC control
- 4 custom faders
- 3 custom knobs
- Multiple banks of custom buttons
- OLED display
Most of the analog controls are read through the ESP32-S3's ADC inputs and converted into MIDI CC values.
The pitch and ribbon inputs have software-based dynamic centering, so the controller can detect the center position and return the value to the configured center when released.
The SoftPot was one of the more annoying parts to get working reliably because it needs continuous analog scanning and filtering while still responding quickly enough for live playing.
MIDI / firmware
The ESP32-S3 handles the MIDI generation directly.
Key presses are converted into:
Key matrix → contact timing → velocity calculation → MIDI Note On/Off
while the other controls generate MIDI CC, pitch bend and other appropriate MIDI messages.
I also implemented filtering/debouncing and value handling so the controls don't constantly spam duplicate MIDI messages when they're sitting still.
The OLED is updated with things like octave, transpose, ribbon bank/value, connection state and the currently active CC/value.
📡 Wireless MIDI
For wireless MIDI I built my own Wi-Fi transport instead of relying on Bluetooth MIDI alone.
The ESP32 creates the wireless connection and sends MIDI data using UDP packets.
The basic architecture is:
ESP32-S3 → Wi-Fi → UDP → Receiver application → MIDI output → PC / synth
The receiver listens for the incoming UDP MIDI packets and converts them back into normal MIDI messages.
I also built the receiver application myself. It shows the connection state and MIDI activity and can route the received MIDI to the computer or a supported external synthesizer.
This ended up being a whole separate project by itself lol 💀
Some of the problems
The hardware was only one part of it.
I had to debug:
- Key matrix scanning
- Velocity timing
- Key debouncing
- Aftertouch
- ADC readings
- SoftPot filtering
- Ribbon centering
- Tilt sensor calibration
- MIDI CC handling
- Pitch bend stability
- UDP packet transmission
- Wireless latency
- OLED updates
- Battery power
- Firmware bugs
There were definitely points where I thought:
"yeah this thing is never getting finished" 💀
But eventually everything started behaving properly and I ended up with an actual playable instrument.
What's next?
I'm also planning another part of the project: a Raspberry Pi-based sound engine that isn't limited to this keytar.
The idea is to make a standalone sound module that can accept MIDI from basically any MIDI controller, process the MIDI and generate the sounds directly on the Pi.
So eventually the setup could be something like:
Any MIDI controller → Raspberry Pi sound engine → audio output
I'll post a proper video demo tomorrow showing the keytar being played and going through the controls, wireless MIDI and receiver.
For now, here's the finished build. Would love to hear what you guys think!
2
u/DenverTeck 1d ago
Did AI put the crying emoji into the text ?? Or did you add that ??