| scripts | |
| src | |
| .gitignore | |
| index.html | |
| package-lock.json | |
| package.json | |
| README.md | |
| tsconfig.json | |
| vite.config.ts |
Rip Sound Analyzer#
A small browser app for studying the sound of tearing paper. Record yourself tearing a strip off an 11 inch sheet at different speeds, label each recording with its speed, and compare.
The working idea: a tear is a rapid sum of tiny, similar clicks. If so, tearing faster packs the same clicks into less time, and two things should not depend on speed:
- the total sound energy of the tear, and
- its frequency makeup.
The app measures both for every recording and shows how they change with tear duration.
Running#
npm install
npm run dev
Open the printed localhost URL in Chrome. Everything runs in the browser; recordings are stored in the browser's IndexedDB. There is no server and no account.
npm run build produces a static site in dist/ that can be hosted anywhere (HTTPS is required for microphone access, except on localhost).
npm test runs sanity checks of the analysis (Parseval, synthetic tears of different durations giving the same energy and spectrum, WAV round trip).
What it does#
- Record: five fixed speeds (very slow ~10 s to very fast <0.5 s), one tear each. Pick a speed, record it, check it, re-record or delete it. Capture is raw: Chrome's echo cancellation, noise suppression and auto gain are off, and samples come straight from the audio graph via an AudioWorklet at the mic's own sample rate (32-bit float, no compression). For each recording:
- Tear range: found automatically; drag across the level plot to mark it again, drag its edges, or type start/end times. Play the tear (with a moving playhead) or the whole recording.
- Results: duration, speed, energy, median frequency, centroid, mean power, peak/clipping, level above background.
- Close-up: waveform and spectrogram, with zoom buttons, to look for individual clicks.
- Frequency makeup: the tear's energy spectrum against the background.
- Compare: energy vs tear duration, median frequency / centroid / mean power vs duration, spectra of all speeds overlaid (optionally shape only), a table and CSV export.
Two frequency bands (set under Analysis settings): the energy band, default 15–20 kHz, is used for total energy, finding the tear, the level-over-time plot and the background comparison, because lower frequencies carry much more room and handling noise. The spectrum band, default 100 Hz–20 kHz, is used for median frequency, centroid and comparing spectrum shapes.
The “What this can tell you” tab in the app explains the method and its limits.
Layout#
src/analysis/– FFT, tear detection, Welch spectra, energy and spectral statisticssrc/audio/– microphone capture, WAV encode/decode, synthetic tearssrc/storage/– IndexedDBsrc/components/– UI, including a small canvas plotting component