# WLK/MLK Audio Archive Notes

`out/audio_archive_manifest.*` is now the authoritative restoration record.

## Numbering

Active audio references use only the EXE internal zero-based id:

- WLK id `00`..`53` maps directly to `extract_wlk/00.wav`..`extract_wlk/53.wav`.
- MLK id `00`..`19` maps directly to `extract_mlk/00.mid`..`extract_mlk/19.mid`.

Do not use any separate display numbering in active docs, pages, or code.

## WLK

`PCMDATA.WLK` has 54 verified mono PCM payloads.  The 22-byte entry field after
sample rate is gain metadata, not a loop-start pointer.  Loop playback is only
the entry flags bit `0x20`.

The extractor writes raw PCM into WAV containers and does not apply gain to the
sample data.  The verified distribution is 47 8-bit entries and 7 16-bit entries.

## MLK

`MIDDATA.MLK` has 20 verified Standard MIDI Format 0 payloads, each with one
track. Browser playback should parse SMF events, then use Web Audio lookahead
scheduling. The active browser baseline is the local GM Lite synth in
`web/engine/audio/midi_bgm_player.js`; optional SF2/SF3 and Web MIDI output paths live on
`web/midi_bgm_test.html`.

`out/midi_target_environment_review.json` records the current target-environment
classification.  The MIDI files contain no SysEx, no Bank Select, and no
vendor/device meta hints; the EXE streams the data through WinMM MIDI stream
APIs.  Treat the original BGM as GM-compatible content routed to the
system-selected MIDI output device, not as a fixed GS/XG/MT-32/DLS/SoundFont
target.

Current browser implementation:

- `web/engine/audio/midi_bgm_player.js` provides the SMF parser, WebAudio GM Lite synth,
  scheduling, optional soundfont profile metadata, and Web MIDI integration.
- `web/midi_bgm_test.html` is the dedicated MLK playback test page.
- `web/audio_review.html` is the archive/provenance review page.
- `tools/verify_midi_bgm_test_browser.py` writes
  `out/midi_bgm_test_browser_smoke.*`.

## Removed

The old per-entry audio probe and special alternate preview are no longer part
of the restoration path.  Review pages should use raw `extract_wlk/*.wav`, raw
`extract_mlk/*.mid`, and `out/audio_archive_manifest.*`.
