Audio stream names: read the names banks store; only metadata-backed stems from the search #219

Manually merged
github merged 2 commits from gh-pr/219/head into gh-pr/219/base 2026-11-26 20:19:07 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 22:52 UTC · original
holdmysocks:claude/audio-names-4 → master · +139 −46 · 6 files · 2 commits · merged 2026-11-24 23:10 UTC

Fixes the stream names from #208 and #214, following the independent check posted on #208. Part of SIX-101.

The problem. The stream-name search kept a stem when two or more of its variations (_01, _02, ...) matched a bank's stream ids. Stream ids are only 29 bits, so one chance match of a variation makes the next ones likely to match too. On audio.rpf, shuffled made-up words gave about a third as many kept stems as the real word list. Many of the 8,585 (#208) and 17,335 (#214) names were wrong.

Stored names. 874 banks give each stream a name-tag chunk (type 0x5C). It is an embedded resource that holds the wave name as text, next to the name's full joaat. sixng audio now reads a name when two checks pass:

  • the chunk also stores the name's full joaat;
  • the low 29 bits of that joaat are the stream's own id.

This gives 409,881 of the 414,570 streams in those banks, matching the count in the independent check. The names are kept in the audio index, so the index version goes up to 3 and sixng audio --rescan is needed.

Search, for the other streams only. A stem is tried only when its own 32-bit joaat is the name of an audio metadata object. audio-meta saves those hashes to <work>/index/audio_objects_<archive>.bin. With this check, shuffled words keep 23 bank stems, against 1,236 for the real list. Result: 612 more streams.

Totals on audio.rpf:

  • 410,493 stream names, in 933 banks;
  • bank names unchanged at 1,177. The pack search from #214 holds up: shuffled words kept 0 suffixed names and 1 plain one, which was a real word the shuffle rebuilt.

sixng audio and the GUI Audio page show stored names first. README updated. The tests use synthetic bytes only.

Join output. sixng audio now lists, for each stream: its index in the bank, name_from (stored or search) and hash (the full joaat of the name), next to the bank offset and the 29-bit id. On audio.rpf: 409,881 stored, 612 search, and 1,192,630 streams with no name.

**@⁠holdmysocks** on GitHub · 2026-11-24 22:52 UTC · [original](https://github.com/holdmysocks/SixNG/pull/219) `holdmysocks:claude/audio-names-4` → `master` · +139 −46 · 6 files · 2 commits · merged 2026-11-24 23:10 UTC Fixes the stream names from #208 and #214, following the independent check posted on #208. Part of SIX-101. **The problem.** The stream-name search kept a stem when two or more of its variations (`_01`, `_02`, ...) matched a bank's stream ids. Stream ids are only 29 bits, so one chance match of a variation makes the next ones likely to match too. On audio.rpf, shuffled made-up words gave about a third as many kept stems as the real word list. Many of the 8,585 (#208) and 17,335 (#214) names were wrong. **Stored names.** 874 banks give each stream a name-tag chunk (type `0x5C`). It is an embedded resource that holds the wave name as text, next to the name's full joaat. `sixng audio` now reads a name when two checks pass: - the chunk also stores the name's full joaat; - the low 29 bits of that joaat are the stream's own id. This gives **409,881 of the 414,570 streams in those banks**, matching the count in the independent check. The names are kept in the audio index, so the index version goes up to 3 and `sixng audio --rescan` is needed. **Search, for the other streams only.** A stem is tried only when its own 32-bit joaat is the name of an audio metadata object. `audio-meta` saves those hashes to `<work>/index/audio_objects_<archive>.bin`. With this check, shuffled words keep 23 bank stems, against 1,236 for the real list. Result: **612 more streams**. **Totals on audio.rpf:** - **410,493 stream names**, in 933 banks; - bank names unchanged at 1,177. The pack search from #214 holds up: shuffled words kept 0 suffixed names and 1 plain one, which was a real word the shuffle rebuilt. `sixng audio` and the GUI Audio page show stored names first. README updated. The tests use synthetic bytes only. **Join output.** `sixng audio` now lists, for each stream: its index in the bank, `name_from` (`stored` or `search`) and `hash` (the full joaat of the name), next to the bank offset and the 29-bit id. On audio.rpf: 409,881 `stored`, 612 `search`, and 1,192,630 streams with no name.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:19:05 +00:00
github manually merged commit 46080151b2 into gh-pr/219/base 2026-11-26 20:19:07 +00:00
Author
Owner

@⁠kaoru-maki on GitHub · 2026-11-24 23:31 UTC · original · edited 2026-11-24 23:41 UTC

Thanks for merging this. We checked the Story and Minigame scope you mentioned in #217 at upstream d7e9bdc (with #219's reader), alongside the stricter #217 parser. We joined by archive, ADAT bank offset and stream index, and checked the stream ID and encoded range. We also verified the original bytes at 15 sampled ranges against the local inputs.

The embedded spelling agreed at all 227,247 tagged stream addresses: 225,281 in Story, 9 in regional Story, and 1,957 in Minigame. Both readers found every name in that set, and stream IDs were unique within each bank in these three archives. These counts cover embedded tags. The metadata-backed name search is outside this comparison.

**@⁠kaoru-maki** on GitHub · 2026-11-24 23:31 UTC · [original](https://github.com/holdmysocks/SixNG/pull/219#issuecomment-7147495458) · edited 2026-11-24 23:41 UTC Thanks for merging this. We checked the Story and Minigame scope you mentioned in #217 at upstream `d7e9bdc` (with #219's reader), alongside the stricter #217 parser. We joined by archive, ADAT bank offset and stream index, and checked the stream ID and encoded range. We also verified the original bytes at 15 sampled ranges against the local inputs. The embedded spelling agreed at all **227,247** tagged stream addresses: **225,281** in Story, **9** in regional Story, and **1,957** in Minigame. Both readers found every name in that set, and stream IDs were unique within each bank in these three archives. These counts cover embedded tags. The metadata-backed name search is outside this comparison.
This discussion has been locked. Commenting is limited to contributors.
No description provided.