If you have a digital piano or an electronic keyboard, you can usually connect it to a computer, phone or tablet and use it with learning apps. The app then knows exactly which keys you press and when, with no guesswork. This guide explains how that connection works, what you need to set it up, and what to check when it doesn't work first time.
What MIDI is
MIDI stands for Musical Instrument Digital Interface. It is a standard way for electronic instruments and computers to talk to each other, and it has been around since the early 1980s, so almost every digital piano and keyboard made in recent decades supports it.
The important thing to understand is that MIDI does not carry sound. It carries messages about what you play. When you press a key, the keyboard sends a short message saying which key went down and how hard you pressed it. When you let go, it sends another message saying the key came up. The pedals send messages too. The app receiving these messages can then score your playing, light up the right key on screen, or make its own piano sound.
Each key has a number. Middle C is note 60, and each key up or down, black or white, adds or subtracts one. On an 88-key piano, the lowest A is note 21 and the top C is note 108.
Because MIDI sends only these small messages, it is fast and precise. That makes it the most reliable way for an app to follow your playing.
USB or Bluetooth
There are two common ways to connect.
USB is the simplest and most dependable. Most modern digital pianos and keyboards have a USB port that sends MIDI. Plug a cable in, and the computer usually recognises the instrument straight away without installing anything. Some older instruments need a driver from the maker's website.
Bluetooth MIDI is wireless. It is convenient, but support varies from one system and browser to another. On some systems the keyboard must be paired from a special MIDI setup screen rather than the normal Bluetooth settings, and in some combinations a browser can't see a Bluetooth MIDI keyboard at all. If your keyboard has both, use the USB cable for learning and save Bluetooth for later.
Advertisement
Finding the right port and cable
Look on the back or underneath your keyboard for its ports.
- USB to Host is the one you want. It is often a square-ish USB-B port, the type found on printers. Some newer instruments use USB-C or micro-USB instead.
- USB to Device is a flat USB-A port for a memory stick. It does not connect to a computer.
- MIDI Out and MIDI In are round sockets with five pins on older instruments. To use them with a computer you need a USB-MIDI interface, a small adapter with round plugs at one end and USB at the other. Connect the keyboard's MIDI Out to the interface's MIDI In.
Then choose a cable to match the device you're connecting to:
- A laptop or desktop with standard USB ports: a USB-B to USB-A cable (a printer cable).
- A newer laptop, or an Android phone or tablet, with USB-C: a USB-B to USB-C cable.
- A phone or tablet with a different port: an OTG (On-The-Go) adapter, which lets a phone or tablet act as the host for a USB device, plus a normal printer cable.
Connect the keyboard and switch it on before you open the app. Plugging in while the app is already open usually works too, but switching on first avoids one possible problem.
Browser support for Web MIDI
Apps that run in a web browser, like Pianuvo, use a browser feature called Web MIDI. Not every browser offers it, so the browser you use matters as much as the cable.
- Google Chrome, Microsoft Edge and Opera support Web MIDI on desktop computers (Windows, Mac and Linux). Chrome also supports it on Chromebooks and on Android phones and tablets.
- Firefox supports Web MIDI in its recent desktop versions, and asks you to give the site permission before it can use your keyboard.
- Safari does not support Web MIDI, either on a Mac or on iPhone and iPad.
- On iPhone and iPad, browsers such as Chrome and Edge are generally built on the same engine as Safari, so they don't offer Web MIDI either. A browser-based app on an iPad can't read a MIDI keyboard, even though some apps installed from the App Store can.
Web MIDI also only works on secure pages (addresses starting with https), and many browsers ask for your permission the first time a site wants to use MIDI devices. Choose Allow.
If you use a Mac, the easiest fix is to install Chrome, Edge or Firefox alongside Safari and use that for practice. On an iPad, use the microphone instead: see Learning with a real piano and a microphone.
Latency: why notes might feel late
Latency is the delay between pressing a key and hearing the sound or seeing the app react. With a USB cable, MIDI itself adds almost no delay. When something feels late, the cause is usually the sound output, not the keyboard.
- Bluetooth headphones and speakers add a noticeable delay to everything the app plays. Use the device's own speakers, wired headphones, or the keyboard's own sound instead.
- Two sounds at once. If both the keyboard and the app make a piano sound, you may hear a slight doubling or echo. Turn one of them down: either the keyboard's volume or the app's.
- A busy computer. Close other heavy programs and browser tabs if the sound crackles or stutters.
To check the timing, set a metronome going and play steady quarter notes along with it on one key. Each note should land right on the click.
Troubleshooting
If the app doesn't see your keyboard, work down this list.
- Is the keyboard switched on? A keyboard that is switched off does not appear as a MIDI device.
- Is the cable in the right port? It should be the USB to Host port, not USB to Device.
- Does the cable carry data? Try a different cable, and try a different USB port on the computer. Avoid unpowered USB hubs.
- Is another program using the keyboard? On Windows in particular, a MIDI device can often be used by only one program at a time. Close music software, other MIDI apps and any other browser tabs that might be holding it, then try again.
- Unplug and plug back in. Disconnect the cable, wait a few seconds, and reconnect.
- Reload the page. Browsers check for MIDI devices when a page asks for them. A reload makes the page ask again.
- Check permissions. If you blocked MIDI access by mistake, open the site settings from the icon next to the address bar and allow MIDI devices.
- Check the browser. If you are using Safari, or any browser on an iPhone or iPad, Web MIDI is not available.
Once connected, play a quick test: press each key from C to G and back, and check that every key registers and nothing sticks.
Try it in Pianuvo
In a browser that supports Web MIDI, Pianuvo detects a connected MIDI keyboard automatically. Choose MIDI keyboard when the app asks how you will play, or change it later in Settings, where the keyboard's name appears once it is found. Your sustain pedal works too. If you use Bluetooth speakers, the Audio delay setting lets you line the sound up with the falling notes. Then open any piece from the song library, such as Twinkle, Twinkle, Little Star, or start the Academy.