Virtual Xylophone & Marimba — Play Online

Tap the bars to play. Switch between bright xylophone and warm marimba sound, choose 8 or 15 bars, record a short loop, and watch the mallets strike. Works on mobile and desktop — no instrument needed.

Reverb
🔊

💻 Keyboard: A S D F G H J K — left to right

Loop Recorder

Record up to 8 seconds, then loop it.

Not recording

💡 Tip: Xylophone uses wooden bars for a bright, crisp tone. Marimba uses resonator tubes beneath each bar for a deeper, warmer sound. Try both on the same melody!

✅ How to Use

  1. Tap any bar to play it. On desktop, use the keyboard keys shown on each bar.
  2. Switch between Xylophone (bright) and Marimba (warm) using the instrument buttons.
  3. Switch between 8 bars (one octave, beginner) and 15 bars (two octaves, full range).
  4. Toggle Reverb On for a warm resonant room sound — Off for a dry, direct tone.
  5. Press Record, play a melody, press Stop — then Play to loop it continuously.

How It Works

Each bar is synthesised using the Web Audio API. The xylophone sound uses a short sine burst with fast decay and strong inharmonic overtones — mimicking the bright, woody attack of struck hardwood. The marimba uses a softer attack with a longer resonant decay and fewer overtones, replicating the warm character of rosewood bars over metal resonator tubes. A synthetic reverb impulse response adds room ambience when enabled. The loop recorder captures note timings with millisecond precision and replays them in a continuous loop.

Frequently Asked Questions

What is the difference between xylophone and marimba?

Both are struck bar instruments, but a xylophone has wooden bars with a sharp, bright tone and shorter decay. A marimba has softer rosewood bars and metal resonator tubes beneath each bar, producing a warmer, more resonant sound with a longer sustain.

What do the Indian swar names mean?

Swar names (Sa, Re, Ga, Ma, Pa, Dha, Ni) are the Indian classical equivalent of Western note names (C, D, E, F, G, A, B). The mapping here uses C as Sa — the same relative system used in Hindustani and Carnatic music.

Why do the bars get smaller from left to right?

On a real xylophone or marimba, lower notes have longer, wider bars and higher notes have shorter, narrower bars. This virtual instrument mirrors that layout — the leftmost bar is the lowest note, rightmost is the highest.

How long can I record?

Up to 8 seconds. The loop replays with the exact timing you played, so it stays in rhythm as long as you played steadily.

Can I use a computer keyboard?

Yes — keyboard keys are shown on each bar. For 8 bars: A S D F G H J K. For 15 bars the layout extends across more keys as shown on screen.

Does it work on mobile?

Yes — the bar layout scales to your screen width. For 15 bars on a phone, rotating to landscape gives more comfortable bar widths and larger tap targets.

Bar Reference — C Major Scale

Bar Note Swar (C=Sa) Octave Key (8-bar)
1 C Sa 4 A
2 D Re 4 S
3 E Ga 4 D
4 F Ma 4 F
5 G Pa 4 G
6 A Dha 4 H
7 B Ni 4 J
8 C Sa 5 K

References & Notes

This is a simulation tool for learning and entertainment.

Related Tools