Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Notable changes to `samplerdisc`. Format-level findings live in [docs/formats/](

### Fixed

- **An AKAI sample displaced by blocks lost *inside* a partition now converts instead of being refused as somebody else's audio.** An AKAI rip can drop a run of 32 KB container blocks from the middle of a partition rather than from the blocks a partition header sits on. No header goes missing, so the disc looks complete by the partition table's `declared == present` arithmetic — while a tail run of one volume's samples has slid forward, and its directory entry now points at the audio that took its place. D19's payload check refused these and named them (**104** samples across nine discs, e.g. all but one of `Best Service - Alpha Dance II`'s `AC.DRUMLOOPS`); they are now recovered. When a sample's payload is not the file its entry placed, `samplerdisc` searches **backward from the declared position, in the container's own block size, for a header restating that entry's own name and word count** (`size == words×2 + header_len`), stopping at the start of the file's partition, and reads the file from there. **102 of the 104 convert** — `AC.DRUMLOOPS` goes from 1 of 22 written to 22 of 22 — on `AKAI.S3000.Sound.Library.1` and `.5`, `Best Service - Alpha Dance I` and `II`, `AMG - Kickin' Lunatic Beats 2 CD1` and `Global Trance Mission 2`, and `Audio Factory - Classical Wild Takes`. **If you extracted any of those, extract them again.** The two that stay refused are named, not written: `AMG - Loop Soup`'s one record whose start block lands mid-sample (no header earlier to find), and `AKAI.S3000.Sound.Library.3`'s `20 CHINA2-R`, whose only match is a *different* volume's same-named, same-sized file in the previous partition — its bytes, not this one's, so the partition floor refuses it. Displaced programs are left as-is: a program's payload carries no name to confirm a relocation by. ([docs/formats/akai-fs.md](docs/formats/akai-fs.md), [ADR-0045](docs/adr/0045-a-displaced-sample-is-recovered-by-its-own-name-and-word-count.md), [ADR-0027](docs/adr/0027-a-payload-must-be-the-file-its-entry-placed.md), [#35](https://github.com/bmxcode/samplerdisc/issues/35))

**The recovery is not blind, and the three measurements #35 asked for are what make it safe.** The displacement is always a whole number of container blocks. The allocation-map chain does *not* notice the gap — it lives in the intact header and describes the disk the rip was made from, so every displaced file's chain still matches its declared size, which means there is no cheaper detector than the payload check. And the name-plus-word-count anchor — D19's name test, which had zero positives on real data until now — matches **exactly one** position per recovered file across the whole collection and never coincides with another intact file's bytes. The suite pins the recovered count per disc, checks each recovered WAV's PCM against the disc's own bytes at the displaced offset, and holds the collection-wide invariant that no sample is written whose payload header names a different file — now over 102 real recoveries rather than trivially.

- **The E-mu `.EBL` reader no longer misreads banks other than Vintage Pro.** D33 shipped the mono reader verified byte-for-byte against Vintage Pro, but three of its constants were that one bank's values rather than the format's, and a second bank — E-mu Classic Series Vol 13 Dance 2000 — exposed all three. The channel count was taken from the two spans' equality, which *inverts* on Dance 2000 (its stereo files have equal spans, its mono files unequal), so the shipped rule would have refused every mono file and passed every stereo file through the mono copy path as noise — the ADR-0026 failure the project guards against. The audio offset assumed an 8-byte pad (`block + 184`); Dance 2000's is 4 (`block + 180`). And the mono length `V4 − V3 + 2` yields 0 there. The reader now reads what generalises: the **channel byte of the `V12` field** (`(V12 >> 16) & 0xFF` — `0x03` stereo, else mono; a `0x02` value is a mono sub-type, 38 files on Vintage Pro, that the naïve reading would have misclassified), the audio **anchored at `V2`** (`block + V2 − 4`, so the pad is read not assumed), and the **length taken to the loop trailer or the end of the file** (which the per-bank field formulas cannot, the length living in a different field on each bank). Verified against two banks' publisher renders: Vintage Pro stays byte-identical (1 007 / 1 007, no regression) and Dance 2000's mono half now decodes PCM byte-for-byte (819 uniquely-named files, the one exception a render hand-resampled 44 001 → 44 100). Stereo is still refused, now for the right reason — the record's channel field — with the interleave deferred to [#57](https://github.com/bmxcode/samplerdisc/issues/57). This is a latent correctness fix in the shipped reader, independent of stereo. ([docs/formats/emu-ebl.md](docs/formats/emu-ebl.md), [#73](https://github.com/bmxcode/samplerdisc/issues/73))

- **A fragmented E-mu `FORM/E4B0` bank no longer loses the samples past its first fragment.** These banks were read straight from the image, contiguously, which is right for every bank on nine discs and every `FORM` bank but one — `Miroslav Vitous … String Ensembles`'s `CES 1`, whose data is three separate cluster runs. The contiguous read stopped at the first break and listed **12** of the bank's **20** samples; the other eight (`CES E_2 2` … `STR:VcsD_5 2`, the upper half of a velocity layer) sat stranded in the tail. `samplerdisc` now reads such a bank along the real **block-2 FAT** — the allocation table every EMU3 disc carries, whose cluster chains say where a file's bytes actually are — so a fragmented bank is gathered from the right clusters and a sample whose audio straddles a fragment boundary is read whole. `Vitous` goes **852 → 860 samples**; the eight are mono one-shots, so its loop and stereo counts are unchanged. **If you extracted this disc, extract it again for the eight.** No other disc changes — every other bank in the collection is contiguous and reads byte-for-byte as before. The FAT also now corroborates every bank/sample address the reader locates, an independent check the per-disc allocation fit never had. ([docs/formats/emu3.md](docs/formats/emu3.md), [ADR-0037](docs/adr/0037-a-fragmented-form-bank-is-read-along-the-fat-chain.md), [#67](https://github.com/bmxcode/samplerdisc/issues/67))
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ All of that vanishes into a working parser. Six months on, the code says *what*
| D35 | Loose E-mu `.ebl` banks (Proteus 1/2/3, shipped as files in the clear) convert through a dedicated `extract-banks` source that runs the verified decoder — a directory of sample files is a source, not a container ([ADR-0042](adr/0042-loose-sample-banks-are-a-source-not-a-container.md)) | done |
| D36 | E-IV disc provenance read from the sample-free `Credits`/`E-mu Systems 96` text banks' `E4P1` name field — the credit line alone, never the preset — into a per-disc `Credits.txt` sidecar under `--metadata`; eight banks, 89 lines across five discs ([ADR-0043](adr/0043-eiv-credits-are-metadata-read-from-the-e4p1-name-field.md)) | done |
| D37 | `eiv-analogia`'s residual E-IV loops given the disc's own confirmation by a period / pre-start window — four of its six splice at their own period as a clear local maximum where the forward oracle had no power; the two that do not (`Conscience Call`, `Got Scratch?`) are named, not hidden. A measurement wired into the suite; no emission, loop count or digest moved ([ADR-0044](adr/0044-the-eiv-residual-loop-is-confirmed-by-its-period.md)) | done |
| D38 | An AKAI sample displaced by a run of blocks lost *inside* a partition the table calls complete is recovered — searched for backward in the container's unit for a header restating the entry's own name and word count, floored at the partition. 102 of the 104 refused across nine discs are written; the two that are not (`Loop Soup`'s mid-sample record, `Library.3`'s cross-partition namesake) are named. The chain cannot see the gap, so the payload check is the sole detector; ADR-0027's name test is the anchor, exercised on real data at last ([ADR-0045](adr/0045-a-displaced-sample-is-recovered-by-its-own-name-and-word-count.md)) | done |

Across the local collection, by listing: 96 of 104 images claimed, 4 270 volumes, 161 213 files, 126 361 of them samples. The AKAI discs are 45 of those images and 86 487 of those files, read across 318 partitions — 279 where the disk's table puts them and 39 displaced by blocks the rip lost. Before D15 they were 14 783 files, because only the partition at the origin was read.

## What is not done

- **70 declared AKAI partitions are still unread, and 60 of them are not absent.** A header is there and it is inside a partition already being read — 31 would overlap one, 29 land exactly on one. `Best Service - Alpha Dance I` is the whole disc's worth of that: its one displaced partition sits four blocks inside partition 4, so the disc recovers nothing at all. Reading them would mean putting one run of bytes under two partitions' bookkeeping, and this project has no field that says how much shorter than its declared size a partition preceding a gap really is ([ADR-0028](adr/0028-a-displaced-partition-is-anchored-quantised-and-floored.md), [#25](https://github.com/bmxcode/samplerdisc/issues/25)). The other 10 have no header at any position the search may look at.
- **104 AKAI files are displaced inside a partition the table calls complete.** `Best Service - Alpha Dance II` declares six partitions and holds all six, and 21 of `AC.DRUMLOOPS`'s 22 samples are somebody else's audio; `AKAI.S3000.Sound.Library.5`'s recovered partitions lose 23 the same way. The rip dropped a run of blocks *inside* a partition rather than the blocks a header sat on, so nothing in the partition table registers a gap. **The mechanism is now measured rather than supposed: 103 of the 104 are sitting intact, carrying their entry's own name, a whole number of container blocks earlier.** They are still refused and named rather than written ([ADR-0027](adr/0027-a-payload-must-be-the-file-its-entry-placed.md)); recovering them would mean locating a volume's blocks by something other than the chain the allocation map declares, which is the search [ADR-0022](adr/0022-a-volume-is-explained-by-the-allocation-map.md) and [ADR-0023](adr/0023-partitions-come-from-the-table-the-disc-declares.md) both refused, and unlike a partition a file has no declared position to search back from ([#35](https://github.com/bmxcode/samplerdisc/issues/35), [ADR-0028](adr/0028-a-displaced-partition-is-anchored-quantised-and-floored.md)).
- **The AKAI payload name check still has no positives on real data.** It is the test that separates *"this payload is a sample"* from *"this payload is **this** sample"*, and across all 44 discs it now fires 104 times and never once without the id and valid tests having fired too. D20 was the deliverable expected to change that — a displacement landing exactly on another sample's header is the case it exists for, and recovering 15 808 more samples from displaced partitions produced none. It remains exercised only synthetically ([ADR-0027](adr/0027-a-payload-must-be-the-file-its-entry-placed.md)).
- **Two AKAI samples displaced inside a partition cannot be recovered, and are named rather than written.** D38 recovers 102 of the 104 that a run of lost blocks displaced inside a partition the table calls complete — searched for backward by the entry's own name and word count, floored at the partition ([ADR-0045](adr/0045-a-displaced-sample-is-recovered-by-its-own-name-and-word-count.md), [#35](https://github.com/bmxcode/samplerdisc/issues/35)). The two that do not are `AMG - Loop Soup`'s one directory record whose start block lands mid-sample, so no header exists earlier to find, and `AKAI.S3000.Sound.Library.3`'s `20 CHINA2-R`, whose only backward match is a same-named, same-sized file in the previous partition — its bytes, not this file's. Both are refused and named, and the second is the standing proof the partition floor is doing real work ([ADR-0027](adr/0027-a-payload-must-be-the-file-its-entry-placed.md)).
- **What wrote the stale partition headers in free space is unestablished.** `ProSamples vol.14` carries 148 byte-identical copies of one, `vol.12` 86, and `Global Trance Mission 2` three distinct ones repeated 288, 58 and 19 times, every one in a block the allocation map calls free. Filler from the mastering and a header from an earlier state of the disk both fit. It matters only as the reason a partition header may never be scanned for, and for that the reading does not need settling ([ADR-0028](adr/0028-a-displaced-partition-is-anchored-quantised-and-floored.md)).
- **What the AKAI valid byte's low bits mean is unestablished.** `0x81` on 29 samples and `0x9c` on two, against `0x80` on 56 397. The `0x80` flag is the sample-is-valid bit and the rest is unread; three combinations on two discs is not enough to read them from.

Expand Down
Loading
Loading