Instrument Lab
Audio in the Cloud · Instrument Lab · iteration 3
Does it sound recorded?
The same notes on three nylon-string guitars: today's, the plucked-string sound the Bossa page plays now; new, rebuilt from measurements of a real classical guitar and still nothing but code; and recorded, that guitar itself. Switch between them while one plays.
The same notes on three pianos: today's, the synthesized piano the genre pages play now; new, rebuilt from measurements of a real concert grand and still nothing but code; and recorded, that grand itself. Switch between them while one plays.
Listen
Starting…
Same notes, same timing, matched loudness. The switch is instant and all three stay in step, so the only thing that changes is the instrument. Keys: space plays and stops, 1 2 3 switch.
Piano radio
Background music in eight styles, written for the new piano and played on it live as you listen. Code plays the timing, the touch and the pedal too, and nothing here is recorded: every note is built on your device.
Blind test
The names are hidden and the phrase is picked at random. Switch between X and Y as often as you like, then answer.
New in this pass
- A guitar, measured. Every overtone's starting level and how fast it fades, how stiff each string is and how the body pulls on it all come from a recorded classical guitar, measured note by note from B1 to A#5 and checked against it the same way.
- Alive as it rings. On the recording no overtone fades smoothly: each wobbles by about a decibel, two or three times a second, as the string's two ways of swinging beat against each other. These do too, and a fretted note's pitch drifts a few cents as the finger presses.
- The pluck and the body. The trebles lose a little in the first tenth of a second, the top's resonance near 190 Hz swallows the overtones that land on it (G3's fundamental is nearly gone in half a second), and letting go of the string knocks the body with a short, woody thud, as on the recording, without a rumble underneath that a real body would not give off.
- Six strings. A new note on a string stops the one it was playing while the others ring on, so arpeggios and pinched chords ring the way a guitarist's do.
- Still pure code. The guitar adds about 25 KB to the library; your browser builds all 88 of its takes in about a second and a half.
Next
- Your ears decide the next pass. The blind test shows where the new guitar still gives itself away. Known so far: the recording has one strength of pluck, so how the tone changes with force is a guess, the open strings ringing along in sympathy (the halo round a real guitar's notes) are not there yet, nor is the small room the recording was made in.
- Then the Bossa page switches over to the new guitar.
- Then upright bass, strings and drums, measured the same way.
New in the piano's last pass
- Open, not phasey. Above the bass, every overtone now reaches the two microphones at its own level and phase, as the recording's do, so the top end sounds wide and open instead of hollow between the speakers.
- A truer strike. The hammer's thump and the key coming back up are rebuilt from the recording: a low knock in the case that rings for a few tenths of a second, and a soft thud on release.
- Fuller, more even bass. Low notes get the faint high overtones the recording has, and every key now starts at full strength (on some keys the strings' parts partly cancelled, leaving the fundamental several dB weak).
- A steadier treble. The top octave fades as fast as the real one, and no note strays far from its neighbours.
Already there
- Measured, not guessed. Every overtone's level, tuning and two-stage fade (the fast prompt sound, then the quiet aftersound) comes from measurements of a real concert grand, taken every three semitones across the keyboard.
- Touch changes the tone. Playing harder makes it brighter the way the recording does, not only louder.
- Still pure code. About 35 KB of JavaScript builds every note in your browser, with no samples and no network.
Next
- Your ears decide the next pass. The blind test shows where the new piano still gives itself away. Known so far: loud chords carry a little more deep thump than the recording, and the very top of each strike (above 8 kHz) is softer.
- Then the band, measured the same way: the nylon guitar is here now; upright bass, strings and drums next.
- Then the pages switch over to the shared instruments one at a time, so every page gets better together.