D24: recover five EIII/ESI banks whose header name is a mistyped copy of the directory's - #48
Merged
Merged
Conversation
… of the directory's Five named banks across three discs (Elements of Sound 1MB, Ditto Drums, Heavy Guitars) claimed a volume, found no bank header for their directory name and read nothing. Measured: each has a real EMULATOR header at exactly the address its placement predicts, holding audio named for the bank, but the header's own +16 name is the directory name mistyped by a shifted space, a case change or one doubled/dropped character. _bank_offsets gains a recovery pass: a directory entry no header names exactly binds the header at its placement-predicted address when that header's name is within one normalised edit and no other entry claims it (ADR-0031). Nothing is placed; downstream is unchanged. Binding by address alone was rejected because ditto-drums' E3 Main Code / E3X Main Code slots predict addresses that fall on other banks' headers -- the name and unclaimed gates reject them. ditto-drums 948 -> 979 samples; elements1mb and heavy pinned for the first time. No reference disc moves. The separate duplicate-name double-listing found in passing is deferred to #47. Closes #43. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Closes #43.
What this deliverable did
Five named EIII/ESI banks across three discs claimed a volume, found no bank header for their directory name, and read nothing — each correctly carrying the ADR-0012 note
no bank header found for this bank; listed only, but named like ordinary sample banks rather than like theE3 Main CodeOS slots that share it. Issue #43 left open which of three each was: a genuinely empty slot, a header the search could not reach, or a second copy of a bank read under a name written twice.Measured against the discs (
SAMPLERDISC_TEST_DISCS), all five are the same thing: a header the search does not reach. Each has a realEMULATOR/EMULATOR THREEheader sitting at exactly the address ADR-0021's placement fit predicts, holding real audio named for the bank — but the header's own 16-byte name field at+16is a corrupted copy of the directory name:+16nameVol. 10 – Elements of Sound 1MBElectric Grand XEelectric GrandXELEC GRAND _000Vol. 16 – Ditto DrumsPERCUSSION#1 XPERCUSSION #1 XTAMB BRASSVol. 17 – Heavy GuitarsHvyGtr FX5 XHvyGtr FX5 XXGtr FX 11Vol. 17 – Heavy GuitarsMisc Gtr FX 2MbXMisc Gtr FX 2mbXGtr Feedback ShrVol. 17 – Heavy GuitarsHvGtrFdBkTxtr2MbHvGtrFdBkTxtr2MGtr FeedbackLoopEvery corruption is a shifted space, a case change, or a single doubled/dropped character — an edit of at most one once the name is lowercased and its spaces stripped.
The rule (ADR-0031)
A directory entry that no header names exactly binds the header sitting at the address its placement predicts, when all three hold: a header is there, the header's name is within one normalised edit of the entry's, and no other entry already claims it.
_bank_offsetsgains this recovery pass after its existing placement arbitration; nothing downstream changes, so a recovered bank flows through the same record walk and the ADR-0012 empty-with-note invariant is preserved.This is ADR-0021's instrument one step wider — from which of two headers wearing this exact name to the near-named header this entry points at. Nothing is placed: a bank whose predicted address holds no header binds nothing.
Why the gates are load-bearing
The rejected alternative — bind by the predicted address alone — recovers all five but fails on
ditto-drums, measured: the real OS-code slotsE3 Main CodeandE3X Main Codepredict addresses that fall on theDitto Drums XandDAVE W KIT1 Xheaders (other banks the directory names elsewhere). Address alone would hand each slot another bank's audio under the wrong name. The name gate (e3maincodeis a dozen edits fromdittodrumsx) and the unclaimed gate reject them together. Also rejected: fuzzy-matching names everywhere (reopens ADR-0015), leaving them noted (withholds 49 real samples), and rewriting the header name (invents an authority the disc does not grant).What moved
Vol. 16 – Ditto Drums: 948 → 979 samples (+31,PERCUSSION#1 X), loops and stereo unchanged.Vol. 10 – Elements of Sound 1MBandVol. 17 – Heavy Guitars: pinned intests/test_discs.pyfor the first time (102 volumes / 1 465 samples, and 68 / 870).Pins added/updated in
_EMU3,_HEAD_DIGEST(the 1MB disc shares its size with the 2MB cut),_EMU3_RUN_ENDS, and a new_EMU3_RECOVERED_BANKStable asserting each of the five by the mistyped header name, not just the count. Synthetic unit tests (ADR-0008) cover_near_name, the recovery/unclaimed/near gates in_bank_offsetsdirectly, and the end-to-end recovery via a newheader_namesfixture knob.What it deliberately does not claim
Two of these discs list a bank name twice in the directory —
Harpsichord Xon Vol. 10,HvyGtr Maj.Openon Vol. 17 — and becauselocatedis keyed by name both entries resolve to one header and double-list the same records. That is a different mechanism (it reads the same audio twice, not nothing), one arm of theheavypair points at a real but blank-named 6.3 MB header, and it needs per-entry header resolution. It is left to #47 and noted indocs/README.md; the D24 pins for those two discs include the double-count until it is fixed.Verify