### Install and verify modeled-only CLI install Source: https://github.com/0x4d44/ferrosintesis/blob/main/RELEASING.md Installs the CLI with --no-default-features to prove the modeled-only install advertised in the CLI README, then runs its help command. ```text cargo install ferrosintesis-cli --version --no-default-features --locked --root /bin/ferrosintesis --help ``` -------------------------------- ### Install and verify CLI from registry Source: https://github.com/0x4d44/ferrosintesis/blob/main/RELEASING.md Installs the CLI from crates.io into a temporary root and runs its help command to verify the release. Use this after the versions appear in the crates.io index. ```text cargo install ferrosintesis-cli --version --locked --root /bin/ferrosintesis --help ``` -------------------------------- ### Install and render MIDI to WAV Source: https://github.com/0x4d44/ferrosintesis/blob/main/crates/ferrosintesis-cli/README.md Install the CLI with cargo and render a MIDI file to WAV. The render is offline and deterministic for a fixed executable, input, and options; no realtime device access or instrument lookup occurs. ```bash cargo install ferrosintesis-cli ferrosintesis song.mid -o song.wav ``` -------------------------------- ### Install dependencies Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/opus4-8/README.md Install the required pinned version of mido to ensure byte-identical MIDI output. ```bash python3 -m pip install -r requirements.txt ``` -------------------------------- ### Build ferrosintesis and calmeter Source: https://github.com/0x4d44/ferrosintesis/blob/main/wrk_journals/2026.07.21 - JRN - M-CAL foundation proven.md Builds the main CLI binary and the calmeter example separately. ```bash cargo build --release -p ferrosintesis-cli cargo build --release -p ferrosintesis-cli --example calmeter ``` -------------------------------- ### Usage examples for transcribe.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/TRANSCRIBE.md Shows four command-line invocations: transcribing a mix (auto-separate with Demucs), transcribing a directory of pre-made stems, choosing an output directory, and running a self-test that requires no ML tools. ```bash python3 transcribe.py song.opus # a mix: auto-separate (Demucs) then transcribe python3 transcribe.py stems_dir/ # a directory of pre-made stems, transcribed directly python3 transcribe.py song.opus -o out/ # choose the output directory python3 transcribe.py --selftest # the no-ML assemble oracle (needs no tools) ``` -------------------------------- ### Install and run the fuzzer Source: https://github.com/0x4d44/ferrosintesis/blob/main/fuzz/README.md Commands to install cargo-fuzz, build the fuzz target, and run it with a time limit. Requires nightly toolchain and a sanitizer runtime. ```bash cargo install cargo-fuzz # once cd fuzz cargo +nightly fuzz build parse # build only cargo +nightly fuzz run parse -- -max_total_time=600 ``` -------------------------------- ### Build and render a MIDI file with ferrosintesis CLI (PowerShell) Source: https://github.com/0x4d44/ferrosintesis/blob/main/crates/ferrosintesis/DESIGN.md Builds the CLI in release mode and renders a MIDI file to WAV using PowerShell syntax. The output path is specified with -o. The example uses a specific album MIDI file and output path. ```powershell cargo build --release -p ferrosintesis-cli .\target\release\ferrosintesis.exe "albums\fable5\Hollow Hill\midi\01 - Hollow Hill, Part One.mid" ` -o "target\demo\01 - Hollow Hill, Part One.wav" ``` -------------------------------- ### Reproduce decay envelope measurements (build, probe, render, calibrate) Source: https://github.com/0x4d44/ferrosintesis/blob/main/bugs/MM-BUG-KILN-00042.md Commands to reproduce the decay measurements: build the CLI examples, generate probe MIDI chunks, render ferro/SC-55/S-YXG50 WAVs, run calmeter on each, and derive trims. Requires the listed tools and ROMs. ```bash cargo build --release -p ferrosintesis-cli --example raw_dump --example calmeter python tools/instrument-balance/mkprobe.py chunk{0..3} ./target/release/examples/raw_dump.exe _cal/probe_chunkN.mid _cal/ferro_chunkN.f32.wav /c/apps/mdmidiemu.exe _cal/probe_chunkN.mid --wav _cal/sc55_chunkN.wav --synth sc55 --roms /c/apps/mdmidiemu.exe _cal/probe_chunkN.mid --wav _cal/yxg_chunkN.wav --synth syxg50 \ --dll /d/language/mdsc55/mdmu80-syxg50-helper/assets/syxg50.dll ./target/release/examples/calmeter.exe _cal/ferro_chunkN.f32.wav _cal/plan_chunkN.tsv ferro ./target/release/examples/calmeter.exe _cal/sc55_chunkN.wav _cal/plan_chunkN.tsv sc55 ./target/release/examples/calmeter.exe _cal/yxg_chunkN.wav _cal/plan_chunkN.tsv syxg50 python tools/instrument-balance/derive_trims.py _cal/ferro_full.levels.tsv \ _cal/sc55_full.levels.tsv _cal/yxg_full.levels.tsv ``` -------------------------------- ### Build and run calibration pipeline commands Source: https://github.com/0x4d44/ferrosintesis/blob/main/wrk_docs/2026.07.22 - M-CAL v3 certified derivation report.md Commands to build the CLI examples and run the probe, raw_dump, mdmidiemu, calmeter, and derive_trims tools for the M-CAL v3 certified derivation. The pipeline computes trims without applying them (dry run). ```bash cargo build --release -p ferrosintesis-cli --example raw_dump --example calmeter python tools/instrument-balance/mkprobe.py chunk{0..3} ./target/release/examples/raw_dump.exe _cal/probe_chunkN.mid _cal/ferro_chunkN.f32.wav ./target/release/examples/raw_dump.exe _cal/probe_chunkN.mid _cal/ferro_ns_chunkN.f32.wav --no-samples /c/apps/mdmidiemu.exe _cal/probe_chunkN.mid --wav _cal/sc55_chunkN.wav --synth sc55 --roms ./target/release/examples/calmeter.exe _cal/ferro_chunkN.f32.wav _cal/plan_chunkN.tsv ferro --vs _cal/ferro_ns_chunkN.f32.wav ./target/release/examples/calmeter.exe _cal/sc55_chunkN.wav _cal/plan_chunkN.tsv sc55 python tools/instrument-balance/derive_trims.py _cal/ferro_full.levels.tsv _cal/sc55_full.levels.tsv ``` -------------------------------- ### Build and verify commands Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/gpt5-6/Every Voice Forward/README.md Commands to regenerate MIDI files, verify determinism, get summary statistics, or rebuild a single track. The verification command runs all composition oracles. ```bash python3 build.py # regenerate all MIDI and album_manifest.json python3 build.py --verify # rebuild in memory, compare bytes, run every oracle python3 build.py --summary # compact score statistics python3 build.py --track 5 # rebuild one track while composing ``` -------------------------------- ### Install without embedded samples Source: https://github.com/0x4d44/ferrosintesis/blob/main/crates/ferrosintesis-cli/README.md Build the modelled-only synth without embedded sample banks. This produces a genuinely different instrument for some GM programs, not merely a smaller one. ```bash cargo install ferrosintesis-cli --no-default-features ``` -------------------------------- ### Build and render a MIDI file with ferrosintesis CLI (sh) Source: https://github.com/0x4d44/ferrosintesis/blob/main/crates/ferrosintesis/DESIGN.md Builds the CLI in release mode and renders a MIDI file to WAV using POSIX shell syntax. The output path is specified with -o. The example uses a specific album MIDI file and output path. ```sh cargo build --release -p ferrosintesis-cli ./target/release/ferrosintesis "albums/fable5/Hollow Hill/midi/01 - Hollow Hill, Part One.mid" \ -o "target/demo/01 - Hollow Hill, Part One.wav" ``` -------------------------------- ### Run ferrosintesis-samples test suite Source: https://github.com/0x4d44/ferrosintesis/blob/main/tools/ferrosintesis-samples/README.md Runs the unittest discovery for the ferrosintesis-samples directory. Exits 0 whether or not numpy is installed; without numpy, the banjo_extract and fretnoise_bake tests are skipped, not silently dropped. ```sh python3 -m unittest discover -s tools/ferrosintesis-samples ``` -------------------------------- ### Verify fret-noise bank with fretnoise_bake.py --verify Source: https://github.com/0x4d44/ferrosintesis/blob/main/crates/ferrosintesis-samples-fretnoise/README.md Creates a Python 3.14 virtual environment, installs the bake requirements, and verifies the committed bank without writing. Requires `ffmpeg` on `PATH`; the script checks this prerequisite before reading or rewriting the bank. ```console py -3.14 -m venv venv\fretnoise-bake venv\fretnoise-bake\Scripts\python -m pip install -r tools\ferrosintesis-samples\requirements-fretnoise-bake.txt venv\fretnoise-bake\Scripts\python tools\ferrosintesis-samples\fretnoise_bake.py --verify ``` -------------------------------- ### Run build.py to write MIDI before --verify Source: https://github.com/0x4d44/ferrosintesis/blob/main/wrk_journals/2026.07.20 - JRN - T16 guitar solo reads quieter - diagnosis.md Always run a bare `python build.py` first to write the MIDI file, then run `--verify` to check it. Running `--verify` alone does not write the .mid file and can report green on new music while the committed MIDI still holds the old version. ```bash python build.py ``` ```bash --verify ``` -------------------------------- ### Run M-CAL closed-loop measurement pipeline Source: https://github.com/0x4d44/ferrosintesis/blob/main/wrk_docs/2026.07.25 - M-CAL closed-loop re-derive report.md Full measurement pipeline for the M-CAL closed-loop re-derive: builds the CLI examples, generates probe MIDI files with mkprobe.py, renders raw dumps for ferro (with and without --no-samples), renders SC-55 and S-YXG50 WAVs via mdmidiemu, runs calmeter to produce per-chunk levels TSVs, then concatenates chunks and runs derive_synced.py and drift.py. The chunkN placeholder is expanded by the for loop; the calmeter lines for sc55 and syxg50 are abbreviated with '> ...' in the source. ```bash cargo build --release -p ferrosintesis-cli --examples for n in 0 1 2 3; do python tools/instrument-balance/mkprobe.py chunk$n; done ./target/release/examples/raw_dump.exe _cal/probe_chunkN.mid _cal/ferro_chunkN.f32.wav ./target/release/examples/raw_dump.exe _cal/probe_chunkN.mid _cal/ferro_ns_chunkN.f32.wav --no-samples deltic timeout 1800 /c/apps/mdmidiemu.exe _cal/probe_chunkN.mid --wav _cal/sc55_chunkN.wav \ --synth sc55 --roms /d/language/mdsc55/roms/sc55 deltic timeout 900 /c/apps/mdmidiemu.exe _cal/probe_chunkN.mid --wav _cal/yxg_chunkN.wav \ --synth syxg50 --dll /d/language/mdsc55/mdmu80-syxg50-helper/assets/syxg50.dll ./target/release/examples/calmeter.exe _cal/ferro_chunkN.f32.wav _cal/plan_chunkN.tsv ferro \ --vs _cal/ferro_ns_chunkN.f32.wav > _cal/ferro_chunkN.levels.tsv ./target/release/examples/calmeter.exe _cal/sc55_chunkN.wav _cal/plan_chunkN.tsv sc55 > ... ./target/release/examples/calmeter.exe _cal/yxg_chunkN.wav _cal/plan_chunkN.tsv syxg50 > ... # chunks concatenated to _cal/{ferro,sc55,yxg}_full.levels.tsv (one header) python _cal/derive_synced.py _cal/ferro_full.levels.tsv _cal/sc55_full.levels.tsv \ _cal/yxg_full.levels.tsv # the panel run python _cal/drift.py _cal/ferro_full.levels.tsv _cal/sc55_full.levels.tsv \ _cal/yxg_full.levels.tsv # drift vs the 07.22 baseline ``` -------------------------------- ### Build demos with python build.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/demos/synth_feature_showcase/README.md Builds the MIDI demos and optionally verifies the build with the --verify flag. ```powershell python build.py python build.py --verify ``` -------------------------------- ### Build and verify a track with build.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/wrk_docs/2026.07.09 - PLN - Through Lines composer contract.md Run the build pipeline for a track: first check in-memory oracles, then write the MIDI file, and finally verify the file and all oracles. The --verify step must pass for the track to be considered done; do not run the full-album --verify because other stubs are intentionally red. ```bash python build.py --track N --check # in-memory oracles while composing python build.py --track N # write midi/NN - Title.mid python build.py --track N --verify # file + all oracles for your track ``` -------------------------------- ### Rebuild and verify with python3 build.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/fable5/Sub Rosa/README.md Run from the repo root to rebuild the MIDI and album manifest, or verify the composition against 16 oracles covering material, structure, CC inventory, vowels, pedals, portamento, RPN/bend hygiene, Morse, dynamics, and bounds. ```powershell python3 build.py # rebuild midi + album_manifest.json python3 build.py --verify # 16 oracles: material, structure, CC # inventory, vowels, pedals, portamento, # RPN/bend hygiene, Morse, dynamics, bounds ``` -------------------------------- ### Run prepare.py for a family Source: https://github.com/0x4d44/ferrosintesis/blob/main/wrk_journals/2026.07.18 - JRN - chromatic perc LA marimba xylo glock.md Runs the prepare script for a single family, baking WAVs into orchestral2/samples/ and printing measured roots. Record the roots and sanity-check them against expected mallet pitches (marimba C4≈262, xylo/glock sound higher — verify the octave). ```bash python tools/ferrosintesis-samples/prepare.py --only= ``` -------------------------------- ### Get merge-base of origin/main and HEAD Source: https://github.com/0x4d44/ferrosintesis/blob/main/wrk_journals/2026.07.18 - JRN - viola bank gm41 dedicated onset.md Prints the merge-base commit hash between origin/main and HEAD, used to create the baseline worktree. ```bash git merge-base origin/main HEAD ``` -------------------------------- ### Render Winter Guests with ferrosintesis CLI (PowerShell) Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/fable5/Winter Guests/README.md Builds the ferrosintesis CLI and renders both MIDI parts to WAV files. Requires cargo and PowerShell. Output lands in target/renders/. ```powershell cargo build --release -p ferrosintesis-cli New-Item -ItemType Directory -Force target\renders | Out-Null .\target\release\ferrosintesis.exe "albums\fable5\Winter Guests\midi\01 - Winter Guests, Part One.mid" -o "target\renders\Winter Guests, Part One.wav" .\target\release\ferrosintesis.exe "albums\fable5\Winter Guests\midi\02 - Winter Guests, Part Two.mid" -o "target\renders\Winter Guests, Part Two.wav" ``` -------------------------------- ### Build and verify with python3 build.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/fable5/Seven Kinds of Sunlight/README.md Use 'python3 build.py' to rebuild the MIDI and album manifest. Use 'python3 build.py --verify' to run 19 oracles including meters, driving bass, drums, counterpoint stack, RPN/bend hygiene, vowels, dynamics, and bounds. ```powershell python3 build.py # rebuild midi + album_manifest.json python3 build.py --verify # 19 oracles, incl. meters, driving bass, # drums, the counterpoint stack, RPN/bend # hygiene, vowels, dynamics, bounds ``` -------------------------------- ### Build and verify project Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/fable5/Hollow Hill/ALBUM.md Use these commands to execute the build script and perform a verification check. ```powershell python3 build.py python3 build.py --verify ``` -------------------------------- ### Look up fret-noise sample with ferrosintesis_samples_fretnoise::get Source: https://github.com/0x4d44/ferrosintesis/blob/main/crates/ferrosintesis-samples-fretnoise/README.md Retrieves a fret-noise sample by its exact FLAC filename and verifies the FLAC magic bytes. The `get` function returns a `Result`; unwrap is used here for brevity. ```rust let flac = ferrosintesis_samples_fretnoise::get("fretnoise_rr01.flac").unwrap(); assert_eq!(&flac[..4], b"fLaC"); ``` -------------------------------- ### Run prepare.py with --local-only Source: https://github.com/0x4d44/ferrosintesis/blob/main/bugs/MM-BUG-KILN-00128.md Run the sample preparation script in local-only mode, which skips fetching the full bank and regenerates only the gong bank according to the gong package's README and PROVENANCE. However, due to a bug, it also regenerates the bottle-bank output, potentially dirtying a tracked file outside the requested bank. ```text python tools/ferrosintesis-samples/prepare.py --local-only ``` -------------------------------- ### Run prepare.py to regenerate sample banks (PowerShell) Source: https://github.com/0x4d44/ferrosintesis/blob/main/tools/ferrosintesis-samples/README.md Executes the prepare.py script from the ferrosintesis-samples tools directory. It downloads source sustains and rebuilds both package banks, printing each zone's root frequency. Requires Python 3 and is standard-library only. ```powershell python3 tools/ferrosintesis-samples/prepare.py ``` -------------------------------- ### Self-referential payload assertion in every_sample_is_a_nonempty_bank_file_with_the_expected_size Source: https://github.com/0x4d44/ferrosintesis/blob/main/bugs/MM-BUG-CRUCIBLE-00040.md The self-referential assertion in crates/ferrosintesis-samples-bass/src/lib.rs:113. It iterates over SAMPLES and compares get(name) to the bytes from the same tuple, so it can only agree with itself. The only way to make it fail is a duplicate name, which inventory_matches_packaged_samples already excludes. ```rust for (name, bytes) in SAMPLES { ... assert_eq!(get(name), Some(bytes)); } ``` -------------------------------- ### CLI output showing echo time mismatch Source: https://github.com/0x4d44/ferrosintesis/blob/main/bugs/MM-BUG-KILN-00296.md Example output from `ferrosintesis song.mid --delay 60000` showing the printed echo time (60000 ms) that contradicts the actual render (10000 ms). ```text song: 3.21 min, 4812 events, 9 markers, 96 bpm at open (echo 60000 ms) ``` -------------------------------- ### Reproduce the reference panel with three commands Source: https://github.com/0x4d44/ferrosintesis/blob/main/wrk_docs/2026.07.22 - M-CAL v3 reference-panel derivation report.md Run these three commands in sequence to reproduce the reference panel. The first uses mdmidiemu.exe to render a MIDI chunk with the S-YXG50 synth, the second uses calmeter.exe to measure levels, and the third runs derive_trims.py to compute trims from the three level files. ```bash /c/apps/mdmidiemu.exe _cal/probe_chunkN.mid --wav _cal/yxg_chunkN.wav --synth syxg50 \ --dll /d/language/mdsc55/mdmu80-syxg50-helper/assets/syxg50.dll ./target/release/examples/calmeter.exe _cal/yxg_chunkN.wav _cal/plan_chunkN.tsv syxg50 python tools/instrument-balance/derive_trims.py _cal/ferro_full.levels.tsv \ _cal/sc55_full.levels.tsv _cal/yxg_full.levels.tsv ``` -------------------------------- ### build.py: cargo build --release -p ferrosintesis-cli then render_opus.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/wrk_journals/2026.07.13 - JRN - purge committed opus add build.py.md The new repo-root build.py runs cargo build --release -p ferrosintesis-cli and then render_opus.py. Flags: --album, --jobs, --skip-build, --no-render. ```bash cargo build --release -p ferrosintesis-cli ``` ```bash render_opus.py ``` -------------------------------- ### Regenerate samples with prepare.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/crates/ferrosintesis-samples-musescore/PROVENANCE.md Command to regenerate the sample packages from the repository root, specifying the instrument families to include. ```bash python3 tools/ferrosintesis-samples/prepare.py --only=brasssection,sitar,panflute,bottle,shakuhachi,celesta ``` -------------------------------- ### Rust alias resolution assertion in gen_crate_lib.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/bugs/MM-BUG-KILN-00199.md Asserts that each alias resolves to the same value as its canonical target. If the canonical target is missing from SAMPLES, both get() calls return None and the assertion passes vacuously, so it does not prove the alias resolves to real bytes. ```rust for (alias, canonical) in ALIASES { assert_eq!(get(alias), get(canonical), "alias {alias}"); } ``` -------------------------------- ### Run local gates: fmt, test, clippy, build Source: https://github.com/0x4d44/ferrosintesis/blob/main/reqs/MM-REQ-KILN-00002.md Additional local gates after rebasing onto origin/main at 424922a: fmt check, full test suite, clippy with -D warnings, and release build. All passed. ```text deltic timeout 120 cargo fmt --check --manifest-path fable5/hollowsynth/Cargo.toml passed (no output) ``` ```text $null | deltic timeout 300 cargo test --manifest-path fable5/hollowsynth/Cargo.toml test result: ok. 107 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 8.41s ``` ```text $null | deltic timeout 300 cargo clippy --manifest-path fable5/hollowsynth/Cargo.toml --all-targets -- -D warnings Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.89s ``` ```text deltic timeout 300 cargo build --release --manifest-path fable5/hollowsynth/Cargo.toml Finished `release` profile [optimized] target(s) in 3.75s ``` -------------------------------- ### Verify sample count and FLAC header Source: https://github.com/0x4d44/ferrosintesis/blob/main/crates/ferrosintesis-samples-orchestral/README.md Use this snippet to confirm the crate's sample count and that a retrieved sample is a valid FLAC file. It calls ferrosintesis_samples_orchestral::FILE_COUNT and get() with a sample filename, then checks the first four bytes for the FLAC magic. ```rust assert_eq!(ferrosintesis_samples_orchestral::FILE_COUNT, 158); let flac = ferrosintesis_samples_orchestral::get("trumpet_C3_f.flac").unwrap(); assert_eq!(&flac[..4], b"fLaC"); ``` -------------------------------- ### Build track with build.py (--check, --verify) Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/fable5/The Causeway/COMPOSER-NOTES.md Workflow commands for building a track. Use --check for fast in-memory oracle checks, plain invocation writes midi/, and --verify runs file-backed plus all oracles. Never run plain `python3 build.py` because other modules may not exist. ```bash cd "albums/fable5/The Causeway" python3 build.py --track N --check # in-memory oracles (fast loop) python3 build.py --track N # writes midi/ python3 build.py --track N --verify # file-backed + all oracles ``` -------------------------------- ### Verify sample count and retrieve FLAC with ferrosintesis_samples_core Source: https://github.com/0x4d44/ferrosintesis/blob/main/crates/ferrosintesis-samples-core/README.md Verifies the embedded sample count and retrieves a FLAC sample by name, checking the file header. The get function returns an Option, unwrapped here; the assertion confirms the first four bytes are the FLAC magic. ```rust assert_eq!(ferrosintesis_samples_core::FILE_COUNT, 69); let flac = ferrosintesis_samples_core::get("flute_A4.flac").unwrap(); assert_eq!(&flac[..4], b"fLaC"); ``` -------------------------------- ### Build and verify commands Source: https://github.com/0x4d44/ferrosintesis/blob/main/README.md Commands to build the synth, render the catalog, regenerate/verify album MIDI, and run tests. Requires a Rust toolchain and `ropusenc` on PATH for rendering; Python is only needed for album composition. ```bash # Build the synth and render every album to listening/*.opus (from the repo root): cargo run --release -p render-catalog # everything cargo run --release -p render-catalog -- --album "Sub Rosa" # just one album cargo run --release -p render-catalog -- --jobs 4 # limit parallelism # Regenerate/verify one album's MIDI (run inside that album's own directory): python3 build.py # rebuild the .mid + manifest python3 build.py --verify # re-parse the written MIDI and run every oracle # Build and test the synth on its own: cargo build --release -p ferrosintesis-cli cargo test # numeric audio oracles — this machine has no ears ``` -------------------------------- ### Run slap tests (default features) Source: https://github.com/0x4d44/ferrosintesis/blob/main/bugs/MM-BUG-KILN-00016.md Run the slap test suite with default features. Passed with 6 tests. ```bash cargo test -p ferrosintesis voices::tests::slap -- --nocapture ``` -------------------------------- ### prepare.py::extract_loop objective (value+slope) Source: https://github.com/0x4d44/ferrosintesis/blob/main/wrk_journals/2026.07.20 - JRN - bagpipe held-note loop click.md The original loop-search objective from prepare.py::extract_loop. It compares only two scalars at a single sample pair, with the start fixed and only the endpoint moved over +/-2 periods. This degenerate objective ranks non-integer loop lengths better on every file, causing the periodic click. ```python val = abs(x[i] - x[j]) # i = fixed SFZ loop point slope = abs((x[i+1] - x[i]) - (x[j] - x[j-1])) # j = i + length return val + slope ``` -------------------------------- ### Compute GM7 body-median deviation with derive_trims.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/bugs/MM-BUG-KILN-00043.md Compute the body-median deviation for program 7 using derive_trims.py's own primitives. The printed values match the reported ferro -18.30, SC-55 -4.95, and S-YXG50 -4.79 dB. Replace dt.prog_body with a median of dt.note_peak to get the peak-based values -0.15 / -3.24 / +0.48. ```python import statistics, derive_trims as dt data, _ = dt.load(path) bodies = {p: dt.prog_body(data[p], sorted(data[p])) for p in data} med = statistics.median([b for b in bodies.values() if b is not None]) print(bodies[7] - med) # ferro -18.30 | sc55 -4.95 | yxg -4.79 ``` -------------------------------- ### Oracle helper functions for MIDI analysis Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/fable5/Slipstream/COMPOSER-NOTES.md A set of Python functions for extracting note onsets, note spans, CC lanes, phrase starts, and bar sums from a score object. These are proven helpers from t16 and are meant to be copied into your module. The functions rely on an `en.PPQ` constant and assume the score events structure. ```python _CONSONANT = {0, 3, 4, 5, 7, 8, 9} _PPQ = en.PPQ def _tick(beat): return max(0, int(round(beat * _PPQ))) def _note_ons(sc, ch): out = [] for tick, _prio, data in sc.events.get(ch, []): if (data[0] & 0xF0) == 0x90 and data[2] > 0: out.append((tick, data[1], data[2])) return sorted(out) def _note_spans(sc, ch): pending, out = {}, [] for tick, _prio, data in sorted(sc.events.get(ch, []), key=lambda e: (e[0], e[1])): s = data[0] & 0xF0 if s == 0x90 and data[2] > 0: pending.setdefault(data[1], []).append(tick) elif s == 0x80 or (s == 0x90 and data[2] == 0): q = pending.get(data[1]) if q: out.append((q.pop(0), tick, data[1])) return sorted(out) def _cc_lane(sc, ch, num): return sorted((t, d[2]) for t, _p, d in sc.events.get(ch, []) if (d[0] & 0xF0) == 0xB0 and d[1] == num) def _phrases(ons, gap_ticks=_PPQ): starts, last = [], None for tick, _p, _v in ons: if last is None or tick - last > gap_ticks: starts.append(tick) last = tick return starts def _bar_sums(sc): out = {} for ch in sc.events: for tick, p, v in _note_ons(sc, ch): out[tick // (4 * _PPQ)] = out.get(tick // (4 * _PPQ), 0.0) + v return out def _mean_barsum(sums, lo, hi): bars = range(int(lo // 4), int(hi // 4)) return sum(sums.get(b, 0.0) for b in bars) / max(1, len(bars)) def _sounding(sc, ch, tick, eps=24): return [p for on, off, p in _note_spans(sc, ch) if on <= tick - eps and off >= tick + eps] ``` -------------------------------- ### Render and analyze from repository root (PowerShell) Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/gpt5-6/The Architecture of Air/README.md Run from the repository root after building ferrosintesis. Renders the full mix and an organ-only solo, then analyzes both WAV files. ```powershell target\release\ferrosintesis.exe "albums\gpt5-6\The Architecture of Air\midi\01 - The Architecture of Air.mid" -o "target\organ-showcase\full.wav" target\release\ferrosintesis.exe "albums\gpt5-6\The Architecture of Air\midi\01 - The Architecture of Air.mid" --solo 0 -o "target\organ-showcase\organ.wav" python "albums\gpt5-6\The Architecture of Air\analyze.py" "target\organ-showcase\full.wav" "target\organ-showcase\organ.wav" ``` -------------------------------- ### Purge opus from history: git filter-repo --path-glob '*.opus' --invert-paths Source: https://github.com/0x4d44/ferrosintesis/blob/main/wrk_journals/2026.07.13 - JRN - purge committed opus add build.py.md Runbook command to purge all *.opus blobs from git history. Requires a mirror clone and is followed by verify, push --force --mirror, and re-sync of every clone. git-filter-repo is installed as a Python module here, not a git subcommand. ```bash git filter-repo --path-glob '*.opus' --invert-paths ``` -------------------------------- ### Render MIDI to WAV with ferrosintesis-cli Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/fable5/Hollow Hill/README.md Builds the ferrosintesis CLI and renders both MIDI parts to WAV files in target/renders/. The WAVs are git-ignored and reproducible. ```powershell cargo build --release -p ferrosintesis-cli New-Item -ItemType Directory -Force target\renders | Out-Null .\target\release\ferrosintesis.exe "albums\fable5\Hollow Hill\midi\01 - Hollow Hill, Part One.mid" -o "target\renders\Hollow Hill, Part One.wav" .\target\release\ferrosintesis.exe "albums\fable5\Hollow Hill\midi\02 - Hollow Hill, Part Two.mid" -o "target\renders\Hollow Hill, Part Two.wav" ``` -------------------------------- ### Composition engine: python3 build.py and --verify Source: https://github.com/0x4d44/ferrosintesis/blob/main/CLAUDE.md Regenerate an album's MIDI and manifest, then verify the build in memory. Run bare python3 build.py first, then --verify; --verify does not write the .mid. Use python3, not python, on macOS and Debian/WSL hosts. ```bash python3 build.py # regenerate the .mid (+ album_manifest.json) python3 build.py --verify # rebuild in memory, re-parse the written MIDI, run the oracle table ``` -------------------------------- ### Render and analyze audio with ferrosintesis-cli Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/fable5/Big Weather/README.md Builds the ferrosintesis CLI, renders all MIDI files to WAV audio, and runs the audio oracle table. analyze.py fails (not skips) on stale renders where a WAV is older than its MIDI, then checks clicks, mono compatibility (<= 2 dB loss), and per-track audio oracles such as chorus lift, drop re-entry, drum-solo stereo spread, and feature audibility. audio/ and *.wav are gitignored. ```bash cargo build --release -p ferrosintesis-cli # from the repo root bash render_all.sh # midi/*.mid -> audio/*.wav python3 analyze.py # audio oracle table ``` -------------------------------- ### Run build.py with --check, --verify, or plain Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/fable5/Slipstream/COMPOSER-NOTES.md Use `--check` for the fast in-memory oracle loop, plain for writing the MIDI file, and `--verify` for file-backed verification with all oracles. Never run plain `python3 build.py` without a track; other modules may not exist. A green result means the nine generic checks, material, and every oracle pass. ```bash cd "" python3 build.py --track N --check # in-memory oracles (fast loop) python3 build.py --track N # writes midi/ python3 build.py --track N --verify # file-backed + all oracles ``` -------------------------------- ### Regenerate and verify the album with build.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/gpt5-5/Hours After Rain/README.md Commands to regenerate the album, verify it, and run a single track's entry point. Run from the project root. ```powershell python3 build.py ``` ```powershell python3 build.py --verify ``` ```powershell python3 tracks/07_a_quiet_arithmetic_of_light.py ``` -------------------------------- ### Regenerate steinwayb samples with prepare.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/crates/ferrosintesis-samples-vcsl-steinway/PROVENANCE.md Regenerates the steinwayb family samples. Downloads the VCSL Steinway B files once (cached under the system temp dir), then bakes. Requires ffmpeg 8.1.1 on PATH for the pinned FLAC encoder. ```bash python3 tools/ferrosintesis-samples/prepare.py --only=steinwayb ``` -------------------------------- ### Render and analyze audio with ferrosintesis-cli Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/fable5/The Remaining/README.md Render the album to WAV files and run audio oracles on the rendered signal. Requires the ferrosintesis synth (v0.21+) and the repo's render_all.sh script; audio/ and *.wav are disposable intermediates. ```bash cargo build --release -p ferrosintesis-cli # from the repo root bash render_all.sh # all 5 tracks -> audio/*.wav (parallel) python3 analyze.py # generic + per-track audio oracles python3 analyze.py --track N # one track ``` -------------------------------- ### Verify generated MIDI files with python3 build.py --verify Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/gpt5-3-spark/ALBUM.md Run this command to verify the generated MIDI files after building. ```powershell python3 build.py --verify ``` -------------------------------- ### Build and verify with python3 build.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/fable5/The Burning Meridian/README.md Rebuilds all three tracks plus manifest, or verifies material and 12 structural oracles per track. ```powershell python3 build.py # rebuild all three + manifest python3 build.py --verify # material + 12 structural oracles / track ``` -------------------------------- ### Rebuild and verify commands Source: https://github.com/0x4d44/ferrosintesis/blob/main/demos/ferrosintesis_reference/README.md Commands to rebuild the project, verify structural integrity, and run audio oracles. The verify step rebuilds in memory and compares to disk; analyze requires pre-rendered WAV files. ```bash python build.py # write midi/*.mid, lyrics/*.txt, album_manifest.json python build.py --verify # rebuild in memory, compare to disk, run structural oracles python analyze.py # audio oracles: every slot audible, no voice masks the next # (needs build/wav/*.wav - render the MIDI first) ``` -------------------------------- ### Run test: strings_choir_cc1_vibrato_and_cc68_legato_are_opt_in Source: https://github.com/0x4d44/ferrosintesis/blob/main/reqs/MM-REQ-KILN-00009.md Command to run the test that verifies the opt-in behavior for CC1 vibrato and CC68 legato on strings and choir voices. ```shell $null | cargo test strings_choir_cc1_vibrato_and_cc68_legato_are_opt_in --manifest-path crates/ferrosintesis/Cargo.toml ``` -------------------------------- ### Run render-catalog before listening sessions Source: https://github.com/0x4d44/ferrosintesis/blob/main/wrk_docs/2026.07.22 - DAILY - KILN-Windows - Repo state report.md Run before any listening session to regenerate on-disk renders, as they are in at least three synth states and cross-album A/B is confounded. Also discharges the missing catalog-wide check on the 1e-34 binary. ```bash cargo run --release -p render-catalog ``` -------------------------------- ### Render listening library with cargo run -p render-catalog Source: https://github.com/0x4d44/ferrosintesis/blob/main/listening/README.md Builds the listening library from the repo root. The first command renders every album; the second renders only the album named "Sub Rosa". Requires a Rust toolchain and `ropusenc` on PATH. ```powershell cargo run --release -p render-catalog # every album cargo run --release -p render-catalog -- --album "Sub Rosa" # just one album ``` -------------------------------- ### Gates: python test_prepare.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/bugs/MM-BUG-KILN-00116.md Run the Python test preparation script. ```bash python tools/ferrosintesis-samples/test_prepare.py ``` -------------------------------- ### Rebuild and verify with build.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/gpt5-6/Bright Matter/README.md Commands to rebuild the album and verify deterministic output. The build uses only the Python standard library and fixed seeds, performs an independent second build for every track, and refuses to continue unless the MIDI is byte-identical. ```bash python3 build.py ``` ```bash python3 build.py --verify ``` ```bash python3 build.py --verify --track 5 ``` -------------------------------- ### Run slap tests (no default features) Source: https://github.com/0x4d44/ferrosintesis/blob/main/bugs/MM-BUG-KILN-00016.md Run the slap test suite without default features. Passed with 6 tests. ```bash cargo test -p ferrosintesis --no-default-features voices::tests::slap -- --nocapture ``` -------------------------------- ### Regenerate drumkit samples with prepare_drumkit.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/crates/ferrosintesis-samples-drumkit/PROVENANCE.md Regenerates the drumkit sample bank. Validates and publishes the exact FLAC inventory, then refreshes both crates' embedded Rust tables. Requires ffmpeg on PATH for FLAC decoding; downloads are cached under the system temp directory. ```powershell python3 tools/ferrosintesis-samples/prepare_drumkit.py ``` -------------------------------- ### Rebuild and verify with build.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/fable5/Big Weather/README.md Rebuilds the album's MIDI files and manifest. Use --track N to target a single track, --verify to run the structural oracle table, and --check for an in-memory-only run safe while composing. Seeds are fixed per track, so rebuilds are byte-identical and --verify reasons about the same Scores that produced the committed files. ```bash python3 build.py # rebuild all 10 MIDIs + manifest python3 build.py --track N # rebuild one track python3 build.py --verify # full structural oracle table python3 build.py --track N --verify # one track (the composer's loop) python3 build.py --track N --check # in-memory only, safe while composing ``` -------------------------------- ### Regenerate sax sample bank with prepare.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/crates/ferrosintesis-samples-sax/PROVENANCE.md Regenerates the sax sample bank. The first command processes only the sax bank for faster iteration; the second processes the entire bank including sax. Requires ffmpeg on PATH; FLACs are fetched once from the pinned MTG revision and cached under the system temp dir. ```powershell python3 tools/ferrosintesis-samples/prepare.py --sax-only # sax bank only (fast) python3 tools/ferrosintesis-samples/prepare.py # whole bank incl. sax ``` -------------------------------- ### Build and verify with python3 build.py Source: https://github.com/0x4d44/ferrosintesis/blob/main/albums/fable5/Heliopause/README.md Rebuilds both parts and the manifest, or verifies the material and 12 structural oracles per part. The --verify flag checks the machine-verified DNA (inversion, chord-tone grounds, triple counterpoint, sequencer/bass construction). ```powershell python3 build.py # rebuild both parts + manifest python3 build.py --verify # material + 12 structural oracles / part ``` -------------------------------- ### render-catalog: render albums with cargo run Source: https://github.com/0x4d44/ferrosintesis/blob/main/CLAUDE.md Render audio for albums from the repo root using the render-catalog Rust binary. It renders MIDI to loudness-normalized WAV in-process and shells out to ropusenc for encoding and tagging. Requires a Rust toolchain and ropusenc on PATH. ```bash cargo run --release -p render-catalog # render every album cargo run --release -p render-catalog -- --album "Winter Guests" # render one album cargo run --release -p render-catalog -- --jobs 4 # limit parallelism cargo run --release -p render-catalog -- --only-list paths.txt # surgical refresh ``` -------------------------------- ### Reproduce GM7 clavinet measurement with raw_dump, mdmidiemu, and calmeter Source: https://github.com/0x4d44/ferrosintesis/blob/main/bugs/MM-BUG-KILN-00043.md Build the required tools, generate the probe MIDI, render it with ferro and both reference synths, then measure each WAV with calmeter. The mdmidiemu commands use placeholder ROMs and DLL paths; the last command is run once per WAV with the appropriate label. ```bash cargo build --release -p ferrosintesis-cli --example raw_dump --example calmeter python tools/instrument-balance/mkprobe.py chunk0 ./target/release/examples/raw_dump.exe _cal/probe_chunk0.mid _cal/ferro_chunk0.f32.wav /c/apps/mdmidiemu.exe _cal/probe_chunk0.mid --wav _cal/sc55_chunk0.wav --synth sc55 --roms /c/apps/mdmidiemu.exe _cal/probe_chunk0.mid --wav _cal/yxg_chunk0.wav --synth syxg50 \ --dll /d/language/mdsc55/mdmu80-syxg50-helper/assets/syxg50.dll ./target/release/examples/calmeter.exe _cal/plan_chunk0.tsv