re: the UI cues decode -- 0.53 s, 0.34 s and 1.02 s of real audio
Finishing the step I left open last iteration rather than starting something new. Offsets and packet counts were in hand; what was missing was proof they are actually waves. slb_extract_wave.py wraps a (bank, offset, packets, channels, rate) slice in a synthesized XMA1 RIFF, following the layout the Rust decoder already uses. The three located cues decode to 0.533 s, 0.344 s and 1.016 s of mono 48 kHz audio, audible from sample 0, each with the percussive attack-and-decay envelope of a UI blip. Bitrates come out at 12-15 kB/s, about half the stereo BGM rate, which is what mono should be. The control matters more than the results. The SAME wrapper applied to BGM_001's first wave decodes to 173.808875 s -- identical to the duration that bank's own on-disc RIFF header produced back when Q10 was answered. So the header I synthesized is not approximately right, it reproduces a known-good decode exactly, and the cue durations are trustworthy for the same reason. I did not commit the decoded audio. Three commands regenerate it from the disc, and the corpus's job is measurements and tooling rather than extracted game assets. The offsets, the packet counts and the tool are the deliverable.
This commit is contained in:
@@ -17,3 +17,15 @@ Simultaneously at the main menu, two STEREO 48 kHz streams were decoding:
|
||||
1893 packets / 3 876 864 B and 1919 packets / 3 930 112 B. See
|
||||
structures/bgm-two-stems.md -- this is the runtime observation that the two
|
||||
stems of a music bank play at the same time.
|
||||
|
||||
DECODED 2026-08-28 with tools/re-capture/slb_extract_wave.py + ffmpeg's xma1:
|
||||
|
||||
event offset packets decoded rms peak envelope shape
|
||||
---------------- -------- ------- --------- ----- ----- ------------------------
|
||||
d-pad move 0x1ec0 4 0.533 s 2085 29813 sharp attack, monotonic decay
|
||||
B / back 0x0ec0 2 0.344 s 2985 16973 attack, peak in frame 2
|
||||
(pre-input cue) 0x5d6c0 6 1.016 s 4327 32767 peaks in frame 3, long decay
|
||||
|
||||
CONTROL: the same synthesized RIFF wrapper applied to BGM_001.slb's first wave
|
||||
(offset 14336, stereo) decodes to 173.808875 s -- identical to the duration
|
||||
obtained from that bank's own on-disc RIFF header. The wrapper is correct.
|
||||
|
||||
@@ -182,5 +182,37 @@ So the index cannot be derived by counting; it has to be observed per cue.
|
||||
* 🟡 **still a name match** — that the cursor's wave *is the cue called*
|
||||
`SE_UI_CURSOR`. The event→wave binding is measured; the event→*name* binding is
|
||||
still read off the authors' identifiers.
|
||||
* ❔ **not done** — decoding a located slice to PCM. The offsets and packet counts
|
||||
are here; building the XMA1 `RIFF` around a mono slice was not attempted.
|
||||
* ✅ **decoded to PCM** — see below. The cues play.
|
||||
|
||||
### ✅ The waves decode — artifact, not assertion
|
||||
|
||||
[`tools/re-capture/slb_extract_wave.py`](../../tools/re-capture/slb_extract_wave.py)
|
||||
wraps a `(bank, offset, packet count, channels, rate)` slice in a synthesized
|
||||
XMA1 `RIFF` for ffmpeg's `xma1` decoder:
|
||||
|
||||
```
|
||||
slb_extract_wave.py Static.slb 0x1ec0 4 # -> Static_0x1ec0.riff -> 0.533 s
|
||||
```
|
||||
|
||||
| event | offset | packets | decodes to | RMS | peak | envelope |
|
||||
|---|---|---|---|---|---|---|
|
||||
| d-pad move | `0x1ec0` | 4 | **0.533 s** | 2 085 | 29 813 | sharp attack, monotonic decay |
|
||||
| Ⓑ back | `0x0ec0` | 2 | **0.344 s** | 2 985 | 16 973 | attack, peak in frame 2 |
|
||||
| pre-input cue | `0x5d6c0` | 6 | **1.016 s** | 4 327 | 32 767 | peaks in frame 3, long decay |
|
||||
|
||||
All three are mono 48 kHz, audible from sample 0, and have the percussive
|
||||
attack-and-decay shape of UI blips — not silence, not noise.
|
||||
|
||||
**Control, run first:** the *same* synthesized wrapper applied to `BGM_001.slb`'s
|
||||
first wave decodes to **173.808875 s** — identical to the duration obtained from
|
||||
that bank's own on-disc `RIFF` header in
|
||||
[`structures/bgm-two-stems.md`](structures/bgm-two-stems.md). The wrapper is not
|
||||
approximately right; it reproduces a known-good decode exactly.
|
||||
|
||||
The bitrates are consistent too: 8 192 B / 0.533 s ≈ 15.4 kB/s, 4 096 / 0.344 ≈
|
||||
11.9 kB/s, 12 288 / 1.016 ≈ 12.1 kB/s — mono at roughly half the stereo BGM rate.
|
||||
|
||||
🟡 **The decoded audio is deliberately not committed.** Three commands regenerate
|
||||
it from the disc, and the corpus keeps measurements and tooling rather than
|
||||
extracted game audio. The offsets, packet counts and this tool are the
|
||||
deliverable.
|
||||
|
||||
Reference in New Issue
Block a user