This tool computes and visualises the sound frequencies captured by your device's microphone in real-time, leveraging the browser's Web Audio API and high-performance HTML5 Canvas rendering.
Understanding the Scientific Visualizations:
- Frequency Spectrum Mode: Uses a mathematical algorithm called the Fast Fourier Transform (FFT) to decompose complex audio signals into their individual component frequencies. The horizontal axis represents Frequency (low bass on the left, high treble on the right), and the vertical axis represents volume intensity.
- Oscilloscope Waveform Mode: Displays the raw acoustic pressure waves over time. The horizontal axis charts Time and the vertical axis shows wave amplitude. This mimics traditional hardware laboratory oscilloscopes.
Physics & Engineering Concepts Illustrated:
- Superposition and Harmonics: Speak or whistle into the mic. Unlike a pure sine wave (which shows a single sharp frequency spike), speech or complex instruments produce multiple harmonic peaks. The lowest peak represents the fundamental frequency (determining pitch) and higher peaks represent overtones/harmonics (determining timber/quality).
- Sound Pressure Level (Decibels): Decibel (dB) is a logarithmic unit representing sound pressure level relative to a reference threshold. Since human hearing is logarithmic, small increases in decibels map to massive physical sound power shifts.
- FFT Size (Resolution): High FFT size (e.g. 2048) collects more audio samples, producing high frequency accuracy (narrower bins), but has higher computation latency. Lower FFT sizes (e.g. 256) update much faster at the expense of frequency precision.
Classroom Application Ideas:
- Whistling Tuning Forks: Whistle at different pitches and watch the Peak Frequency HUD track your note. A stable, single whistle behaves almost like a pure sine wave, producing a single, clean vertical column.
- Vowel Formants Analysis: Sing a single sustained pitch, but change your vocal shape from "ah" to "ee" to "oo". Observe how the fundamental pitch spike stays identical, but the higher peaks (known as formants in acoustics) shift locations completely! This illustrates how voice timber changes.
- Exploring Room Hum Noise: Keep the room absolutely quiet and observe the spectrum. You may see a small, persistent peak around 50 Hz or 60 Hz - this represents room resonance or AC power lines electromagnetic interference captured by your microphone.