Splashery
Sound Lab, a still.

Family I, Studio

Plate 19

Sound Lab

Sound is air pressure going up and down, and this bench shows it four ways.

Playground

Family
Studio
Origin
Raised from a recipe
Habit
Diurnal: kept on the page
Voice
Yes, with the sound on
Your own
Sound lab
Licenses
Own work (made in the page)

How to play

Tap to play or stop a tone. The Splash tab changes it, starts the metronome, or uses your microphone.

Notes

The oscilloscope draws the wave over a few thousandths of a second. The spectrum splits it into frequencies and names the loudest. The spectrogram keeps eight seconds of spectra side by side: a whistle is a bright line, a clap a column. The level is in decibels below full scale (dBFS).

Tap to play the tone generator, a sine, square, saw or noise from 20 Hz to 20 kHz, through the speaker when the site's sound is on. Two close tones beat: 440 and 443 Hz swell and fade three times a second. A square wave's extra lines are its odd harmonics. Tap “Use my microphone” to see your voice instead; the sound goes only to the screen. The dB SPL figure is an uncalibrated estimate that assumes a typical phone microphone. The metronome clicks once a beat as it swings from side to side.

Its controls

ControlKindRangeStart
Play or stop the toneTap
ToneSwitchOff
Level estimate: full scale is (dB SPL)Setting

Details

Splats
Opens at 200,000 at Mid Detail, 99,508 at Low, and up to 360,000 at Max

Is it right?

The Sound lab measures sound: a spectrogram, the spectrum with its loudest frequency, an oscilloscope and a level in dBFS, from the microphone's samples or from the tone generator's own signal, computed exactly as the speaker plays it. The measurements are real and tested on known tones; the sound pressure level in dB SPL is an uncalibrated estimate.

  1. Correct

    The spectrum's peak is the frequency of the tone being played or heard.1

    A 4096-sample Hann-windowed FFT (the song landscape's), scaled so a full-scale sine reads 0 dB, with the peak refined by a parabola through the loudest bin and its neighbors.

  2. Correct

    A square wave has only odd harmonics, at 1/3, 1/5 … of the fundamental's amplitude.2

    The generator's square wave is analyzed like any other sound; its spectrum shows lines at 3f and 5f about 9.5 and 14 dB down and none at 2f.

  3. Correct

    Two tones close in frequency beat at the difference of their frequencies.3

    The second tone adds to the first; the level and the spectrogram swell and fade |f1 − f2| times a second.

  4. Correct

    The level is the RMS of the last 50 ms in decibels below full scale (dBFS): a full-scale sine reads −3 dB.4

    20 log10 of the RMS of the samples.

  5. Simplified

    The dB SPL figure is about dBFS + 120.5

    A typical digital MEMS microphone has a sensitivity of −26 dBFS at 94 dB SPL, so full scale is about 120 dB SPL. The Splash tab can change the 120.

  6. Simplified

    The metronome clicks once a beat at the tempo set.6

    Clicks are scheduled on the audio clock at (k + ½) × 60 / bpm seconds; the pendulum's angle is A sin(π t bpm / 60), one swing a beat.

  1. 1Spectrogram, Wikipedia
  2. 2Square wave, Wikipedia
  3. 3Beat (acoustics), Wikipedia
  4. 4DBFS, Wikipedia
  5. 5Understanding Microphone Sensitivity (Analog Dialogue 46-05), Analog Devices
  6. 6Metronome, Wikipedia
Simplified
The click falls at each end of the pendulum's swing. A mechanical metronome's escapement ticks at a set angle of its swing, which differs from model to model.
Simplified
The dB SPL figure is uncalibrated and unweighted (no A weighting).
Simplified
The speaker's cone moves with the signal at the frame's moment, scaled up so it shows; at audio frequencies a real cone's motion is far too fast and small to see.
Simplified
Screens show the generator's signal as computed here; the speaker plays the browser's oscillators, whose square and saw waves are band-limited (they differ only above the highest harmonic the sample rate can carry).

Sources and credits

Made in Splashery. Its code is MIT.

Share it

This link opens it in the Playground. To put it on your own page, add the element and one script tag. Every option.

https://splashery.app/play/?toy=sound-lab<script type="module" src="https://splashery.app/play/src/element.js"></script> <splashery-toy toy="sound-lab"></splashery-toy>

Compare with