How to Turn an Old Keyboard into a DIY Synthesizer

Every junk drawer has one: the old membrane keyboard that came free with a computer a decade ago, replaced by something mechanical and shiny. Before you toss it in the bin, consider this — those keys, that plastic shell, and even the internal controller board can become the guts of a surprisingly capable DIY synthesizer. It's one of the most satisfying maker projects around, and it teaches you a ton about how synths actually work.

Why a Keyboard Makes a Great Starting Point

An old computer keyboard gives you three things for free: a chassis, a key mechanism, and a matrix of switches that already reads keystrokes. Synthesizers, at their core, need exactly that — a way to tell a sound engine which note you're pressing. Whether you go the software route or build hardware, salvaging the enclosure and keys saves hours of fabrication and keeps e-waste out of landfill.

Membrane keyboards are the easiest to mod because their internals are simple ribbon matrices. Mechanical boards work too, though you'll need to be more careful desoldering and re-wiring the switches.

Choose Your Sound Engine

Your first big decision is what actually makes the noise. There are three common paths:

  • Microcontroller-based synthesis: A Teensy, Raspberry Pi Pico, or Arduino-compatible board running a synth library can generate audio directly, with tutorials widely available online.
  • Single-board computer: A Raspberry Pi running software synthesizers gives you huge flexibility and polyphony, at the cost of slightly more setup.
  • Hybrid approach: Use the salvaged keyboard purely as a MIDI controller and pair it with any existing synth module or software on your computer.

For beginners, the hybrid route is the gentlest introduction — you get something playable within an afternoon, then can graduate to a standalone build later.

Reading the Key Matrix

The heart of the project is decoding the keyboard's matrix. Inside a membrane board, rows and columns of traces intersect under each key; pressing a key connects one row to one column. Your microcontroller scans these lines rapidly to detect presses.

You have two options here. The clean way is to trace the matrix with a multimeter, map every key to a row/column pair, and wire the ribbon directly to your microcontroller's pins — then write or adapt a scanning routine. The shortcut is to leave the keyboard's own controller board in place and intercept its USB output, translating keypresses into notes with a small script. The first approach is more educational; the second gets you playing faster.

Wiring and Firmware

Once your matrix is understood, connect it to your microcontroller through diodes if needed (to prevent ghosting when multiple keys are pressed) and flash firmware that:

  1. Scans the matrix continuously.
  2. Maps specific keys to musical notes — typically a two-octave layout across the letter rows.
  3. Sends MIDI note-on and note-off messages, either over USB or to your internal synth engine.
  4. Handles velocity in a basic way, or at least debounces contacts so you don't get machine-gun repeats.

Plenty of open-source firmware projects do most of this already; study one rather than starting from a blank file. Add a small OLED display and a couple of potentiometers for parameter control, and suddenly you have a real instrument interface.

Finishing Touches

Reassemble everything in the original case, cutting holes for your new controls with a rotary tool. Add rubber feet, label your pots with a label maker or paint pen, and consider a coat of paint to hide the "free with purchase" aesthetic. Finally, spend an evening with a drum loop and a delay pedal — nothing motivates further tinkering like making your first wobbly bassline on hardware you built yourself.

A dead keyboard, a cheap microcontroller, and a weekend: that's all it takes to go from landfill to lead synth.

Related reading