MIDI Controller With Keyboards





Introduction: MIDI Controller With Keyboards

Today we're building the 400 key MIDI controller using an Arduino and computer keyboards!

For the budget conscious music producers out there, this project is a great way to build an inexpensive control board for your digital audio workstation.

Or if you're just a musician with an odd taste for instruments, this geeky looking device will surely give you some strange looks.

Step 1: Watch the Video!

Check out this quick video to see how this mega MIDI device translates to an instrument and for a run-through of all the steps below from start to finish.

Click here to watch on YouTube

Step 2: What We'll Need...

We're going to build a box that translates signals from multiple keyboards into standard MIDI out signals.

To do so, we'll need:

  • An Arduino (I'll be using the UNO, but any other variants will work fine)
  • 2 PS/2 ports (as many as you'd like, as long as there's enough digital pins on the Arduino for it)
  • MIDI female port
  • Cardboard
  • A 220Ω resistor
  • Perboard
  • Wires
  • Keyboards!

Where to buy

Soldering gear:

Testing gear:

Step 3: Prepare the PS/2 Ports

Push a piece of perfboard through the bottom pins of the PS/2 ports to make soldering easier.

Clamp the PS/2 ports in place and solder wires to the four pins of each of the PS/2 port that we need to access (they are the Vcc, Ground, Clock, and Data pins - see diagram).

Hot glue the PS/2 ports together.

Step 4: Prepare the MIDI Port

Push a piece of perfboard through the bottom pins of the MIDI port to make soldering easier.

Add a 220Ω resistor in series to the Vcc pin (see diagram).

Solder wires to the three pins we need to access (they are the Vcc, Ground and Serial pins - see diagram).

Step 5: Wire Up the Arduino

Wire the PS/2 and MIDI ports to the Arduino as follows:

For the PS/2 ports:

  • Vcc pins goes to 5V
  • Ground to GND
  • Clock and Data pins goes to digital pins 4 to 11

For the MIDI port:

  • Vcc pin goes to the 220Ω resistor, then to 5V
  • Ground to GND
  • Serial to TX

Step 6: Upload the Arduino Program

I've made the source code to this project open-source, so simply head over my GitHub to download the Arduino sketch:


Plug in the Arduino to the PC, open up the sketch in Arduino IDE, and upload the program to the Arduino.

Step 7: Make a Box

Cut out a cardboard box template that fits all the components.

I decided to expose the MIDI and PS/2 ports in the front of the box while the Arduino USB port through the back so that it can be USB powered or reprogrammed easily.

Hot glue the components into place.

Step 8: Close Up the Box

Close up the box with some PVA glue, and admire your work of art.

Step 9: Find Keyboards

Just for fun, I decided to attach three old keyboards together with some wood pieces and screws.

Attach two strap buttons, put on a strap, and we have a very unique "keytar" to go with our MIDI box.

Step 10: Plug It in and Give It a Test

Plug in as many keyboards as you'd like and give it a test!

Watch the video to see the MIDI controller in action.


That's all I have for you today!

If you liked this Instructable, then perhaps you'll like some of my other projects!

You can check them out over at my YouTube channel.

New projects every Thursday! See you next week!



    • Epilog Challenge 9

      Epilog Challenge 9
    • Paper Contest 2018

      Paper Contest 2018
    • Science of Cooking

      Science of Cooking

    We have a be nice policy.
    Please be positive and constructive.



    works for me, so far. but....no every key that i press sends a signal, but i need all the keys on the ps/2 keyboard to play a midi note, does not matter wich one....any solutions?


    Is there any way to use USB Type B port instead of MIDI, cuz I already have an Uno and don't wanna waste anything. Plus, anyway to use it with an USB keyboard instead of PS/2?

    So I know I got the circuit right and everything, I set up my MIDI program, and I can see that I'm getting a MIDI signal coming to my computer from the keyboard, but nothing is registering in my actual software. I've tried to do everything I can in the actual MIDI software but nothing is working. Is there something weird in the code that I need to change or anything?

    the ps2 keyboards wont power up, I guess I messed up something with the code, cause I included the magicmusic library by selecting zip file, but when I copied the code from the link the magicmusic instructions are not colored i.e. the system is not detecting the instruction
    those who sucessfully built this please help me out to figure out where i went wrong

    i was having trouble with that too but when i went up to the top menu bar under the sketch tab there is an option called add file that i added all the stuff in the zip file except the readme and it complied for me

    Roses are red,
    Violets are blue
    U are so funny,
    And I like You????

    you are using a mega uno arduino, what if I have uno R3

    the ps/2 keyboards wont power up, I am using a clone arduino ;could that
    be a problem?
    Also you have have messed up the connections, first of all your diagram
    shows connections from a ps/2 plug instead of ps/2 socket that you
    demonstrated, also your code mentions the clock pin & data pin to be
    different than that of your connection,
    please clear out the confusion, I really need to build this

    Great project and good instructables, thank you Evan! I've built it too, though not without a bit of stumble - your diagram needs to clarify that the PS2 connectors are shown looking from the back of the female connectors, where the wires are soldered... I'm using the TurtleBeach MIDI-to-USB converter and the Universal Keyboard apps on the Windows 10 tablet, and everything works perfectly. Just a question: do you or anyone out there knows of the apps for SurfaceRT tablet that can play form MIDI port?.. That would be a perfect use for this abandoned but otherwise great tablet!..

    I like it.

    One quenstion,

    The connectors in circuit diagram are front view or back view?