Skip to content

Integrate soundpack synth and search with the audit fix - #112

Merged
ctoth merged 15 commits into
masterfrom
integrate/soundpack-synth-audit-fix
Oct 20, 2026
Merged

ctoth merged 15 commits into
masterfrom
integrate/soundpack-synth-audit-fix

Conversation

@ctoth

@ctoth ctoth commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Integrates the synth/search feature set from #99 with the audit/master and manifest-validation fix in #111. The original synthesis, sample loading, mastering limiter, descriptor improvements, and GitHub search behavior are preserved. Current master, including #108 and #110, is included through #111.

Auditing a valid low-rate PCM WAV whose peak is at Nyquist could panic by reading past the final spectral bin. The pitch estimator now handles that bin without parabolic interpolation. A WAV-through-audit regression reproduced the panic before the fix and passes at 22050 and 24000 Hz afterward.

This draft is stacked on fix/audit-invalid-mappings; merge #111 first. Its CI exercises the combined tree, including the new invalid-manifest CLI regression and the recipe-to-mastered-pack tests. The original #99 branch and description remain unchanged.

Keep this replacement integration candidate in draft for coordinated final review and merge.

ctoth added 14 commits October 4, 2026 19:01
- New internal/soundpack/synth: layers of sine, triangle, square, saw, pulse or noise with an ADSR envelope, glides, note sequences, FM, vibrato, tremolo, detuned voices and swept filters; effects are reverb, delay, drive, bitcrush, lowpass and highpass
- Parsing rejects unknown settings, sounds no mapping uses and mappings to undefined sounds, each with the sound and layer it is in
- Rendering is deterministic: noise is seeded from the sound's name
- Tests check renders by what the audit hears (pitch, onsets, trend, texture) and run a recipe through master to a clean strict audit
- synth renders a recipe into synth/*.wav and a JSON soundpack over them
- search lists GitHub repositories tagged with the topic claudio-soundpack and prints the command that installs each; it is the only command that contacts a server by itself
- CLAUDIO_SOUNDPACK_SEARCH_URL points search at another endpoint, which is how the tests run it
- soundpacks.md: the recipe format, the publishing convention (repository name, pack at the root, topic) and soundpack search
- cli-reference.md: soundpack synth and soundpack search
- Texture was read from spectral flatness over the whole band, which is low for any band-limited noise: a noise whoosh through a lowpass was reported as tonal
- New Tonality: the energy-weighted share of each analysis window's power held by its 12 strongest bins. Measured on real sounds, tones, chords and FM bells read above 0.9 and narrow-band noise 0.5 to 0.6
- Flatness stays in the JSON report, described as what it is
- A layer with "sample" plays part of a WAV, MP3 or AIFF file instead of an oscillator: start/end choose the slice, speed repitches it, reverse plays it backwards; the envelope, gain, pan, tremolo and filters apply and it mixes with oscillator layers and effects
- This puts every cut of a downloaded recording in the recipe, so a pack built from recordings rebuilds from one file instead of from hand-run ffmpeg commands
- Sample paths are relative to the recipe and must stay inside its directory
- Rendering a recipe whose samples were not loaded is an error, not silence
- Sample layers in the recipe table
- The sourcing process: where to download redistributable recordings, recording provenance in source/sources.json, finding sounds by auditing raw material, and what Wikimedia Commons needs from a bulk downloader
…pitch

- TREND compared the brightness of a sound's two halves. Brightness follows decay, so every struck note read as falling and a rise onto a long ringing note read as steady; pack designers were retiming phrases to make the column agree
- For pitched sounds TREND now compares the pitch the sound opens on with the pitch it closes on (start_hz, end_hz in the JSON). Noise keeps the brightness comparison, which is also reported for every sound as brightness_trend
- PITCH is now the lowest strong partial, interpolated between bins, instead of the strongest one, which could be an overtone
- The docs say what HIT cannot count and that the columns are instruments, not a specification
- Gain alone stops at a recording's tallest spike, so knocks and clicks were left several LU under the target, and pack authors were adding distortion to their recipes to make up the difference
- When a sound is still short of the target after gain, master now raises it and holds only the peaks down: a lookahead limiter (2 ms ahead, 60 ms recovery, both channels together), by at most 9 dB, reported per sound as limited_db
- Sounds that reach the target with gain are untouched
- PITCH takes the lowest strong partial, and was accepting any local maximum within 6 dB of the strongest bin. A lesser bump beside the real peak qualified, so short beeps read about 8% flat (963 Hz for a 1048 Hz note in a real pack)
- A candidate now has to be the strongest bin within about two semitones of itself. Harmonics are an octave or more apart and are unaffected
…nth-audit-fix

# Conflicts:
#	agent-notes/audit-invalid-mappings.md
@ctoth
ctoth changed the base branch from fix/audit-invalid-mappings to master October 20, 2026 05:07
@ctoth
ctoth marked this pull request as ready for review October 20, 2026 05:15
@ctoth
ctoth merged commit 587dd0e into master Oct 20, 2026
9 checks passed
tahodev pushed a commit to tahodev/claudio that referenced this pull request Oct 20, 2026
The CLI reference covered install/analyze/uninstall/hook execution but the
entire 'claudio soundpack' subcommand tree was missing. Add a top-level
section documenting init, list, validate, install, use, add, update, remove,
and status subcommands, mirroring the install section style. Source of truth:
internal/cli/soundpack_command.go and internal/cli/soundpack_git.go.

Also adds the hook execution flags that were missing: --config, --source,
--hook-event (defined at internal/cli/cli.go:67-77).

The Environment Variables section gains XDG_CONFIG_HOME, XDG_DATA_HOME, and
XDG_CACHE_HOME. CLAUDIO_LOG_LEVEL grows a note that stderr is hardcoded to
ERROR; the variable only changes the file handler level.

Findings ctoth#26, ctoth#112, table rows for cli-reference.md:146-159,254-285.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant