Computer Keyboard Piano
This page opens with the computer key printed on every piano key, so you can see which letter plays which note before you press anything. The bottom row is the lower octave and the row above it holds its sharps: Z X C V B N M are C, D, E, F, G, A and B, and S, D, G, H and J are the black keys between them. The octave above sits on Q W E R T Y U with its sharps on 2, 3, 5, 6 and 7. Hold a key and the note holds, press three together and you get a chord, and every note is synthesised in the page at the equal-tempered frequency for its letter, so there is nothing to download and nothing to install.
- Note
- C4
- Frequency
- 261.626 Hz
- Interval from A4
- -9 semitones
- Octave
Nothing playing. Click a key, or press Z X C V B N M for C4 upwards and Q W E R T Y U for the octave above it.
- 261.626 Hz
- 440.000 Hz
- 880.000 Hz
Common questions
- Which key is middle C?
- Z, whenever the octave control is on 4. The lower octave then runs C4 to B4 along Z X C V B N M, and the octave above runs C5 to B5 along Q W E R T Y U. The control starts on 4 and remembers your choice in this browser, so if you have moved it to 3 or 5 both rows shift with it and Z becomes C3 or C5. The readout always names the note you last played and its frequency, so the letter under your finger is never a guess.
- How do I play the black keys?
- On the row above the white keys you are using, in the gaps where a piano puts them. For the lower octave that is S and D between Z, X and C, then G, H and J between V, B, N and M. For the upper octave it is 2 and 3 between Q, W and E, then 5, 6 and 7 between R, T, Y and U. A piano has no black key between E and F or between B and C, which is why F is skipped on the letter row and 4 is skipped on the number row: those two pairs of white keys are already neighbours.
- Does it work on an AZERTY or a QWERTZ keyboard?
- Partly. The page reads the character your keyboard sends, and the labels on screen are the US QWERTY ones, so a key in the same physical place may send a different letter and play a different note: on AZERTY the key where a US board prints Z sends W, which here is the D of the upper octave. The two rows are still there and still play, they simply are not the letters drawn on the keys. Clicking or tapping a key always plays exactly the note it is labelled with, whatever your layout.
- Can I turn the key labels off?
- Yes. Labels is a toggle in the readout, and it is remembered in this browser for next time, along with the octave. This page always opens with the labels on because that is what it is for; the main virtual piano page opens with whatever you last chose.
- Why do some keys not make a sound?
- Only the twenty-four keys drawn on screen are mapped, so any other letter does nothing at all rather than playing something unexpected. Typing into a box on the page never triggers a note either. If nothing sounds, the browser is most likely still waiting for a first interaction: it will not start audio until you have clicked or pressed a key on the page, and that first press both wakes the sound and plays its note.
Every key is the equal-tempered frequency for its note at A4 = 440 Hz, computed rather than sampled, so the pitches are exact. It cannot know your instrument's tuning, and a browser's audio latency varies by a few milliseconds, so it is not a timing reference.