/ magland / rip-sound-analyzer
Sign in
magland / rip-sound-analyzer
rip-sound-analyzer
Go to fileHistoryFork
scriptsRip Sound Analyzer: record tears, inspect one, compare across speeds
srcRip Sound Analyzer: record tears, inspect one, compare across speeds
.gitignoreRip Sound Analyzer: record tears, inspect one, compare across speeds
index.htmlRip Sound Analyzer: record tears, inspect one, compare across speeds
package-lock.jsonRip Sound Analyzer: record tears, inspect one, compare across speeds
package.jsonRip Sound Analyzer: record tears, inspect one, compare across speeds
README.mdRip Sound Analyzer: record tears, inspect one, compare across speeds
tsconfig.jsonRip Sound Analyzer: record tears, inspect one, compare across speeds
vite.config.tsRip Sound Analyzer: record tears, inspect one, compare across speeds

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#

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: raw capture from the microphone, with Chrome's echo cancellation, noise suppression and auto gain turned off. Samples come straight from the audio graph via an AudioWorklet at the mic's own sample rate (32-bit float, no compression). The settings the browser actually applied are shown.
  • Inspect one recording: level over time, waveform and spectrogram on a shared, zoomable time axis; the tear segment (auto-detected, adjustable by dragging its edges); the tear's energy spectral density against the background; summary numbers (duration, speed, energy, median frequency, centroid, peak, clipping, level above background).
  • Compare: energy vs tear duration, median frequency / centroid / mean power vs duration, spectra overlaid per label (optionally normalised to compare shape only), straight-line trends with standard errors, and tables. CSV export.
  • Synthetic tears: built exactly as the hypothesis says, to check the analysis gives flat energy and identical spectra.

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
↑↓ move↵openescclose