MIDI keyboard not detected: fixes for Chrome, Edge and Firefox
When a browser cannot see your MIDI keyboard, it is almost always one of five things: the browser has no Web MIDI at all, its MIDI permission was refused, another program has the keyboard open, the cable or port is the wrong one, or the keyboard needs a driver. Open the MIDI keyboard test in another tab, then work down this page and press a key after each step.
Safari, and every browser on iPhone and iPad, cannot read a MIDI keyboard, and no setting changes that. Use Chrome, Edge, Firefox or Opera on a desktop or laptop. The reason is in section 6.
1. Check that the browser has Web MIDI
Browsers read a keyboard through the Web MIDI API. Support, from
MDN's
compatibility table for requestMIDIAccess:
| Browser | Web MIDI |
|---|---|
| Chrome on Windows, macOS, Linux, ChromeOS | Yes, since version 43 |
| Chrome on Android | Yes |
| Edge | Yes, the same engine as Chrome |
| Opera | Yes, the same engine as Chrome |
| Firefox on a computer | Yes, since version 108, after you accept a site permission add-on |
| Firefox on Android | No |
| Safari on a Mac | No |
| Any browser on iPhone or iPad | No |
The page also has to be served over https. MDN states the method "must be called in a secure context", so a MIDI page opened from a plain http address will not see a keyboard in any browser.
2. Allow MIDI in the browser
Chrome
Since Chrome 124, released in April 2024, the whole Web MIDI API sits behind a permission prompt, not only the advanced SysEx messages (Chrome for Developers). If you clicked Block, or closed the prompt, the page sees nothing. To fix it, per Chrome Help: click View site information to the left of the web address, open Site settings, and set MIDI device control & reprogram to Allow. Where the Reset permissions button shows, it clears every choice you made for that site. Reload the page afterwards.
Edge
Select the lock icon in the address bar to open the page information panel, or
go straight to edge://settings/content/siteDetails?site=https://klaviero.com,
the per-site permission list
Microsoft
describes. Set MIDI to Allow and reload. On a work computer, an administrator
can also set Web MIDI by policy, which overrides the setting you see.
Firefox
Firefox supports Web MIDI from version 108, released in December 2022
(release
notes). Access is gated by a site permission add-on that the site asks you to
install, as MDN's compatibility notes say. If you dismissed it, reload the page and
accept it when it comes back. To remove a site's permission and start again, open
about:addons and go to the Site Permissions section,
the panel Mozilla's own
bug tracker walks
through.
3. Close anything else that has the keyboard open (Windows)
On Windows, the classic MIDI drivers let one program at a time open a port. Microsoft's own documentation says "MIDI devices are not necessarily sharable, so a particular device may not be available when a user requests it" (Microsoft Learn). So a DAW such as Ableton Live or FL Studio, Synthesia, the keyboard maker's own app, or a second browser with a MIDI page open can hold the keyboard and leave the browser with nothing. Close it, then reload the page. Microsoft's newer Windows MIDI Services makes every endpoint multi-client by default; on a PC that has it, this step matters less.
4. The cable and the port
- Use the computer port on the keyboard. Yamaha calls it USB TO HOST and describes it as the easiest way to connect to a computer (Yamaha manual). A second, flat USB-A socket on some keyboards is for a flash drive.
- Use a data cable. The same Yamaha page asks for "a communication cable compliant with USB standards, and not a charging-only cable", shorter than 3 metres. A charging-only cable carries power and no data, so the computer sees nothing.
- Skip the hub. Plug straight into a port on the computer, not a hub, dock or monitor, and try a second port.
- Round 5-pin MIDI sockets only? The keyboard needs a USB MIDI interface. Its MIDI OUT goes to the interface's MIDI IN, and the interface is what the browser lists.
- Bluetooth MIDI works only where your operating system pairs it, and adds latency. A cable is better for anything scored. Requirements has more.
5. Driver or no driver
Many keyboards are USB class compliant, which means the operating system talks to them with its own driver. Microsoft states that Windows supports MIDI over USB for "class-compliant and most proprietary drivers" (Microsoft Learn). A keyboard that is not class compliant needs its maker's driver installed before any browser can see it. Check whether the operating system sees the keyboard, because if it does not, no browser will:
- macOS: open Audio MIDI Setup, choose Window, Show MIDI Studio. Apple notes that a device that is not connected is shown dimmed (Apple Support).
- Windows: the keyboard should appear in Device Manager while it is plugged in.
- Linux:
amidi -l"prints a list of all hardware MIDI ports" (amidi manual). If the keyboard is not in that list, the browser cannot see it.
6. Safari, iPhone and iPad
Safari has no Web MIDI on any device. WebKit, Safari's engine, lists the Web MIDI API among the features it has not implemented over fingerprinting and security concerns (WebKit). On iPhone and iPad, Apple requires browsers to use WebKit unless they hold an entitlement for another engine in the EU or Japan (App Store Review Guidelines 2.5.6), so Chrome or Firefox on an iPad cannot read a keyboard either. MDN lists no iPhone or iPad browser with Web MIDI. There is no setting or add-on that fixes this. On a Mac, Chrome, Edge and Firefox work where Safari does not.
Still nothing
Quit the browser completely and open it again, then try a second browser from the table in section 1. If the MIDI keyboard test shows your notes, Klaviero will read them too: start with Für Elise or browse all pieces and all composers. If the test shows the keyboard and Klaviero does not, write to frederic@lalumiereconsulting.be with your browser, operating system and keyboard model.