I built a wireless keytar from scratch — and even made my own MIDI receiver for it 😭
▲ 41 r/Keytar+2 crossposts

I built a wireless keytar from scratch — and even made my own MIDI receiver for it 😭

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!

u/Vutu_Vox — 3 days ago

I built a wireless keytar from scratch — and even made my own MIDI receiver for it 😭

My First Custom Project after many years and Last project during school. ha ha

So... after months of building, debugging, rewiring, breaking things and fixing them again, I finally finished my DIY keytar.

It started with a Yamaha PSR-E303 keybed, and I basically turned it into a completely standalone MIDI instrument with my own electronics, firmware, controls, enclosure and wireless system.

🎹 What this thing has

  • 36 velocity-sensitive keys
  • Aftertouch
  • Pitch control with dynamic centering
  • Modulation + filter control
  • 5-bank assignable ribbon controller
  • Dynamic-centering ribbon controller
  • Dedicated octave + transpose controls
  • Sustain
  • Tilt sensor with dynamic centering
  • Expression slider
  • Custom assignable CC control
  • 4 custom faders
  • 3 custom knobs
  • Custom buttons with multiple banks/modes
  • OLED display for octave, transpose, ribbon values, connection status and CC/value info
  • USB MIDI
  • Bluetooth MIDI
  • Wi-Fi MIDI

Basically, almost every control on the thing can be assigned to MIDI stuff depending on what I'm controlling.

The pitch and ribbon controls also use dynamic centering, so they return to the center automatically instead of having to manually put them back.

📡 I also made my own receiver app

This was another whole rabbit hole 💀

I wanted the keytar to have its own wireless MIDI setup, so I built a receiver app for it too.

The setup is basically:

Keytar → Wi-Fi → my receiver app → PC / synth

The app handles the wireless MIDI connection and lets me route the MIDI to the computer or a supported external synth.

It also has its own interface for connection status and MIDI activity, so I can actually see what's happening instead of just praying that the packets arrived 😭

🛠️ And yeah... it was NOT easy

The key scanning, velocity detection, controls, wireless MIDI, latency, OLED, battery power and firmware all gave me problems at some point.

There were quite a few moments where I was like:

"yeah this thing is never getting finished" 💀

But somehow it actually works now. And parts were really cheap in India like 4-5k Rs only

And I'm not completely done with the whole idea yet. I'm also planning to make a custom Raspberry Pi-based sound engine that can basically work with any MIDI controller, not just this keytar.

The idea is to have the Pi handle the sounds and turn any MIDI controller into its own little standalone instrument.

I'll post a proper video demo tomorrow showing me playing it and explaining how the whole system works.

For now, here's the finished build. Would love to know what you guys think 👀

u/Vutu_Vox — 3 days ago