By · Updated

Online Piano

Play with Your Computer Keyboard, Free

No ratings yet

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Online Piano works

This online piano plays from a mouse, touch screen or keyboard. Click, tap or type to play a piano in the browser. The bottom row of the computer keyboard, Z through M, plays one octave and the top row, Q through P, plays the next, with the number keys and S, D, G, H and J as the black notes. Arrow keys shift the whole keyboard up or down an octave. Choose a piano, electric piano, organ or soft synth sound, show note names or key letters on the keys, and read the frequency of every note you press.

Online piano: how the keyboard is laid out

The layout copies the arrangement used by most music software. On the lower row, Z is C, X is D, C is E and so on along the white keys, with S, D, G, H and J on the row above supplying C sharp, D sharp, F sharp, G sharp and A sharp. The upper row repeats the pattern one octave higher starting from Q, with the digits 2, 3, 5, 6, 7, 9 and 0 as its black keys, and the bracket keys reaching F, F sharp and G of the octave above that. Holding several keys at once plays a chord; the piano is polyphonic, so nothing is cut off until you let go. The left and right arrow keys, or minus and plus, move the lowest octave down or up, and the rail select does the same thing if you prefer the mouse. Mouse and touch work on the drawn keys too: press and drag across them to glissando.

The sounds

None of these are sampled pianos. They are synthesised on the spot with a small synthesiser that shapes a simple waveform with an envelope, which is why the page loads instantly and works offline. The piano-like sound is a triangle wave with a fast attack and a long decay, the electric piano adds a little frequency modulation for a bell-like edge, the organ holds a stacked sine tone for as long as the key is down, and the soft synth is a slow sawtooth pad. A touch of reverb sits on all of them. Nothing here loads until the first key press, because browsers only allow sound to start after a click or a key, so the very first note may arrive a fraction late while the audio engine wakes up.

Reading the note and frequency

The readout under the keys shows the last note in scientific pitch notation, where C4 is middle C and A4 is the 440 Hz tuning reference, together with its frequency in hertz. The rail counts how many notes you have played. If you want to look up a note without playing it, or find the frequency of a note outside the keyboard's range, the note frequency calculator covers the whole MIDI range.

What it is useful for

It is a quick way to check a melody, find a starting pitch for singing, test whether your computer keyboard registers several keys at once, or let a child find the notes of a tune. It is not a substitute for a weighted keyboard: computer keys have no velocity, so every note sounds at the same loudness, and browsers limit how many simultaneous key presses they report.

FAQ

Why does nothing happen when I press a key?

Click somewhere on the page first so the browser lets the page receive keystrokes, and make sure the cursor is not inside one of the rail selects, which capture typing. The first press also has to wake the audio engine, which can take a moment on a slow machine.

Some keys will not sound together. Why?

Most computer keyboards can only report a limited number of simultaneous presses, typically three to six depending on which keys they are, a hardware limit known as rollover. Chords of three notes are usually fine; wider ones may drop a note. Using the mouse for one voice and the keyboard for another works around it.

Can I change the tuning?

The keyboard is fixed at A4 = 440 Hz equal temperament, the standard for almost all modern music. The tone generator on this site can produce any frequency you like if you need a different reference pitch.

Does it record what I play?

No. Nothing is stored or uploaded, and there is no recording feature on this page. The sounds are generated in your browser and disappear when you let go of the key.

Is the sound a real piano sample?

No, it is synthesised from a waveform and envelope, which keeps the page tiny and works without downloading a sample library. It is close enough to check a tune by ear but does not attempt to imitate a concert grand.

See also: all Audio tools, Images, Video & Screen, PDF, SVG, Simulations & Screensavers, Generative Art, Chart Makers, 3D Model Viewers, Drawing Pads, Mockups & 3D Making, Diagram Makers, 3D Science, Tracker Music.

Related tools