/noise-pollution-analysis:detect-beatfrom noise-pollution-analysis
Detect tempo (BPM), beat times and beat strength in a recording of nuisance music or a thumping bass heard through a wall - aubio, librosa and madmom plus an autocorrelation reference, run on Modal.
Ships in noise-pollution-analysis. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Reports tempo, beat times and how strong and regular the beat is, using established music-information-retrieval tools cross-checked against each other and against a simple autocorrelation reference. Built for a bar's dance music through a wall or window: a kick drum at 110-135 BPM, energy 40-160 Hz, faint, under hiss. Accepts audio or video.
spectral-analysis shows periodicity of the level envelope at about 2 Hz.Heavy work runs on Modal (CPU, about 1-2 minutes, a few cents), never on the laptop.
MODAL_PROFILE=<your profile> uvx modal run scripts/detect_beat_modal.py --path <file> \
[--band 40-160|none] [--channel auto|left|right|mix] [--window 30] [--full-output]
--channel auto (default) picks the louder channel: a one-sided mic on a stereo
recorder is common, and a plain mono mix would lose 6 dB. The choice and per-channel
RMS are in meta.--band (default 40-160 Hz) adds a band-passed run of every method ([band])
next to the full-band run ([full]). none skips it.<file>.beats.json (with all beat times) beside the
input. The first run builds the Modal image (about 1 minute) and Modal prints build
logs before the JSON; later runs are cached. Read the sidecar file, not stdout, if
you need clean JSON.| Key | Tool | Gives |
|---|---|---|
autocorr_ref | band-pass 40-120 Hz, abs envelope at 200 Hz, autocorrelation over lags 0.35-0.8 s | BPM and pulse (autocorrelation peak / zero lag) per window |
aubio_tempo | aubio tempo CLI | BPM only (the CLI prints no beats); per-window BPM from slices |
aubio_beat | aubio beat CLI | beat times; BPM from the median inter-beat interval |
librosa_beat | librosa.beat.beat_track, librosa.feature.tempo per window | beat times, BPM |
madmom_rnn | madmom RNNBeatProcessor + DBN tracker | beat times, BPM (60-200 range) |
regularity = fraction of inter-beat intervals within 10% of the median.
autocorr_ref, the only measure of how much beat there is):
= 0.3 clear, 0.15-0.3 weak, < 0.15 none. Judge it per window and by the median.
autocorr_ref and at least two of
the other methods on the band-passed audio fall within about 3 BPM, and the per-window
BPMs are stable. State the spread, not one number.regularity can be high on nothing. Only pulse
says whether a beat is present. A tracker BPM with pulse < 0.15 is not evidence.sosfiltfilt) but the trackers quantise to
frames of about 6-12 ms and may lock to the off-beat.pulse < 0.15 everywhere, which is a finding in its own right (no detectable beat).pulse.error and the other methods are unaffected.2026-11-29, Modal CPU (2 cores), 30 s windows, band 40-160 Hz, mic on the left channel of a stereo WAV (auto-selected: right channel RMS was about 1000x lower). Both are bedroom takes of a bar's music, 48 kHz stereo. Reference (earlier, independent run of the same autocorrelation method) gave 130-132 BPM, pulse 0.27-0.48 for take A.
Median BPM per method (pulse = median autocorrelation pulse strength):
| Method | A: window open, 179 s | B: window closed, faint, 119 s |
|---|---|---|
| autocorr_ref (40-120 Hz) | 129.7, pulse 0.37 (0.27-0.48) | 129.0, pulse 0.32 (0.17-0.38) |
| aubio_tempo full / band | 135.8 / 132.1 | 134.8 / 132.1 |
| aubio_beat full / band | 136.2 / 132.2 | 135.2 / 132.3 |
| librosa_beat full / band | 129.2 / 129.2 | 123.0 / 129.2 |
| madmom_rnn full / band | 130.4 / 65.2 (half tempo) | 130.4 / 127.7 |
Confirmed (observed in these runs):
Not established (inferred or not tested):
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
10 skills in this plugin
/compare-conditionsCompare two or more noise recordings (window open vs closed, source A vs B, before vs after) - delta table against a baseline, per-band deltas and explicit caveats about gain, mic position and the time gap./install-analysis-toolsCheck and install the CLI toolchain for noise analysis - ffmpeg, sox, aubio, uv - on Linux, macOS or Windows; verify each works./isolate-nuisanceIsolate a noise nuisance from room background - subtract a background take with sox, extract a band, make before/after spectrograms./log-noise-sampleLog a noise recording into the workspace - copy the audio, capture device, app, room, mic position and conditions; give recording tips./noise-chartMake noise charts as PNGs from recordings - level over time (A and C weighted), 1/3-octave spectrum overlay and condition-effect bars against a baseline./noise-metricsCompute A- and C-weighted Leq, Fmax, L10, L90 and impacts per minute from a WAV or FLAC noise recording and write a stats JSON; levels are uncalibrated dBFS unless a calibration offset is given.noise-pollution-analysis@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin noise-pollution-analysis