How do you connect a keyboard to a computer with MIDI?
For most digital pianos, plug a USB cable from the keyboard into your computer, open a MIDI-aware app in Chrome, and allow MIDI access when asked. If your keyboard has Bluetooth MIDI, you can do the same thing wirelessly.
MIDI sounds technical, but it is really just a way for your keyboard to tell a computer which keys you pressed and how hard. No sound travels through it, only messages like "this key went down". That is why one cable (or one Bluetooth link) is usually all you need to turn a keyboard into a controller for games, apps and lessons.
What you need before you start
Check three things first:
- Your keyboard's ports. Look at the back or side. A square-ish USB port (often labeled "USB to Host") or a small USB-C port means you can connect with a cable. A Bluetooth logo or "Bluetooth MIDI" in the manual means wireless works too. Two round sockets labeled MIDI IN and MIDI OUT mean an older style connection (see below).
- The right cable. Many keyboards use a USB-A to USB-B cable, the same shape often used for printers. Others use USB-C. Use a data cable, because some cheap charging cables carry power only.
- A browser that supports MIDI. Chrome on a computer is the safest choice. Browsers ask your permission before a website can see your MIDI device.
Option 1: connect with a USB cable
This is the most reliable method, and it needs no pairing or settings.
- Turn the keyboard on.
- Plug one end of the cable into the keyboard's USB port and the other into your computer.
- Wait a few seconds. Most modern computers recognize a MIDI keyboard on their own, with no driver needed. Some brands offer an optional driver, but it is not usually required for basic playing.
- Open Chrome and go to the app or game you want to use.
- When Chrome asks to use your MIDI devices, choose Allow.
- Press a few keys and see if the app reacts.
One point that surprises people: the keyboard may stay silent through the computer, or play its own sound at the same time as the app. That is normal. Many keyboards have a setting called Local Control that decides whether the keys also play the keyboard's own speakers.
Option 2: connect with Bluetooth MIDI
Bluetooth MIDI means no cable across the room, which is handy for a parent setting up a keyboard for a child. The steps depend on your device, and the details vary by system and keyboard model, so check your manual too.
- Mac: open Audio MIDI Setup, show the MIDI Studio window, click the Bluetooth icon, and connect your keyboard when it appears.
- Android: use Chrome and allow Bluetooth and MIDI access when the website asks. Some keyboards also need to be switched into pairing mode first.
- iPhone and iPad: Safari does not support this, so you need the free Bluefy browser, which allows websites to use Bluetooth.
- Windows: support for Bluetooth MIDI in the browser can be hit and miss. If it does not work, a USB cable is the easier route.
Bluetooth adds a tiny delay compared with a cable. Most beginners will not notice it, but if the notes feel late, the guide on how to fix MIDI latency in a piano app walks through the usual causes.
Older keyboards with round MIDI sockets
If your keyboard has only the five-pin round MIDI sockets and no USB port, you can still connect it. You need a MIDI to USB interface cable or small adapter. Plug the MIDI OUT end into the keyboard's MIDI OUT socket (that is the socket that sends your playing), and the USB end into the computer. Quality varies a lot between adapters, so read reviews from people using the same computer system as you.
If you are still choosing a keyboard, USB MIDI is common on digital pianos today, and it is worth checking before you buy. Our guide on how to choose a first digital piano covers what else to look for.
Trying it out with a game
Once the connection works, a game is a friendly way to test it. In Keyfall, the free browser game at learnpianogame.com, you can pick your keyboard as the input, and the notes fall toward the line while you play them. It accepts USB MIDI and Bluetooth MIDI, and you can also use a microphone, the computer keyboard or the touch screen if the connection gives you trouble. Starter mode is a calm place to begin because it waits for you and shows which key to press.
If nothing happens
Work through this short list, one step at a time:
- Reload the page after plugging in. Browsers often detect MIDI devices only when a page loads.
- Check the permission. Click the lock or settings icon beside the web address and make sure MIDI access is allowed.
- Close other music apps. Some systems let only one program use the keyboard at a time.
- Try another cable or USB port. A power-only cable is the most common hidden culprit.
- Switch the keyboard off and on, then reconnect it.
- Use Chrome. Some other browsers do not support MIDI at all.
If one method keeps failing, try the other. A keyboard that is awkward over Bluetooth often works perfectly on a cable, and the reverse can be true for phones and tablets.
More about buying and care
FAQ
Do I need to install a driver to use a MIDI keyboard?
Usually not. Most modern computers recognize USB MIDI keyboards automatically, though a few brands offer optional software for extra features.
Will my keyboard make sound through the computer?
Not by itself. MIDI sends only the key presses, so the app or game produces the sound. You may hear the keyboard's own speakers too, which you can change with its Local Control setting.
Can I connect a keyboard to a phone or tablet?
Often yes. On Android, Chrome can work with Bluetooth MIDI or a USB adapter, and on iPhone and iPad you use the free Bluefy browser for Bluetooth.
Is USB or Bluetooth better for MIDI?
USB is usually the more reliable choice and has slightly less delay. Bluetooth is more convenient, and for most beginners it works well enough.
Does any keyboard work with MIDI?
Not every one does. Digital pianos and most keyboards with a USB port or MIDI sockets work, but very basic toy keyboards often have no MIDI at all, so check the manual.
Why does Chrome ask for permission to use MIDI?
Websites can only see your MIDI devices if you allow it, which protects your privacy. Choose Allow when you trust the site, and you can change it later in the page settings.
Practise it on your own piano. Keyfall is a free piano game: notes fall toward the keys and you play them on a digital piano, keyboard, phone or computer.
Play free