Repository navigation
Integrate soundpack audit and master with manifest validation - #111
Merged
Merged
Conversation
- New internal/loudness: ITU-R BS.1770 K-weighted loudness with gating, an ungated fallback for sounds under one 400 ms block, 4x true peak, the audible span of a sound, clipped-run count, and the gain to a loudness target under a peak ceiling - Tests check the EBU Tech 3341 reference tone (-23 dBFS 1 kHz stereo sine reads -23 LUFS) at 22.05, 44.1 and 48 kHz, the relative gate, and an inter-sample peak a sample-peak meter misses - K-weighting coefficients are derived from the analog prototypes so they hold at any sample rate
- Tools that measure or rewrite sounds need the frames playback would feed the device - The characterization tests now decode through it, so it is covered by every decoder test
- New internal/soundpack/audit: per-sound duration, loudness, true peak, silence at each end, clipping, and a numeric description (onsets, attack, dominant pitch, centroid, pitch trend, texture) for readers who cannot hear the pack - Rules: too-long (per-category limits, strictest wins for a shared file), too-loud, too-quiet, peak-over-ceiling, clipping, leading-silence, trailing-silence; errors for undecodable and silent files; notes for peak-limited, duplicate, sample-rate and unreferenced - JSON packs are audited over the files the manifest references plus unreferenced audio beside them, so raw material kept elsewhere in the repository is not counted - Levels marshal as null for silence, since JSON has no negative infinity
- New internal/soundpack/master: trim silence, cut to the category limit with a fade, apply one gain to the loudness target under the true-peak ceiling, write 48 kHz 16-bit WAV (mono when channels match) - Gain moves the silence boundary, so trim and gain repeat until neither changes - A JSON pack is written as soundpack.json plus sounds/, each source file mastered once however many keys map to it - Guard: TestMasteredSoundsPassTheAudit runs ten awkward inputs through mastering and fails if the audit finds anything to fix, so a new audit rule that mastering does not satisfy cannot land unnoticed
- audit prints a table and findings, or --json; --strict fails on warnings for CI - master writes a mastered copy into --out and reports gain, trims and truncations per sound - Both take the same --target-lufs, --tolerance, --peak-ceiling and --max-duration flags, so a pack is mastered to the standard it is audited against
- soundpacks.md: what audit measures and why each rule exists, how master fixes it, a source/ + built-pack repository layout with a CI workflow, and how to choose a cut from a spectrogram when you cannot listen - cli-reference.md: soundpack audit and soundpack master - CLAUDE.md: list the two subcommands
- v2.12.2 built with Go 1.26.6 reports six staticcheck SA5011 false positives in existing tests (a nil check followed by t.Fatal); v2.14.0 reports none - Bumped in CI, pre-commit and the test that keeps the two in step
ctoth
marked this pull request as ready for review
October 20, 2026 05:07
tahodev
pushed a commit
to tahodev/claudio
that referenced
this pull request
Oct 20, 2026
RESEARCH_NOTES.md and AUDIO_CRACKLING_INVESTIGATION.md were checked into the repo root but are both stale process artifacts: - RESEARCH_NOTES.md documents flags that never shipped (--set-soundpack, --list-soundpacks, --clear-cache, --test) and a config path that never existed (~/.claudio/config.json). Move to notes/research-notes-early-design.md and add an 'early design exploration' disclaimer pointing future readers at CLAUDE.md and docs/. - AUDIO_CRACKLING_INVESTIGATION.md is a failed investigation log ending at 'Next Steps (TODO)'. Move to notes/audio-crackling-investigation.md and add a disclaimer pointing at reports/comprehensive-review.md finding ctoth#1 for the likely root cause. (The previously untracked notes-soundpack-vision.md was also moved under notes/ in the working tree but stays untracked — Q can add it explicitly if desired. Root notes.md is an active scratchpad with cross-references and is left in place per the brief.) Findings ctoth#107, ctoth#111, table rows for RESEARCH_NOTES.md and AUDIO_CRACKLING_INVESTIGATION.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrates the audit/master commands from #98 with current master. A JSON pack with missing or unsafe audio references now fails the audit command instead of succeeding with an empty or partial report. The fix reuses
JSONValidation.Err()and is isolated in commit b0efa05.The new CLI regression failed before the fix and passes afterward for missing-only, mixed playable/missing, and unsafe mappings, both with and without
--strict. Repository checks run through this draft's CI.Replacement integration candidate for #98; the original PR is unchanged. Synth/search from #99 will be validated as a stacked draft against this branch. Keep this draft open for coordinated final review and merge.