Struck Bar: C5 (523.25 Hz) Overtone Ratio: 3:1 Xylophone Song Guide: Ready
Your browser supports HTML5 Canvas to render a photorealistic 25-bar xylophone and marimba with animated mallets.
Interactive Follow-the-Glow Song Academy Strike the golden pulsing bar to advance through the melody
Next Note to Strike: E4 [Key C] Note 1 of 16
Mallet Hardness, Brass Resonator Tubes & Motor

How the Virtual Xylophone, Marimba & Free-Bar Overtone Synthesizer Work

Unlike vibrating strings or cylindrical air columns—whose natural overtones occur at integer multiples ($1f, 2f, 3f, 4f$)—a solid rectangular wooden or metallic bar suspended at its two nodal points ($22.4\%$ from each end) vibrates according to the **Euler-Bernoulli fourth-order beam equation**. In an uncarved uniform bar, the first three transverse bending modes vibrate at ratios of $1.000 : 2.756 : 5.404$. Instrument makers carve a graceful parabolic arch into the underside of rosewood marimba and xylophone bars to tune that second partial into musical alignment with the fundamental pitch.

Virtual Xylophone & Marimba Studio models these exact physical overtone ratios in real time using the browser's Web Audio API, paired with a photorealistic HTML5 Canvas stage showing all 15 natural bars (`C4` to `C6`), 10 raised chromatic accidental bars (`C#` / `Db` through `A#` / `Bb`), graduated brass resonator tubes, and animated yarn mallets.

How to Play Glissandos, Chords & Learn Melodies

  1. Tap or Swipe Across the Bars (Glissando): Click or tap any bar to strike it with the animated left or right mallet. Hold down your finger or mouse button and drag horizontally across the lower row of natural bars to perform a cascading **xylophone glissando** without lifting your hand.
  2. Computer Keyboard Layout (2-Octave Chromatic Map):
    • Lower Octave Natural Bars (C4 – C5): Bottom letter row Z X C V B N M ,
    • Lower Octave Sharp/Flat Bars: Home letter row S D G H J
    • Upper Octave Natural Bars (C5 – C6): Top letter row Q W E R T Y U I
    • Upper Octave Sharp/Flat Bars: Number row 2 3 5 6 7
  3. Follow-the-Glow Song Academy: Choose one of the 5 songs in the bottom dock (*Ode to Joy*, *Twinkle Little Star*, *Celestial Magic Box*, *Mystery Forest Arpeggio*, or *Sakura Pentatonic Chime*). A pulsing golden target halo appears on the exact bar you need to strike next, advancing step-by-step as you play.
  4. Two-Mallet Tremolo Roll: Click Tremolo Roll: On in the floating dock to flutter both mallets rapidly (`14 strikes/sec`) for sustained concert marimba swells.

Euler-Bernoulli Free-Bar Bending & Tubular Resonator Equations

Both the graduated bar lengths on screen and the synthesized harmonic partials follow acoustic physics:

1. Euler-Bernoulli Transverse Free-Bar Frequency (Length L, Thickness h, Young's Modulus E, Density ρ):
f_n = (π · h / (4 · sqrt(3) · L²)) × sqrt(E / ρ) × (2n + 1)² ⇒ Bar Length Scales as L ∝ 1 / sqrt(f)

2. Quarter-Wavelength Closed Brass Resonator Tube Length Under Each Bar:
L_tube(f) = Speed_of_Sound (34,300 cm/s) ÷ (4 · f) - 0.61 · Radius_end_correction

3. Undercut Arch Partial Ratios:
Marimba Harmonics = { 1.00 · f_0, 4.00 · f_0 (Double Octave), 9.20 · f_0 }
Xylophone Harmonics = { 1.00 · f_0, 3.00 · f_0 (Twelfth / Octave+Fifth), 6.10 · f_0 }
Glockenspiel / Vibraphone = { 1.00 · f_0, 2.756 · f_0, 5.404 · f_0 }

6 Mallet Percussion Instruments & Acoustic Comparison Chart

Instrument Voice Bar Material Tuned Overtone Ratio Resonator Decay ($\tau$) Signature Timbre
1. Rosewood Xylophone Honduran Rosewood $1 : 3.00 : 6.10$ (Twelfth) 0.45 s – 0.90 s Crisp, woody orchestral projection
2. Deep Padauk Marimba African Padauk / Rosewood $1 : 4.00 : 9.20$ (2-Octave) 1.20 s – 2.40 s Rich, hollow bass-bar warmth
3. Silver Glockenspiel High-Carbon Tempered Steel $1 : 2.756 : 5.404$ 2.80 s – 4.20 s Brilliant crystalline bell chime
4. Jazz Vibraphone Anodized Aluminum Alloy $1 : 4.00$ + Motor Tremolo 3.20 s + 6 Hz Pulser Velvety smoky jazz club sustain
5. Crystal Glass Harp Spun Quartz Silica $1 : 2.00 : 3.00$ Pure Sine 2.90 s Soft Bloom Ethereal singing glass bowls
6. Balinese Bamboo Seasoned Wulung Bamboo $1 : 2.92$ + Air Tube Pop 0.65 s Hollow Pluck Earthy tropical gamelan resonance

Play and compose with other verified interactive instruments in the Gemsmakers Music Studio:

Frequently Asked Questions

1. What is the acoustic difference between a xylophone, a marimba, and a glockenspiel?
Although all three use tuned bars arranged like a piano keyboard, their bar materials and undercut arches tune different overtones. A concert marimba uses wide rosewood or padauk bars carved with a deep parabolic arch so the second partial is tuned to a warm double octave (4:1 ratio). A xylophone uses stiffer wooden bars tuned to a bright twelfth (3:1 overtone ratio), while a glockenspiel uses thick high-carbon steel plates that ring above 2,000 Hz.
2. How do I play glissandos and two-mallet chords on the virtual xylophone?
Hold down your finger or mouse button and sweep horizontally across the lower natural bars (C4 to C6) to trigger a sparkling xylophone glissando. You can also tap two bars simultaneously on multi-touch screens or use keys Z through M and Q through I on your computer keyboard to play harmonic intervals.
3. How does the Follow-the-Glow Song Academy help beginners learn melodies?
When Follow-the-Glow mode is active, the studio highlights the exact bar you need to strike next with a pulsing golden target ring. Every time you strike the correct bar, the guide advances automatically to the next note of the melody.
4. What does the Tremolo Roll button do?
Because wooden xylophone and marimba bars have a short natural decay after a single mallet strike, percussionists sustain long notes by alternating left and right mallets rapidly. Turning on Tremolo Roll automatically flutters both mallets at 14 strikes per second while you hold down any bar.
5. Why does this canvas xylophone run at 60–120 FPS without freezing on mobile phones?
The wooden concert frame, brass resonator tubes, and cord rails are pre-rendered once onto an offscreen canvas buffer on resize, while the vibrating bars, glowing shockwaves, and swinging mallets use hardware-accelerated vector transforms with zero per-pixel CPU loops.
6. Does the Export Song WAV button use server bandwidth?
No. Clicking Export Song WAV renders your selected melody locally inside your browser's RAM using OfflineAudioContext and saves a 16-bit PCM WAV file directly to your device, protected by a 15-second cooldown.