Free tool · no sign-up
Virtual xylophone
Tap, click or type to strike the bars — each one rings out like a real xylophone.
Virtual xylophone
Computer keys: A S D F G H J K play C4–C5.
Play a melody
Pick one and the next bar to strike is marked. Take your time — it waits for you.
Was this helpful?
How to play
Tap a bar, click it, or press its key on your computer keyboard. Every strike sounds straight away and rings out on its own, the way a bar does when a mallet hits it — holding your finger down does not make it longer. Strike several bars at once with more fingers, or press several keys together, for a chord.
1 octave shows eight bars, C4 to C5 — every beginner tune fits on them. 2 octaves adds the next eight up to C6; on a phone the upper octave sits above the lower one, each letter in the same column. Turn Note names off to play by ear or test yourself; the colours stay, so C is always red.
Computer keyboard
The home row plays the first octave, one finger per bar. In the two-octave range, the row above plays the second octave — each key one row up from the same note an octave lower. Keys are matched by position, so the shape is the same on AZERTY and QWERTZ keyboards. Nothing plays while you type in the search box, and shortcuts with Cmd, Ctrl or Alt are left alone.
| Keys | Bars |
|---|---|
| A S D F G H J K | C4 D4 E4 F4 G4 A4 B4 C5 |
| Q W E R T Y U I (2 octaves) | C5 D5 E5 F5 G5 A5 B5 C6 |
Without a mouse: Tab reaches the bars, the arrow keys move between them, and Enter or Space strikes the one in focus. Each bar is announced by its note name.
What is a xylophone?
A xylophone is a set of tuned wooden bars struck with mallets. Its name is Greek for “wood sound”. Each bar is cut to sound one note, and under it on a concert instrument hangs a tube, the resonator, that makes the note louder. The sound is bright and dry — a sharp attack that dies away within a second or two — which is why the xylophone cuts through a whole orchestra. Its metal cousin with a longer ring is the glockenspiel; its larger, deeper relative is the marimba.
How the notes are arranged
The longest bar plays the lowest note, and each bar to its right is shorter and higher, like the white keys of a piano laid out in a row. The letter names run C D E F G A B and then start again at C, one octave higher — that is what the number after each letter counts. These seven letters are the musical alphabet. The two cords the bars rest on cross each bar where it barely moves when it rings, so they hold it without deadening the sound.
Like every xylophone, this one sounds an octave higher than its music is written. A xylophone part writes the lowest bar here as C4 — middle C — and it sounds the C above. The bars are named as xylophone music writes them, so what you read is what you strike.
How to play simple melodies
Under the bars, choose a tune: C major scale, Hot Cross Buns, Mary Had a Little Lamb, Twinkle Twinkle Little Star. The next bar to strike is marked and named; strike it to move on. There is no clock — wrong bars still sound and are counted, but the tune waits for the right one. Every melody sits on the first octave, so it works in either range.
Hot Cross Buns needs only three bars, E, D and C, and is the classic first tune. Mary Had a Little Lamb adds one jump, up to G. Twinkle Twinkle uses six bars and goes up as far as A. Learn a tune with the names showing, then turn them off and play it again from memory.
How to practise scales on a xylophone
Start with the C major scale: every bar from C up to the next C, then back down. On a real xylophone you alternate hands — right, left, right, left — so neither mallet has to jump. On a keyboard, keep one finger on each key of the home row. Play slowly and evenly first; speed comes from evenness. When it is easy, try it in two octaves, or start on G and go up eight bars to the next G: that is the G major scale except for F, which needs an F♯ — a bar a beginner’s xylophone does not have.
Read the notes you just played
Every bar has a place on the staff. The treble clef notes lesson shows where C4 to C6 are written, so you can play a tune from sheet music instead of from colours. New to note names? Start with pitch and the musical alphabet, then see the same scale on the major scale page. Want sharps and flats as well? The virtual piano has every key.
The sound
A real concert xylophone struck with medium mallets, from the Versilian Community Sample Library (CC0, public domain): five recorded notes, retuned to equal temperament, levelled to the same loudness and compressed to 63 KB. A bar between two recordings is played from the nearer one, never more than three semitones away. The recordings load once the page is ready; until they have, a synthesised mallet plays the same notes.
Learn the idea behind it
Look it up
All free tools
- Virtual piano
- Fretboard explorer & trainer
- Scale explorer
- Mode explorer
- Interval explorer
- Chord explorer
- Chord identifier
- Chord progression explorer
- Chord transposer
- Key finder
- Roman numeral analyzer
- Circle of fifths
- Note finder
- Rhythm decoder
- Time signature player
- Virtual melodica
- Virtual recorder
- Virtual xylophone (this page)
- Virtual drum kit