# 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: 1. the total sound energy of the tear, and 2. its frequency makeup. The app measures both for every recording and shows how they change with tear duration. ## Running ```bash 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. 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 statistics - `src/audio/` – microphone capture, WAV encode/decode, synthetic tears - `src/storage/` – IndexedDB - `src/components/` – UI, including a small canvas plotting component