How to connect a piano keyboard to a computer: USB, MIDI and Bluetooth

A digital piano on its own is a complete instrument. Connect a piano keyboard to a computer and the same keys can play software instruments, record what you play and write notes into a score for you.

This guide shows the three ways to connect a digital piano or MIDI keyboard: USB, a 5-pin MIDI interface and Bluetooth MIDI. It gives the steps on Windows, macOS, iPad and Android, and fixes for the usual problems: no sound, a delay, a keyboard the software can’t see. It ends with two free things to do once you’re connected: play a piano in your browser and enter notes in MuseScore Studio.

To connect a digital piano or MIDI keyboard to a computer, run a USB cable from its USB to Host port to the computer, or a USB-MIDI interface from its 5-pin MIDI OUT. Then choose the keyboard as the MIDI input in your software. Most current keyboards need no driver, and the computer recognizes them in a few seconds.

Three ways to connect a piano keyboard to a computer

Look at the back panel of your piano first. The sockets there decide the cable, and the table matches each one to what you need.

Socket on the pianoWhat it looks likeWhat you needWorks with
USB to Host (USB Type B)A squarish USB socket, often labeled “USB to Host” or “USB Computer”A USB-B to USB-A cable, or USB-B to USB-C for newer laptopsWindows, macOS, Linux, ChromeOS; iPad and Android with an adapter
USB-C (newer controllers)A small oval socketA USB-C cableComputers, USB-C iPads and Android phones directly
MIDI OUT and MIDI IN (5-pin DIN)Two round sockets with five pins, labeled OUT and INA USB-MIDI interface (cable with two 5-pin plugs and a USB plug)Any computer; iPad and Android with an adapter
Bluetooth MIDINo socket; a Bluetooth button or menu item on the pianoNothing to buy; pair inside the softwaremacOS, iPad, iPhone, Android; limited on Windows
USB to Device (USB Type A)A flat, rectangular USB socketNot for computers: this port takes a flash driveSaving recordings and songs to a USB stick

If your piano has both USB to Host and 5-pin MIDI, use USB. One cable carries everything, and you don’t need an interface. The 5-pin sockets are there for older studio gear and for pianos made before USB became standard.

What a MIDI keyboard sends to the computer

MIDI stands for Musical Instrument Digital Interface, a standard from the early 1980s that lets instruments and computers talk to each other. A MIDI keyboard is any keyboard that sends these messages: a digital piano, a home keyboard, or a controller with keys and no sound of its own.

The messages describe what your hands do. Each one says which key went down, how hard you struck it (called velocity), when you let it go, and what the pedals are doing. The sustain pedal, for example, sends controller number 64. MIDI carries no sound at all. The software that receives the messages decides what you hear.

That is why one connection does so much. The computer can turn the same notes into a grand piano, a guitar or a string section. It can slow a recording down without changing the pitch, fix a wrong note, or print the notes as sheet music.

Connect with a USB cable, step by step

USB is the route most people take today. The steps are the same on every computer.

  1. Find the USB to Host socket on the back or underside of the piano. Check the manual if there are two USB sockets: the flat USB to Device one is for flash drives.
  2. Get the right cable. Most pianos take a USB-B plug, the square one used by printers. The other end is USB-A or USB-C to match your computer.
  3. Turn the piano on and plug in the cable. The computer recognizes the keyboard as a USB MIDI device. Most current models are “class compliant”, which means the operating system’s own driver handles them.
  4. Install the maker’s driver only if nothing appears. Some older models need the manufacturer’s USB-MIDI driver, which piano makers publish free on their support sites.
  5. Open your software and choose the keyboard as the MIDI input. Play a few keys and watch for a light, a meter or an on-screen key that moves.

Plug the cable straight into the computer when you can. A cheap unpowered USB hub can make a keyboard drop out mid-song.

Connect a keyboard with only 5-pin MIDI sockets

An older digital piano or synthesizer may have only the round 5-pin MIDI sockets. You then need a USB-MIDI interface: a small box, or a cable with two 5-pin plugs on one end and a USB plug on the other. It translates the old MIDI signal into USB.

The plugs cross over, and this is the step most people get backwards. The interface plug marked IN goes into the piano’s MIDI OUT socket, because the computer takes in what the piano sends out. The plug marked OUT goes into the piano’s MIDI IN socket. Some cables label the plugs from the piano’s side instead, so read the cable’s own instructions.

To play the piano into the computer you only need the OUT-to-IN connection. The second plug matters when you want the computer to play the piano’s own sounds, for example to hear a recording back through its speakers.

Connect with Bluetooth MIDI

Many recent digital pianos offer Bluetooth, and there are two kinds. Bluetooth audio streams music from a phone to the piano’s speakers. Bluetooth MIDI sends your playing to an app. Check the manual for the words “Bluetooth MIDI”, since a piano with Bluetooth audio only can’t send notes this way.

Bluetooth MIDI pairs differently from headphones. You usually don’t pair it in the phone’s or tablet’s Bluetooth settings. You pair it inside the music app, or on a Mac in Audio MIDI Setup.

On Windows, Bluetooth MIDI is the weak spot. Most Windows desktop music programs don’t see a Bluetooth MIDI keyboard without the maker’s utility or a third-party bridge. Microsoft lists Bluetooth MIDI for its new Windows MIDI Services as future work (as of October 2026). A USB cable is the dependable route on a Windows PC.

Steps for Windows, macOS, iPad and Android

The cable is the same everywhere. What changes is where you check that the device sees the keyboard.

Windows

Plug in the piano, wait a few seconds, then open your music program and look for its MIDI input or MIDI devices setting. If the keyboard isn’t listed, open Device Manager and look for the piano’s name. If it’s missing there too, install the maker’s driver and restart.

Older Windows MIDI drivers let only one program use a keyboard at a time. If the piano works in one program and is invisible in another, close the first one. Windows 11’s new MIDI system, Windows MIDI Services, lets several programs share one keyboard, and Microsoft began a gradual rollout of it in February 2026.

macOS

A class-compliant keyboard works on a Mac without a driver. To check it, open Audio MIDI Setup (in Applications › Utilities), then choose Window › Show MIDI Studio. Your piano appears as an icon when the Mac sees it.

For Bluetooth MIDI, click the Bluetooth configuration button in the MIDI Studio toolbar, put the piano into pairing mode, select it in the list and click Connect.

iPad and iPhone

A USB-C iPad takes the piano’s USB cable directly: use a USB-B to USB-C cable. An iPad or iPhone with a Lightning port needs Apple’s Lightning to USB Camera Adapter, or the Lightning to USB 3 Camera Adapter, which has a second Lightning port for power.

Use a class-compliant keyboard, since iPadOS doesn’t install drivers. A small USB controller that takes its power over the cable may need more current than the iPad supplies. Give it its own power supply, a powered USB hub or the USB 3 adapter with its power port connected.

For Bluetooth MIDI, pair inside the app. In GarageBand for iPad, open Settings in the control bar, then Advanced › Bluetooth MIDI Devices, and turn on the switch next to your piano.

Android

Android has built-in MIDI support from version 6.0 (Marshmallow), although each phone maker decides whether to enable it. Connect the piano with a USB-C OTG (on-the-go) adapter, or a USB-B to USB-C cable, then open a music app and choose the keyboard as its input. MIDI over Bluetooth works on phones with Bluetooth Low Energy, and you pair it inside the app.

Not every Android app reads MIDI. If one ignores the keyboard, try an app that lists “MIDI keyboard support” in its description.

Where the sound comes from: MIDI, audio and latency

Once the keyboard is connected, the computer makes the sound you hear through its speakers or headphones. The piano’s own speakers play their own sound, unless you turn the piano’s volume down. Playing both at once gives a doubled, slightly smeared sound.

Most digital pianos have a setting called Local Control for this. Local Control off disconnects the piano’s keys from its own sound engine, so only the computer plays. Turn it back on when you finish, or the piano will seem silent next time.

The delay between pressing a key and hearing the computer’s note is called latency. Its main cause is the computer’s audio buffer, the short queue of sound the system prepares in advance. A bigger buffer is safer against clicks and dropouts, and it adds delay you can feel. In MuseScore Studio and most music programs you can change the buffer size in the audio settings.

On Windows, the audio driver matters most. ASIO (Audio Stream Input/Output) is a low-latency driver standard from Steinberg, and most USB audio interfaces ship with an ASIO driver. With a laptop’s built-in sound chip, the free generic driver ASIO4ALL helps on some machines and causes trouble on others. Macs use Core Audio, which needs no extra driver for low latency.

If the delay still bothers you, plug headphones into the piano and listen to its own sound while the computer records the MIDI. That setup has no latency at all, since the piano plays its sound directly.

MIDI is also different from recording audio. To record the sound of the piano itself, connect its line out or headphone output to an audio interface. That captures a sound file you can share, but no notes the computer can edit or write as a score.

Play a piano in your browser with your MIDI keyboard

The quickest test of a new connection needs no software install. The Pro tab of our free virtual piano reads your keyboard through Web MIDI. That is a browser feature that lets a web page receive MIDI messages.

  1. Connect the keyboard and open the virtual piano in Chrome, Edge or Opera.
  2. Switch to the Pro tab, find the MIDI keyboard row and click Connect.
  3. Allow MIDI access if the browser asks. The connected keyboard’s name appears next to the button.
  4. Play. The on-screen keys light up with every note.

The Pro tab reads what you play, how hard you play it and the sustain pedal. A soft touch gives a soft note, and holding the pedal keeps notes ringing. It ignores other messages, so knobs and pitch wheels on a controller do nothing there. A keyboard plugged in after you click Connect appears on its own.

From there you can pick a grand piano, acoustic guitar or electric piano sound, show 37, 49 or 61 keys, and practice with the built-in metronome. The recorder plays your take back on the keys and saves it as a WAV file. The on-screen keyboard reaches from C2 to C7 at its widest, so the lowest and highest notes of an 88-key piano have no key to light up.

Web MIDI works in Chrome, Edge, Opera and other Chromium-based browsers on Windows, macOS, Linux and ChromeOS, and in Chrome on Android. Safari doesn’t support it, on a Mac or on an iPhone or iPad. Our virtual piano asks for a Chromium browser, so use Chrome or Edge to play it from a keyboard.

Enter notes in MuseScore Studio with a MIDI keyboard

MuseScore Studio is free, open-source notation software for Windows, macOS and Linux, available from musescore.org. With a keyboard connected, you choose the length of each note on the computer and play its pitch on the piano, which is much faster than clicking notes in with a mouse. The steps below follow the MuseScore Studio handbook:

  1. Check the device. Open Edit › Preferences (Ctrl+comma on Windows, Cmd+comma on a Mac), go to Audio & MIDI and select your keyboard as the MIDI input device.
  2. Start note input. Select the measure where you want to begin and press N.
  3. Pick a duration. Press a number key: 4 is an eighth note, 5 a quarter note and 6 a half note.
  4. Play the pitch. Each key you press enters one note of that length, as long as you release it fully before the next one. Press several keys together to enter a chord.

MuseScore Studio adds the accidentals itself, so a sharp may appear where you meant a flat. Check the spelling against your original as you go. You can also map spare keys on your keyboard to note lengths in Preferences › MIDI mappings, so your hands never leave the keys.

For playing a passage in time, MuseScore Studio has two real-time input modes. Real-time (metronome) writes notes against a click, and Real-time (foot pedal) lets you set the pace by tapping a key or pedal. Both need a MIDI keyboard or the on-screen piano, since a computer keyboard can’t be used for real-time input.

Troubleshooting a piano keyboard that won’t connect

Most problems come down to a handful of causes. Work down the table from the top:

SymptomLikely causeFix
The computer doesn’t see the keyboard at allCable in the USB to Device port, a charge-only cable, or a missing driverUse the USB to Host port and a data cable; install the maker’s driver; try another USB port
The computer sees it, but the program doesn’tThe program was open before you plugged in, or another program holds the port (Windows)Restart the program; close other music programs; select the keyboard in its MIDI input settings
Keys light up on screen but there’s no soundNo instrument loaded, the wrong audio output, or the volume downLoad a piano sound or instrument track; pick the right speakers or headphones in the audio settings
A delay between key and soundA large audio buffer or a generic Windows audio driverLower the buffer size; use an ASIO driver or a USB audio interface; or listen through the piano
A doubled or echoing soundThe piano and the computer both playTurn the piano’s volume down, or set Local Control off
Every note plays at full volumeThe keyboard’s touch response is set to “fixed”, or the software ignores velocitySet the piano’s touch to normal; check the instrument’s velocity setting
The sustain pedal does nothingThe pedal isn’t plugged into the keyboard, or the program ignores controller 64Plug the pedal into the keyboard’s sustain jack; check the program’s pedal setting
A 5-pin interface shows no notesThe plugs are swappedPut the interface plug marked IN into the piano’s MIDI OUT
The iPad says the accessory needs too much powerThe keyboard draws power over USBPower the keyboard on its own, or use a powered hub or adapter
The browser piano says MIDI access was blockedThe permission prompt was dismissedAllow MIDI in the browser’s site settings, reload and click Connect again

The sustain pedal works like the right pedal of an acoustic piano. Our guide to piano pedals explains when to press it and how to change it cleanly between chords.

If you are still choosing an instrument, check for a USB to Host port before you buy. Our comparison of the types of pianos covers what separates a digital piano from a portable keyboard, from weighted keys to key count.

Frequently asked questions

What is a MIDI keyboard?

A MIDI keyboard is any keyboard that sends MIDI messages: which key you pressed, how hard, when you let go and what the pedals did. A digital piano is a MIDI keyboard with its own sounds. A MIDI controller has keys and no sound, so it needs a computer, tablet or phone to make any sound at all.

Do I need a driver or an interface to connect a digital piano?

Usually neither. A piano with a USB to Host port connects with a plain USB cable, and most current models are class compliant, so the computer’s own driver works. You need an interface only when the piano has 5-pin MIDI sockets and no USB. Some older models need the maker’s free driver.

Can I connect a MIDI keyboard to an iPad?

Yes. A USB-C iPad takes a USB-B to USB-C cable directly, and a Lightning iPad needs Apple’s Lightning to USB Camera Adapter. The keyboard must be class compliant, and a keyboard powered over USB may need its own power supply. Bluetooth MIDI keyboards pair inside the music app.

Why is there no sound when I play my MIDI keyboard on the computer?

MIDI sends notes and no sound, so the computer needs a program with an instrument loaded to make the sound. Check that the program lists your keyboard as its MIDI input, that a piano sound is selected, and that its audio output goes to the speakers or headphones you’re using.

Is USB or Bluetooth MIDI better for a digital piano?

USB is the safer choice: it’s plug-and-play on every system, it powers small controllers and it has no pairing step. Bluetooth MIDI removes the cable and works well on Mac, iPad and Android. On Windows, most desktop music programs don’t yet see Bluetooth MIDI keyboards without extra software.

Plug in and play your first notes

The connection comes down to the right socket and the right cable. Use USB to Host where the piano has it, a USB-MIDI interface for 5-pin MIDI, and Bluetooth MIDI inside the app. Pick the keyboard as the input, keep the audio buffer small, and let one device make the sound.

Then put it to work. Open the virtual piano’s Pro tab for an instant check, enter a melody in MuseScore Studio, or follow our plan for learning piano as an adult with your keyboard connected from the first lesson.

Rate this article

Be the first to rate this article