3D Piano Visualizer

A playable 37-key piano built in Blender: keys, hammers and strings move as you play, with the spectrum of every string.

Switch to 2D

Presets

Playback

Play

Sound

Tuning

Demo songs

Camera

Layers

Quality

Model check

The science

What is modelled

A playable piano keyboard. Click or touch the keys (or use the computer keys Z S X D C V G B H N J M for C3 upwards and Q 2 W 3 E R 5 T 6 Y 7 U for C4 upwards, Space for the sustain pedal). Every note is built from the physics of a struck stiff string and you can change the stiffness, the brightness and the tuning system to hear and see how they differ.

Equations

  • Equal temperament: f(m) = fA4 · 2(m − 69)/12 (m is the MIDI number); twelve semitones double the frequency. Just intonation and Pythagorean tuning use frequency ratios from C (for example 5/4 and 3/2); the deviation from equal temperament is 1200 log2(f / fET) cents.
  • Stiff string, partial n: fn = n f1 √(1 + B n²). Real strings have a small bending stiffness B, so upper partials sit slightly sharp of the harmonic series (stretch tuning).
  • Hammer strike at a fraction β = 1/8 of the string length: an ∝ |sin(n π β)| / np, so the 8th partial is missing; each partial decays as exp(−t/τn) with higher partials dying faster.
  • Wavelength in air λ = c / f with c = 343 m/s. Two sinusoids at f1 and f2 produce an amplitude beat at |f2 − f1|.
  • Sensory dissonance (Plomp-Levelt, Sethares form): d = a1a2(e−3.5 s Δf − e−5.75 s Δf), s = 0.24/(0.021 fmin + 19), summed over all pairs of partials; pure ratios such as 3:2 line partials up and give dips.

Simplifications

Each key is modelled as one string with ten partials added together (additive synthesis). There is no soundboard, no sympathetic resonance, no two- or three-string chorus and no real hammer dynamics, so it sounds like a clean electric piano rather than a recording. The 3D hammers and strings move to show the physics (strike, decay), they are not a mechanical simulation. The keyboard has 37 keys (C3 to C6). The three checks test the signal processing numerically (FFT of the rendered waveform, partial positions, beat rate read from the squared signal) against the formulas above.

Loading model...
Loading Blender model...
Spectrum of the sounding strings (partials)
Waveform of the sum (first 25 ms)
Dissonance / tuning
Made with 🟠 Blender · Three.js