♩Clef:

How to Use a MIDI Keyboard to Practice Sight-Reading

Tapping a letter or clicking an on-screen key works fine for drilling note names, but playing the actual note on a real keyboard closes the gap between reading and performing , which is the whole point of learning to sight-read in the first place. Here's how MIDI practice works in the browser, and how to set it up.

Direct answer

Web MIDI is available in Chromium-based desktop browsers and in Firefox 108 or later on desktop. Firefox requires a site-permission add-on for each site that requests access. In every supported browser, the page must use HTTPS and the user must approve access. Safari and browsers on iOS do not support Web MIDI. A site should check for navigator.requestMIDIAccess rather than reject browsers by name.

Download on the App Store

Why playing the note beats clicking it

Naming a note by tapping a letter button drills recognition in isolation, which is useful, but it skips the exact translation you actually need at the instrument: see the note on the page, and immediately know which physical key produces it. Playing a MIDI keyboard closes that loop. You see a note, you play it, and you get instant confirmation of both whether you named it correctly and whether you found it on the keyboard , which is the real-world task sight-reading serves.

What the Web MIDI API actually does

The Web MIDI API is a browser feature that lets JavaScript running on a web page communicate directly with MIDI devices connected to your computer , keyboards, controllers, synths , without any driver installation beyond the one your operating system already uses for the device. When a compatible site requests MIDI access, your browser shows a permission prompt (similar to camera or microphone access); once granted, the page can receive the note-on and note-off events your keyboard sends.

This means a practice tool can show you a note, wait for you to physically play it, and check whether you played the right one , entirely in the browser, with no software to install.

Browser support (as of 2026)

BrowserWeb MIDI support
Chrome / Edge / Opera (desktop)Supported on HTTPS after user permission
Chrome (Android)Supported on HTTPS after user permission
Firefox 108+ (desktop)Supported with a per-site permission add-on and user permission (Firefox 108 release notes)
Safari (macOS) / browsers on iOSUnsupported

If MIDI input is not detected, first check whether navigator.requestMIDIAccess exists on the current page. Then confirm that the page uses HTTPS, site permission was granted, and the operating system can see the connected device. This feature check is more reliable than blocking a browser by name.

Setting up a MIDI keyboard for practice

  1. Connect via USB. Most consumer MIDI keyboards from the last decade connect over a standard USB cable and are class-compliant, meaning your operating system recognizes them with no driver install.
  2. Open an HTTPS MIDI page in a supported desktop browser. The page should confirm that navigator.requestMIDIAccess is available. Firefox 108+ may prompt you to install its site-permission add-on.
  3. Grant MIDI access when prompted. Permission is controlled per site and can be withdrawn in browser settings.
  4. Play a note to confirm the connection. Most tools show a visual indicator (a dot, a label with your device name) once a device is detected and a note is played.
  5. You don't need a full-size keyboard. A small 25- or 32-key USB MIDI controller (often under $50) is enough for note-naming practice , you're not performing repertoire, just triggering individual notes.

Octave doesn't matter for note-naming practice

Clef's browser note-naming drill accepts the correct natural-note name in any octave. This keeps that exercise focused on note-name recognition. When practicing sequences or hand coordination, use the indicated register. For chord inversions, also check which note is lowest and how the notes are arranged above it.

Reference: note names and MIDI note numbers

A MIDI keyboard sends each key as a number. In the common convention where middle C is C4, middle C is MIDI note 60, and each semitone adds one. Be aware that some manufacturers label middle C as C3 instead, so check which convention your device or software uses before you trust an octave number.

NoteWhere it sits on the staffMIDI note number
E2First ledger line below the bass staff40
C3Second space from the bottom of the bass staff48
G3Top space of the bass staff55
A3Top line of the bass staff57
C4Middle C: ledger line between the staves60
E4Bottom line of the treble staff64
G4Second line of the treble staff67
C5Third space of the treble staff72
A5First ledger line above the treble staff81

Background on the protocol itself is in our explainer what is MIDI.

A worked example: a ten-minute practice protocol with answer key

This protocol is for any MIDI keyboard connected to a computer, or just a regular piano. Use a score, flashcards or any tool that shows a note. The point is the sequence, not the software.

  1. Minute 0 to 1, find your anchor. Play middle C and say "C4". Then play G4 (up a fifth, seven semitones) and say it. Check by sound that they are not the same.
  2. Minute 1 to 4, five single notes. For each prompt, name the note, then play it without looking at your hands. Answers: top line of the treble staff is F5; the bottom line is E4; the second space is A4; middle C is C4; the middle line is B4. Because the browser drill accepts a note name in any octave, play the correct octave yourself here so you build the real key location.
  3. Minute 4 to 7, bass clef. Bass clef lines from the bottom are G2, B2, D3, F3, A3 and the spaces are A2, C3, E3, G3. Play bottom line G2, top line A3, and the space between the middle and fourth line, E3, using the octave shift on your keyboard if you cannot reach them.
  4. Minute 7 to 9, a three-note pattern. Read C4 D4 E4, then E4 F4 G4, then G4 F4 E4. Play each pattern twice, eyes on the staff.
  5. Minute 9 to 10, log it. Write the number of notes you got right first time and the one position you looked at your hands for.

If you want to rehearse the written side first, how to read the bass clef and how to read the treble clef show every position.

A weekly schedule for MIDI practice

DaySessionLength
MondayTreble clef single notes, correct octave8 minutes
TuesdayBass clef single notes, using octave shift if needed8 minutes
WednesdayLedger-line notes above and below both staves8 minutes
ThursdayThree-note and five-note patterns, eyes on the page10 minutes
FridayMixed treble and bass10 minutes
SaturdayShort unfamiliar passage at a slow tempo10 minutes
SundayRest0

These lengths are a starting suggestion. For a short daily naming routine to run alongside, see the 3-3-3 routine.

Common mistakes and the fix

  • Looking at your hands every note. Fix: find an anchor key by touch, such as the group of two black keys, and navigate from it by distance.
  • Octave confusion. Many keyboards have octave shift buttons, and a shifted keyboard sends different note numbers than the keys you see. Fix: reset the shift when you start, and confirm with middle C.
  • Mixing up the C4 convention. Some devices call middle C C3. Fix: check how your software labels middle C before comparing note numbers.
  • Expecting it to work in Safari. Web MIDI is not available there or in iOS browsers. Fix: use a supported desktop browser, or use a tool that does not depend on it. Clef is an iOS app and its browser drill can be tried without a keyboard.
  • Sustain pedal or stuck keys. A held pedal can send extra messages and confuse a note check. Fix: unplug the pedal for naming drills.
  • Buying before you need to. A 25 or 32-key controller is enough for single-note reading, because it covers two to three octaves and you can shift the range. See our guide to the best MIDI keyboard for piano practice if you want a recommendation.

Where this fits in the bigger picture

Connecting a printed note to a physical key is the end goal of the whole system. If you are still building the map between staff and keys, start with how to read piano notes. If you are choosing a tool, see our overview of sight-reading apps.

Frequently asked questions

Do I need a MIDI keyboard to practise sight-reading?

No. Any piano or keyboard works for playing what you read. A MIDI keyboard adds automatic checking, because software can detect which key you pressed. Without one, you can still check yourself against a reference or by ear.

Which browsers support Web MIDI?

Chromium-based desktop browsers such as Chrome, Edge and Opera support it on HTTPS pages after you grant permission, and Chrome on Android does too. Firefox 108 and later on desktop supports it with a per-site permission add-on. Safari and browsers on iOS do not support it.

Why does my keyboard not appear in the browser?

Check that the page uses HTTPS, that you granted MIDI permission for the site, that your browser supports Web MIDI, and that your operating system can see the device. A page can test for the navigator.requestMIDIAccess feature instead of guessing from the browser name.

What is middle C in MIDI?

In the common convention where middle C is called C4, it is MIDI note 60. Some manufacturers call middle C C3, so check your device if octave numbers do not match.

How many keys do I need?

For naming and single-note reading, a 25 or 32-key USB controller is usually enough, because you are triggering individual notes and can shift the octave. For playing repertoire you will want more keys.

Does the octave matter in the browser drill?

Clef's browser note-naming drill accepts the correct natural-note name in any octave, so it focuses on the name. For real reading practice, play the octave shown on the staff.

Try it with your own keyboard

Clef supports the Web MIDI API directly in the browser , connect a keyboard, play the note you see on the staff, and get instant feedback. No keyboard handy? Everything also works with taps or your computer's letter keys.

Get Clef on the App Store →

Free to download. Annual starts with a 1 week trial, then $59.99/yr (just $5.00/mo), monthly $9.99, or $99.99 lifetime. Try the free web drill