Envelope A/B

The beginning changes everything

Give an unchanged harmonic recipe a sharp strike, a gentle entrance or a lingering release.

Enable JavaScript for interactive controls and synthesized sound. Default model: Attack 0.01 s, decay 0.60 s, sustain 20%, gate 2 s, release 0.50 s. At a fixed instrument choice, the steady-state spectral recipe is unchanged while the time course changes. Original teaching tone. The original four-component tone. Hold the source recipe steady while you compare attack, decay, held level and release. Frequencies and note timing follow the controls; only the source recipe changes. Normalization uses the same bounded nominal RMS policy, not a perceptual loudness match.

Default model values
ComponentFrequencyPeak amplitudePhase
1220.00 Hz0.21090°
2440.00 Hz0.07380°
3660.00 Hz0.03160°
4880.00 Hz0.01690°

Real musicians · original recordings

One note. Two instruments.

Which note has a sharper start? Listen closely to the first moment of each recording.

A4Same named note
Nominal 440 Hz
Play individual recordings

Flute · A4

B♭ clarinet · A4

Violin · A4

B♭ trumpet · A4

Piano · A4

Marimba · A4

Two-second excerpts, level-matched for comparison. Natural pitch differences are preserved.

Recording credits and preparation

Recordings by Lawrence Fritts and the University of Iowa Electronic Music Studios. View the collection and its reuse terms ↗

Flute ↗
Sonja Feig · April 2000 (day not listed) · mf (mezzo-forte)
Flute.nonvib.mf.B3B4.aiff · Estimated pitch 442.1 Hz
Excerpt 28.295011–30.295011 s of the source; 2.000 s duration. Mono source retained. 44,100 Hz, 16-bit PCM WAV; linear 3 ms onset and 30 ms ending fades. Constant gain +5.36 dB, targeting −23 dBFS RMS over active 20 ms frames within 30 dB of the loudest frame; −3 dBFS peak ceiling. Result: -23.00 dBFS active RMS, -14.54 dBFS peak. No pitch shifting, time stretching, equalisation or dynamic compression. Natural tuning variation is retained; equal RMS does not guarantee equal perceived loudness.
B♭ clarinet ↗
Christine Bellomy · 1998-08-03 · mf (mezzo-forte)
BbClar.mf.C4B4.aiff · Estimated pitch 439.7 Hz
Excerpt 46.864989–48.864989 s of the source; 2.000 s duration. Mono source retained. 44,100 Hz, 16-bit PCM WAV; linear 3 ms onset and 30 ms ending fades. Constant gain +2.45 dB, targeting −23 dBFS RMS over active 20 ms frames within 30 dB of the loudest frame; −3 dBFS peak ceiling. Result: -23.00 dBFS active RMS, -16.06 dBFS peak. No pitch shifting, time stretching, equalisation or dynamic compression. Natural tuning variation is retained; equal RMS does not guarantee equal perceived loudness.
Violin ↗
Josue Jean-Francois · Not listed · mf (mezzo-forte)
Violin.arco.mf.sulA.A4B4.aiff · Estimated pitch 437.7 Hz
Excerpt 2.524989–4.524989 s of the source; 2.000 s duration. Mono source retained. 44,100 Hz, 16-bit PCM WAV; linear 3 ms onset and 30 ms ending fades. Constant gain +12.74 dB, targeting −23 dBFS RMS over active 20 ms frames within 30 dB of the loudest frame; −3 dBFS peak ceiling. Result: -23.00 dBFS active RMS, -12.72 dBFS peak. No pitch shifting, time stretching, equalisation or dynamic compression. Natural tuning variation is retained; equal RMS does not guarantee equal perceived loudness.
B♭ trumpet ↗
Aren Van Houzen · 2003-05-16 · mf (mezzo-forte)
Trumpet.novib.mf.C4B4.aiff · Estimated pitch 437.2 Hz
Excerpt 78.435011–80.435011 s of the source; 2.000 s duration. Mono source retained. 44,100 Hz, 16-bit PCM WAV; linear 3 ms onset and 30 ms ending fades. Constant gain -7.24 dB, targeting −23 dBFS RMS over active 20 ms frames within 30 dB of the loudest frame; −3 dBFS peak ceiling. Result: -23.00 dBFS active RMS, -13.95 dBFS peak. No pitch shifting, time stretching, equalisation or dynamic compression. Natural tuning variation is retained; equal RMS does not guarantee equal perceived loudness.
Piano ↗
Evan Mazunik · 2001-11-05 and 2001-11-27 (individual take date not identified) · mf (mezzo-forte)
Piano.mf.A4.aiff · Estimated pitch 441.1 Hz
Excerpt 0.215011–2.215011 s of the source; 2.000 s duration. Stereo folded to mono with equal channel weights, (L + R) / √2, before level adjustment. 44,100 Hz, 16-bit PCM WAV; linear 3 ms onset and 30 ms ending fades. Constant gain +17.59 dB, targeting −23 dBFS RMS over active 20 ms frames within 30 dB of the loudest frame; −3 dBFS peak ceiling. Result: -23.00 dBFS active RMS, -6.20 dBFS peak. No pitch shifting, time stretching, equalisation or dynamic compression. Natural tuning variation is retained; equal RMS does not guarantee equal perceived loudness.
Marimba ↗
Andrew Thierauf · 2013-03-20 · mf (mezzo-forte)
Marimba.yarn.mf.C4B4.aif · Estimated pitch 443.4 Hz
Excerpt 34.174989–36.174989 s of the source; 2.000 s duration. Source audio header verified as 96,000 Hz, 24-bit stereo; converted to 44,100 Hz without changing playback pitch or speed. Stereo folded to mono with equal channel weights, (L + R) / √2, before level adjustment. 44,100 Hz, 16-bit PCM WAV; linear 3 ms onset and 30 ms ending fades. Constant gain -1.03 dB, targeting −23 dBFS RMS over active 20 ms frames within 30 dB of the loudest frame; −3 dBFS peak ceiling. Result: -23.00 dBFS active RMS, -12.55 dBFS peak. No pitch shifting, time stretching, equalisation or dynamic compression. Natural tuning variation is retained; equal RMS does not guarantee equal perceived loudness.

Listen with a purpose

Try this.

Save a sharp envelope as A. Choose Swell, then alternate A and B. Both have the same spectrum and a two-second gate, but their energy is distributed differently in time.

What is happening?

Attack is the rise to peak level; decay is the transition from that peak to the held sustain level. Release begins when the gate closes at two seconds. The envelope multiplies every harmonic together in this simplified synthesizer. A rapid onset supplies a different temporal cue from a slow swell.

The model & its limits

The peak level and gate duration are controlled, but total energy changes with the envelope. That difference is part of this experiment. Real instruments often have different envelopes for different partials. The instrument selector changes only the source spectrum; it never overrides your envelope. Keep that source selection fixed when comparing envelope shapes. These recipes are analogies, not sampled or physically modeled instruments.

The interactive model synthesizes sound locally. Audio begins only after you press a listening button. Stop ends every scheduled voice; leaving or hiding the page stops audio. The numerical table remains useful without listening.

Static waveforms and component spectra are calculated from the current model. During playback, the waveform (except calculated swell, envelope and sampling illustrations) and spectrum come from the same browser audio signal. FFT bins have finite resolution; bars in the static view represent exact model components. A/B uses the same master volume; perceptual loudness is not calibrated.

How real instruments use this

Sources & further reading

These sources support the explanations and model assumptions. Recording credits are listed in the listening panels and the source register.

  1. Web Audio API 1.1 — Editor’s Draft ↗W3C Web Audio Working Group · 2026-11-06 (work in progress)
  2. Web Audio API best practices ↗MDN contributors / Mozilla · Undated
  3. Envelopes ↗Chris Donahue / Carnegie Mellon University · 2026
  4. Scores versus timbre ↗Chris Donahue / Carnegie Mellon University · 2026
  5. Clipping ↗Chris Donahue / Carnegie Mellon University · 2026
  6. Oscillations and simple harmonic motion ↗Joe Wolfe / UNSW Physclips · Undated
  7. Musical sounds and musical signals ↗Joe Wolfe / Sound Musicianship · 2012
  8. Strings, standing waves and harmonics ↗Joe Wolfe / UNSW Music Acoustics · Undated
  9. The bowed string ↗Joe Wolfe / UNSW Music Acoustics · Undated
  10. Violin acoustics: an introduction ↗Joe Wolfe / UNSW Music Acoustics · Undated
  11. How does a guitar work? ↗Joe Wolfe / UNSW Music Acoustics · Undated
Full source and rights register ↗