d0a8b32Rip Sound Analyzer: record tears, inspect one, compare across speedsJeremy Magland 1# Rip Sound Analyzer
3A 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.
5The 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:
71. the total sound energy of the tear, and
82. its frequency makeup.
10The app measures both for every recording and shows how they change with tear duration.
12## Running
14```bash
15npm install
16npm run dev
17```
19Open 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.
21`npm run build` produces a static site in `dist/` that can be hosted anywhere (HTTPS is required for microphone access, except on localhost).
23`npm test` runs sanity checks of the analysis (Parseval, synthetic tears of different durations giving the same energy and spectrum, WAV round trip).
25## What it does
09371b0Open-ended samples instead of fixed speedsJeremy Magland 27- **Record**: a list of samples, each one tear at whatever speed you choose, sorted slowest first by measured tear duration. Add a new sample, re-record or delete one, and give it an optional name and notes. 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 sample:
18eb8cdFind the tear from clicks in the filtered waveform; count every click's energy in fullJeremy Magland 28 - **Tear range**: level in the analysis band, waveform (filtered to the analysis band by default, or raw) and spectrogram on one zoomable time axis. The range is found automatically from the clicks in the filtered waveform (short separate sounds such as key presses are left out and listed, with a button to take them in); drag across any of the three plots to mark it again, drag its edges, or type start/end times. Play the tear (with a moving playhead) or the whole recording.
cc4197eDrop median frequency and centroidJeremy Magland 29 - **Results**: duration, speed, energy, mean power, peak/clipping, level above background.
d8b88deRecord tab organised around five fixed speeds, one tear eachJeremy Magland 30 - **Frequency makeup**: the tear's energy spectrum against the background.
bf56870Export/import the whole dataset; filtered waveform by defaultJeremy Magland 31- **Export / import**: “Export dataset” saves every sample and the analysis settings to one .zip (`dataset.json` plus a 32-bit float WAV per sample). “Import dataset…” replaces everything in the browser with such a file, after confirming.
09371b0Open-ended samples instead of fixed speedsJeremy Magland 32- **Compare**: all samples, coloured by tear duration (stronger = faster): energy vs tear duration, loudness (mean power) vs duration, spectra of all speeds overlaid (optionally shape only), a table and CSV export.
751f8faSelect the tear on level, waveform or spectrogram; 10–20 kHz analysis bandJeremy Magland 34Analysis band (set under Analysis settings), default 10–20 kHz: used for total energy, finding the tear, the level plot, the optional filtered waveform, the background comparison and normalising spectra, because lower frequencies carry much more room and handling noise. Spectra are still drawn over the full range for context.
d0a8b32Rip Sound Analyzer: record tears, inspect one, compare across speedsJeremy Magland 36The “What this can tell you” tab in the app explains the method and its limits.
38## Layout
18eb8cdFind the tear from clicks in the filtered waveform; count every click's energy in fullJeremy Magland 40- `src/analysis/` – FFT, tear detection, spectra, energy
d0a8b32Rip Sound Analyzer: record tears, inspect one, compare across speedsJeremy Magland 41- `src/audio/` – microphone capture, WAV encode/decode, synthetic tears
bf56870Export/import the whole dataset; filtered waveform by defaultJeremy Magland 42- `src/storage/` – IndexedDB, dataset export/import (uncompressed zip)
d0a8b32Rip Sound Analyzer: record tears, inspect one, compare across speedsJeremy Magland 43- `src/components/` – UI, including a small canvas plotting component