import type { AnalysisSettings } from "../analysis/analyze.ts";
import { fmtHz } from "../model.ts";
export function About({ settings }: { settings: AnalysisSettings }) {
return (
The idea
A tear may be a rapid sum of tiny, similar clicks, one per fibre or bond that breaks. If so, tearing faster packs the same clicks into less time.
Two things should then stay the same at every speed: the total sound energy of a tear, and its frequency makeup. Their sum gets
louder for a faster tear (more clicks per second) but shorter, and the two effects cancel in the total energy.
This holds even when the clicks overlap and blur together, as long as they arrive at random times: the energies of randomly timed clicks add up.
So nothing here depends on picking out individual clicks.
What is measured
-
Tear segment: found automatically as the loudest stretch well above the background in the energy band (gaps under 0.6 s are bridged). Check it on the Record tab and adjust it if it is wrong. Duration and speed ({settings.sheetLengthIn} in ÷ duration) come from this segment, not from the label.
-
Energy spectral density of the tear: Welch average of 2048-point Hann-windowed spectra over the segment, times its duration. Units are digital
full scale (FS² · s / Hz).
-
Background: the same spectrum measured on the quiet audio before and after the tear (median across windows, so a stray key click does not
dominate), scaled to the tear's duration and subtracted.
-
Sound energy: the background-subtracted spectrum summed over the energy band, {fmtHz(settings.energyLow)} –{" "}
{fmtHz(settings.energyHigh)}. Lower frequencies carry much more room and handling noise, so energy, the automatic tear range and the level-over-time
plot all use only this band. Median frequency and centroid describe where the energy sits within the wider spectrum band,{" "}
{fmtHz(settings.shapeLow)} – {fmtHz(settings.shapeHigh)}. Both bands can be changed under Analysis settings.
What it can't tell you
-
Only relative numbers. The microphone is not calibrated, so energies are in arbitrary units. Comparisons are meaningful only between recordings
made with the same mic, at the same distance and angle, in the same room. Moving the paper twice as far away lowers the energy by roughly 6 dB, which
is bigger than many of the effects you may be looking for.
-
The mic colours the sound. A laptop microphone has its own frequency response and records little above about 20 kHz, so the top of the energy band is near the limit of what it captures. Spectra show the sound as
that mic hears it. That is fine for comparing speeds against each other, but not for absolute spectra.
-
Clipping ruins the energy. If a tear is loud enough to hit full scale, its energy is underestimated. Clipped recordings are flagged.
-
Run-to-run scatter. Two tears at the same speed won't give identical numbers (paper varies, your hands vary). Make several tears per speed and
look at the spread before reading anything into a difference between speeds.
-
Not just the tear. Hand and paper movement, the sheet flapping and the room all add sound. Most of this is at low frequencies, which is why energy is measured
in a high band, but the band cannot remove it entirely.
-
Same energy ≠ same clicks. Equal energy and equal spectra are what identical clicks predict, but other explanations could produce them too.
Different energies or spectra, on the other hand, do show something changes with speed.
How the audio is kept raw
-
Chrome's echo cancellation, noise suppression and automatic gain control are turned off. The settings the browser actually applied are shown after
enabling the mic; a warning appears if any are still on.
-
Samples are taken directly from the audio graph (32-bit float), at the microphone's own sample rate, and stored unmodified. Nothing is compressed.
Downloads are 32-bit float WAV files with the exact recorded samples.
-
macOS can apply its own processing outside the browser's control. While recording, open Control Center: if a Mic Mode option is shown,
set it to Standard (not Voice Isolation or Wide Spectrum). Also keep the input volume in System Settings → Sound fixed between sessions.
Checking the analysis
The project's test script (npm test) builds synthetic tears exactly as the hypothesis says (4000 clicks of one fixed shape with random
amplitudes, spread over 0.3 to 10 seconds) and checks that their measured energies and spectra agree. They do, within a fraction of a dB.
);
}