re: a bank's wave 1 is not a filtered copy of wave 0 -- and my own discriminator cannot finish the job
Coherence on BGM_103, the menu's bank, with controls run first: a real linear filter of wave 0 reads 0.93-0.94 in every band, a different bank reads 0.001, and wave 0 misaligned by 1 s reads 0.004-0.057. The measurement reads 0.027 at 1-4 kHz, so the 'wave 1 is wave 0 filtered' model is refuted. The frequency structure is inverted relative to any mic-pair or reverb model: coherence rises with frequency (0.169 -> 0.827) while energy falls (71 % -> 0.2 %), and a rear pair decorrelates fastest at HF. In the midrange the two waves are 13x further apart than the two channels of one wave. But the L-R control is what limits the tool and it is recorded as such: within one wave, genuinely one performance in two channels, coherence is only 0.221-0.497. So 'same performance' does not imply high coherence here, my positive control was the wrong model of the rear-pair reading, and the 🟡 is NOT settled. The tool tests for linear filtering and neither surviving reading requires it. Also corrects MISSION's Q10 row, which still carried the refuted three-sub-wave premise and had directed work at a dead question for days. Its gate is in fact met. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wuu56cE8vJGTBtn1ppsk8v
This commit is contained in:
@@ -74,7 +74,7 @@ alongside it.
|
||||
| **Q7** | **Transitions.** What happens visually between screens — the `pteff00.prm` quads, a fade, a cut — and its timing | Described and timed against a capture |
|
||||
| **Q8** | **Menu audio.** Which BGM per screen; which cue on move / confirm / back / error. The cue table is complete; the event binding is not | Cue names bound to events, with how you established each |
|
||||
| **Q9** | **Video binding.** Which movie is the boot intro vs the new-game intro; whether playback is skippable and what ends it | Named movies plus the playback rules |
|
||||
| **Q10** | **What are a music bank's sub-waves?** `BGM_001.slb` is three sub-waves — 10 KB, 4.47 MB, 4.67 MB — and we currently **concatenate them blindly** into one 347 s track. Two near-equal halves could be intro + loop, or two variations, or two halves of one piece. A menu that loops its music needs to know which | The role of each sub-wave, established for at least the menu BGM. "Concatenate" is a decision, not a default — right now it is a default nobody chose |
|
||||
| **Q10** | ~~**What are a music bank's sub-waves?**~~ ✅ **ANSWERED — see below.** Every factual premise in the original row is refuted: a bank is **two** waves, not three (the 10 KB was the bank *header*, emitted by our own reader), and the three candidate roles it listed — intro + loop, two variations, two halves — are all dead. | ✅ **Gate met.** Role established on the menu's own bank: [`bgm-two-stems.md`](../re/structures/bgm-two-stems.md). 🟡 One sub-question survives — *which kind* of second stem — and it is 🟡 by measurement, not by neglect |
|
||||
| **S1** | ~~**Ready Room probe.**~~ **DONE 2026-08-28 — [no-go](../re/ready-room-probe.md).** It is 2D and enumerates fine, but the pak is briefing/tactical-map content, not the Ready Room menu | ✅ go/no-go written |
|
||||
|
||||
## ✅ Emulator-side questions are NOT blocked — corrected 2026-08-30
|
||||
@@ -290,6 +290,37 @@ What needs a decision is which way the divergence gets closed:
|
||||
|
||||
Recorded rather than chosen, per "do not improvise around a blocker".
|
||||
|
||||
## ✅ Q10 is answered — corrected 2026-08-30
|
||||
|
||||
The Q10 row above was written on a premise that has since been **refuted in every
|
||||
part**, and it survived as a live question for days after the refutation landed.
|
||||
Recording the correction here rather than silently editing the row:
|
||||
|
||||
* ❌ *"`BGM_001.slb` is three sub-waves (10 KB, 4.47 MB, 4.67 MB)"* — the 10 KB is
|
||||
the **bank header**. Our reader emitted it, from a modulus valid only for a
|
||||
header shorter than one XMA packet. A bank is **two** waves, **28/28** disc-wide.
|
||||
* ❌ *"we currently concatenate them blindly"* — and concatenating is **wrong**,
|
||||
now measured: the two waves are **sample-synchronous** and the running game
|
||||
decodes **both at once** (the XMA probe at the main menu saw two stereo streams
|
||||
whose byte sizes are `BGM_103`'s two declared waves, exactly).
|
||||
* ❌ *"could be intro + loop, or two variations, or two halves of one piece"* — all
|
||||
three predict unequal durations; **32 banks give equal ones**.
|
||||
* ✅ **The gate — "the role of each sub-wave, established for at least the menu
|
||||
BGM" — is met**, and on the menu's own bank: `BGM_103`, named from the
|
||||
executable, confirmed against the disc and against the running game.
|
||||
|
||||
🟡 **What is still open is narrower than the row**: *which kind* of second stem —
|
||||
the rear pair of a 4-channel mix, or a second intensity layer. Both predict
|
||||
simultaneity, so runtime observation cannot separate them, and a coherence
|
||||
discriminator run 2026-08-30 **refuted the "filtered copy" model but could not
|
||||
separate the two** — its own control showed that in this material even L vs R of
|
||||
one performance reads only 0.22–0.50, so the test's premise does not hold.
|
||||
[`../re/data/bgm-stem-coherence.txt`](../re/data/bgm-stem-coherence.txt)
|
||||
|
||||
⚠️ **This distinction does not block the port.** Both readings give the same
|
||||
instruction: play both waves, aligned at sample 0, together. It changes only how
|
||||
they would be *mixed* if the port ever does surround.
|
||||
|
||||
## Known unknowns — say so, do not fill them in
|
||||
|
||||
Some of these may turn out to be undecodable. That is a valid, useful answer, and
|
||||
|
||||
@@ -761,3 +761,31 @@ sweep phases — and the 350×396 logo ROI is **byte-identical across all of the
|
||||
(0 / 138 600 px differing, max |d| 0), reproduced in two independent sessions**,
|
||||
while 5–8 % of the whole frame moves as a contrast control. The sweep ink does
|
||||
not land on the logos. The ±1–2 residual is not sweep.
|
||||
|
||||
### Music-bank stems (2026-08-30)
|
||||
|
||||
* ~~"wave 1 is wave 0 put through a filter"~~ — ❌ **refuted** on `BGM_103` by
|
||||
magnitude-squared coherence. A real linear filter of wave 0 reads **0.93–0.94**
|
||||
in every band (positive control); the measurement reads **0.027** at 1–4 kHz.
|
||||
No linear filter does that in a band where both waves carry energy.
|
||||
[data](data/bgm-stem-coherence.txt)
|
||||
* ~~"the rear-pair reading can be tested by coherence"~~ — ❌ **refuted, and it was
|
||||
my own test's premise.** The control that matters — L vs R *within* one wave,
|
||||
genuinely one performance in two channels — reads only **0.221–0.497**, so in
|
||||
this material "same performance" does not imply high coherence. A 4-channel
|
||||
mix's rear pair is not a linear filter of its front pair, so the discriminator
|
||||
never had the power to separate the two readings. The 🟡 stands.
|
||||
|
||||
### Refutation attempt on the corpus's "two stems of ONE PERFORMANCE" — 🟡 SURVIVED, WEAKENED (2026-08-30)
|
||||
|
||||
**Target:** `structures/bgm-two-stems.md` (the `BGM_103` section is another
|
||||
agent's), which reads the two waves as two stems *of one performance*.
|
||||
|
||||
**My attempt:** if they are one performance, they should share signal structure;
|
||||
coherence should be well above the independent floor across the bands carrying
|
||||
the music.
|
||||
|
||||
**Result: the claim survives, but one of its supporting readings is dead and the
|
||||
bands carrying 96 % of the energy read 0.169 and 0.184** — far above the 0.001
|
||||
independent floor, so *not* independent, and far below a filtered copy. "One
|
||||
performance" stands; "rear pair, i.e. a filtered view of the same mix" does not.
|
||||
|
||||
71
docs/re/data/bgm-stem-coherence.txt
Normal file
71
docs/re/data/bgm-stem-coherence.txt
Normal file
@@ -0,0 +1,71 @@
|
||||
# Is a music bank's wave 1 the SAME instruments filtered, or DIFFERENT parts?
|
||||
# BGM_103 (the menu's music) -- 2026-08-30
|
||||
#
|
||||
# structures/bgm-two-stems.md leaves two readings alive for wave 1: the rear
|
||||
# pair of a 4-channel mix, or a second intensity layer -- and correctly notes
|
||||
# that runtime simultaneity cannot separate them, because both predict it.
|
||||
# This is a static attempt at a discriminator.
|
||||
#
|
||||
# METHOD: magnitude-squared coherence, Welch, NFFT 8192 @ 48 kHz, 60 s window
|
||||
# (702 segments, so the bias floor is ~1/702 = 0.0014). Coherence is ~1 wherever
|
||||
# one signal is a LINEAR FILTER of the other and ~0 for independent signals.
|
||||
# tools/re-capture/bgm_stem_coherence.py
|
||||
#
|
||||
# WAVES: slb_extract_wave.py BGM_103.slb 14336 1893 2 48000 (wave 0)
|
||||
# slb_extract_wave.py BGM_103.slb 3903488 1919 2 48000 (wave 1)
|
||||
# then ffmpeg -i x.riff x.wav. Both decode to 87.744 s, 4 211 729 frames.
|
||||
# CONTROL BANK: BGM_104.slb 14336 1305 (a different piece, same codec).
|
||||
#
|
||||
CONTROLS
|
||||
POS w0 vs linear-filter(w0) 0-0.2k 0.929 0.2-1k 0.938 1-4k 0.936 4-12k 0.938 12-16k 0.938 16-24k 0.937
|
||||
NEG w0 vs a different bank 0-0.2k 0.001 0.2-1k 0.001 1-4k 0.001 4-12k 0.001 12-16k 0.001 16-24k 0.002
|
||||
NEG w0 vs w0 shifted 1 s 0-0.2k 0.057 0.2-1k 0.048 1-4k 0.007 4-12k 0.019 12-16k 0.015 16-24k 0.004
|
||||
REF w0 L vs R (one perf.) 0-0.2k 0.321 0.2-1k 0.221 1-4k 0.363 4-12k 0.445 12-16k 0.497 16-24k 0.450
|
||||
REF w1 L vs R (one perf.) 0-0.2k 0.078 0.2-1k 0.051 1-4k 0.089 4-12k 0.411 12-16k 0.453 16-24k 0.455
|
||||
|
||||
MEASUREMENT
|
||||
w0 vs w1 0-0.2k 0.169 0.2-1k 0.184 1-4k 0.027 4-12k 0.635 12-16k 0.768 16-24k 0.827
|
||||
|
||||
ENERGY SHARE
|
||||
w0 0-0.2k 71.4% 0.2-1k 24.8% 1-4k 2.4% 4-12k 1.0% 12-16k 0.1% 16-24k 0.2%
|
||||
w1 0-0.2k 53.8% 0.2-1k 40.9% 1-4k 2.3% 4-12k 2.1% 12-16k 0.3% 16-24k 0.6%
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# READING IT
|
||||
#
|
||||
# ✅ THE INSTRUMENT IS CALIBRATED. A real linear filter of w0 reads 0.93-0.94 in
|
||||
# every band; a different bank reads 0.001-0.002; w0 against itself misaligned by
|
||||
# 1 s reads 0.004-0.057. So the estimator detects filtering and is not fooled by
|
||||
# two pieces of music in the same codec.
|
||||
#
|
||||
# ❌ REFUTED: "wave 1 is wave 0 put through a filter." The positive control says
|
||||
# a filter reads 0.936 at 1-4 kHz. The measurement reads 0.027 there. No linear
|
||||
# filter produces that in a band where both waves carry energy.
|
||||
#
|
||||
# 📌 THE FREQUENCY STRUCTURE IS INVERTED relative to any mic-pair or reverb
|
||||
# model. Coherence RISES with frequency -- 0.169, 0.184, 0.027, 0.635, 0.768,
|
||||
# 0.827 -- while energy FALLS -- 71.4 %, 24.8 %, 2.4 %, 1.0 %, 0.1 %, 0.2 %.
|
||||
# A rear pair or a reverb return decorrelates FASTEST at high frequency, which
|
||||
# is the opposite. What is coherent lives in bands holding ~1.3 % of the energy;
|
||||
# the bands holding 96 % of it read 0.169 and 0.184.
|
||||
#
|
||||
# 📌 AND IN THE MUSICAL MIDRANGE THE TWO WAVES ARE FURTHER APART THAN THE TWO
|
||||
# CHANNELS OF ONE WAVE: 1-4 kHz gives 0.027 between waves against 0.363 for w0's
|
||||
# own L vs R -- a factor of 13. Two channels of one performance agree far more
|
||||
# than the two waves do.
|
||||
#
|
||||
# 🔴 BUT THE L-R CONTROL IS ALSO WHAT LIMITS THIS TOOL, AND IT KILLS THE CLEAN
|
||||
# ANSWER. L vs R within a single wave is genuinely "one performance, two
|
||||
# channels", and it reads only 0.221-0.497 -- nowhere near the 0.94 a filter
|
||||
# gives. So in THIS material "same performance" does not imply high coherence,
|
||||
# which means my positive control was the wrong model of the rear-pair reading:
|
||||
# a real 4-channel mix's rear pair is not a linear filter of its front pair.
|
||||
#
|
||||
# => The filter model is dead. The two named readings are NOT separated. This
|
||||
# tool cannot separate them, and the reason is stated rather than discovered
|
||||
# later: it tests for linear filtering, and neither reading requires it.
|
||||
#
|
||||
# ⚠️ REACH: one bank (BGM_103), one 60 s window, mono-summed for the coherence
|
||||
# rows. Not run over the other 31 banks. The 16-24 kHz reading of 0.827 sits in
|
||||
# 0.2-0.6 % of the energy and is unexplained -- it is NOT generic codec
|
||||
# behaviour, since the different-bank control reads 0.002 in the same band.
|
||||
@@ -92,6 +92,47 @@ twice, the second time as a bass-less secondary stem.
|
||||
decorrelated between L and R, and with the bass managed away to the front pair.
|
||||
* **A second intensity layer** to be mixed in or crossfaded.
|
||||
|
||||
### ❌ One of the two is now narrowed: wave 1 is NOT a filtered copy of wave 0
|
||||
|
||||
**measured 2026-08-30** — [`../data/bgm-stem-coherence.txt`](../data/bgm-stem-coherence.txt),
|
||||
`tools/re-capture/bgm_stem_coherence.py`, on **`BGM_103`**, the menu's bank.
|
||||
|
||||
Magnitude-squared coherence is ~1 wherever one signal is a **linear filter** of
|
||||
the other. Controlled first: a real filter of wave 0 reads **0.93–0.94** in every
|
||||
band, a different bank reads **0.001**, and wave 0 against itself misaligned by
|
||||
1 s reads **0.004–0.057**.
|
||||
|
||||
| band | w0 vs w1 | w0's own L vs R | energy in w0 |
|
||||
|---|---|---|---|
|
||||
| 0–200 Hz | 0.169 | 0.321 | 71.4 % |
|
||||
| 200 Hz–1 kHz | 0.184 | 0.221 | 24.8 % |
|
||||
| **1–4 kHz** | **0.027** | **0.363** | 2.4 % |
|
||||
| 4–12 kHz | 0.635 | 0.445 | 1.0 % |
|
||||
| 16–24 kHz | 0.827 | 0.450 | 0.2 % |
|
||||
|
||||
❌ **"Wave 1 is wave 0 filtered" is dead.** A filter reads 0.936 at 1–4 kHz; the
|
||||
measurement reads **0.027**.
|
||||
|
||||
📌 **The frequency structure is inverted** relative to any mic-pair or reverb
|
||||
model: coherence *rises* with frequency while energy *falls*. A rear pair or a
|
||||
reverb return decorrelates fastest at HF. Whatever is coherent lives in bands
|
||||
holding ~1.3 % of the energy; the bands holding 96 % of it read 0.169 and 0.184.
|
||||
|
||||
📌 **In the midrange the two waves are 13× further apart than the two channels of
|
||||
one wave** — 0.027 against 0.363.
|
||||
|
||||
🔴 **But the same control kills the clean answer, so this does NOT settle the
|
||||
🟡.** L vs R *within* one wave is genuinely one performance in two channels, and
|
||||
it reads only **0.221–0.497** — nowhere near 0.94. So in this material "same
|
||||
performance" does not imply high coherence, and my positive control was the wrong
|
||||
model of the rear-pair reading: a real 4-channel mix's rear pair is not a linear
|
||||
filter of its front pair. **The tool tests for linear filtering, and neither
|
||||
surviving reading requires it.** Stated here rather than discovered later.
|
||||
|
||||
⚠️ Reach: one bank, one 60 s window, mono-summed. The 16–24 kHz reading of 0.827
|
||||
is unexplained and is *not* generic codec behaviour — the different-bank control
|
||||
reads 0.002 in that same band.
|
||||
|
||||
**Not settled, and the obvious field does not settle it.** `ChannelMask` is
|
||||
`0x0002` on *both* waves, and [`sound-slb.md`](sound-slb.md) already records that
|
||||
this game writes meaningless channel metadata (movie voices declare 2 channels
|
||||
|
||||
71
tools/re-capture/bgm_stem_coherence.py
Normal file
71
tools/re-capture/bgm_stem_coherence.py
Normal file
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Are a music bank's two waves the SAME instruments filtered, or DIFFERENT parts?
|
||||
|
||||
`structures/bgm-two-stems.md` leaves two readings alive for wave 1 -- the rear
|
||||
pair of a 4-channel mix, or a second intensity layer -- and notes that runtime
|
||||
simultaneity cannot separate them, since both predict it.
|
||||
|
||||
This tries a static discriminator. Magnitude-squared coherence is ~1 wherever
|
||||
one signal is a LINEAR FILTER of the other, and ~0 for independent signals, so
|
||||
a rear pair modelled as "front pair, filtered" should read high and a different
|
||||
arrangement layer should read low.
|
||||
|
||||
⚠️ READ THE CONTROLS BEFORE THE MEASUREMENT. The L-vs-R control below is the
|
||||
one that matters and it is the one that limits this tool: see the docs page.
|
||||
|
||||
bgm_stem_coherence.py <w0.wav> <w1.wav> <control.wav>
|
||||
|
||||
Waves come from slb_extract_wave.py + ffmpeg; see the docs page for the exact
|
||||
offsets and packet counts.
|
||||
"""
|
||||
import sys, wave, numpy as np
|
||||
|
||||
NFFT, HOP, FS = 8192, 4096, 48000
|
||||
BANDS = [(0,200),(200,1000),(1000,4000),(4000,12000),(12000,16000),(16000,24000)]
|
||||
|
||||
def load(p, nmax, stereo=False):
|
||||
w = wave.open(p); n = min(nmax, w.getnframes())
|
||||
a = np.frombuffer(w.readframes(n), dtype="<i2").astype(np.float64)
|
||||
a = a.reshape(-1, w.getnchannels())
|
||||
return (a[:,0], a[:,1]) if stereo else a.mean(axis=1)
|
||||
|
||||
def _acc(x, y):
|
||||
win = np.hanning(NFFT); Sxx = Syy = Sxy = 0.0; k = 0
|
||||
for i in range(0, min(len(x), len(y)) - NFFT, HOP):
|
||||
X = np.fft.rfft(x[i:i+NFFT]*win); Y = np.fft.rfft(y[i:i+NFFT]*win)
|
||||
Sxx = Sxx + abs(X)**2; Syy = Syy + abs(Y)**2; Sxy = Sxy + X*np.conj(Y); k += 1
|
||||
return np.abs(Sxy)**2/(Sxx*Syy+1e-30), Sxx, Syy, k
|
||||
|
||||
def coh(x, y): return _acc(x, y)[0]
|
||||
def spec(x): return _acc(x, x)[1]
|
||||
|
||||
def row(name, C, f):
|
||||
print(f" {name:34} " + " ".join(
|
||||
f"{lo/1000:g}-{hi/1000:g}k {C[(f>=lo)&(f<hi)].mean():.3f}" for lo,hi in BANDS))
|
||||
|
||||
if __name__ == "__main__":
|
||||
p0, p1, pc = sys.argv[1], sys.argv[2], sys.argv[3]
|
||||
D = 60*FS; f = np.fft.rfftfreq(NFFT, 1/FS)
|
||||
w0 = load(p0, D); w1 = load(p1, D); ctl = load(pc, D)
|
||||
L0,R0 = load(p0, D, True); L1,R1 = load(p1, D, True)
|
||||
|
||||
# POSITIVE control: an actual linear filter of w0 (one-pole LP + 12 ms delay)
|
||||
a = 0.06; lp = np.empty_like(w0); acc = 0.0
|
||||
for i, v in enumerate(w0):
|
||||
acc += a*(v-acc); lp[i] = acc
|
||||
d = int(0.012*FS); pos = np.concatenate([np.zeros(d), lp[:-d]])
|
||||
sh = np.concatenate([np.zeros(FS), w0[:-FS]])
|
||||
|
||||
print("CONTROLS")
|
||||
row("POS w0 vs linear-filter(w0)", coh(w0,pos), f)
|
||||
row("NEG w0 vs a different bank", coh(w0,ctl), f)
|
||||
row("NEG w0 vs w0 shifted 1 s", coh(w0,sh), f)
|
||||
row("REF w0 L vs R (one perf.)", coh(L0,R0), f)
|
||||
row("REF w1 L vs R (one perf.)", coh(L1,R1), f)
|
||||
print("\nMEASUREMENT")
|
||||
row("w0 vs w1", coh(w0,w1), f)
|
||||
print("\nENERGY SHARE")
|
||||
for nm,(L,R) in (("w0",(L0,R0)),("w1",(L1,R1))):
|
||||
S = spec(L)+spec(R); t = S.sum()
|
||||
print(f" {nm:34} " + " ".join(
|
||||
f"{lo/1000:g}-{hi/1000:g}k {100*S[(f>=lo)&(f<hi)].sum()/t:5.1f}%" for lo,hi in BANDS))
|
||||
Reference in New Issue
Block a user