# Recorded trim/context controls — 2026-11-10

This package tests an existing monophonic detector with a real recorded guitar performance. It does not offer polyphonic capability or a general accuracy rate. A computational PASS establishes only the declared parse, identity or arithmetic check; it does not establish a general transcription accuracy rate.

Source and licensing: ATTRIBUTION.md and reference.json identify GuitarSet1.1.0, original microphone performance, full-source and annotation hashes, licensing, exact source crop and inherited partly automated note labels. `recorded-context-source.wav` is the real12.12–16.86second crop; source-check.py independently confirms its PCM against the published full original and rederives the7crop-crossing phrase labels. No synthetic guitar or replacement performance was generated. The source-check pass confirms origin and label extraction, not annotation correctness by ear.

## Controlled inputs

The context is encoded once as192kbps MP3, decoded once to signed16-bit mono44100Hz PCM, then cropped and padded as WAV diagnostics. The target13.12–15.86second phrase always contains the same120834PCM samples; retainedPcmSha256 and independent wave-file extraction check this identity. The six files are context4.74seconds, trim2.74seconds, trim with20480leading zero samples (ten512-sample hops after4:1downsampling), trim with22050leading zeros (0.5seconds), trim with22050trailing zeros, and trim with22050zeros on both ends. Extra context is real audio; silence pads are exact zeros. The context/trim control therefore changes surrounding audio and boundary exposure; the padding controls change input placement/analysis coverage. These are not separate MP3 encoder-quality comparisons.

All cases use mode2 Balanced. detector-snapshot.js contains unchanged production downsample/detectNotes/groupFrames/MIDI writer code, invoked by convert.mjs with UI callbacks stubbed. No production algorithm or deployed control is changed. No actual browser AudioContext decoder, file picker, listening, DAW import, competing service, transcription quality ranking or acoustic cause diagnosis was tested in this package. Earlier guitar lag conclusions remain sealed and are not reopened.

## Inspect results separately

check.py independently parses the actual MIDI using midi_reader.py and checks its event fields against raw detector output with3ms bounds for stored timing. It retains whole-file events, intersects them with the declared common2.74second region, and subtracts the known phrase offset. CSV and SVG show reference labels and parsed MIDI in that shared region; the SVG is a generated plot, not a DAW or browser screenshot. compare.py recalculates numeric deltas, equality of the retained PCM, exact first-two-event identity in the tail test, and the actual writer's start-tick rounding for the hop-aligned translation control. Raw floating point equality uses1e-12seconds; these negligible residues are distinguished from actual MIDI tick differences.

Numbers in prose are rounded for display; full precision is in independent-results.json and comparisons.json. The third full context event extends beyond the comparison region, so its full duration is reported separately from retained overlap. No event count, equal pitch sequence, note label, byte hash or changed velocity by itself establishes musical correctness. The same reference labels are used throughout; no threshold or alignment was refitted to improve predictions.

## Reproduce in a fresh directory

Save this package's generator, runner, checker, comparison scripts, midi_reader.py, detector-snapshot.js, reference.json and recorded-context-source.wav in one new directory. Use Python3standard library and Node22+; FFmpeg/libmp3lame must be available. The exact encoder executable hash is inputs.json.encoderSha256; bit-exact reproduction is limited to this build, not promised for another codec build or decoder. No npm dependency is needed for numerical reproduction.

```text
python generate.py --ffmpeg ffmpeg
node convert.mjs
python check.py
python compare.py
python reproduce.py --ffmpeg ffmpeg --out reproduction-fresh
```

The first four commands recreate inputs and measured outputs. The last creates a new directory, repeats the pipeline and checks every declared deterministic artifact by SHA256. It refuses an existing output directory. Source verification is separately reproducible after downloading the exact full original filenames linked in ATTRIBUTION.md:

```text
python source-check.py --source 00_BN1-129-Eb_solo_mic.wav --annotation 00_BN1-129-Eb_solo.jams
```

The package contains observed results, not a manual instruction to add padding to every source. Compare the same interval, inspect pitch/start/ending/velocity separately, and keep the original context as a rollback reference. The article's complete sentence denominator and per-sentence originality decisions are separate from numerical correctness; see sentence-audit.json, claim-ledger.csv and research-review.json for the dated editorial scope.
