Stage soundscape, 3-D sends and the listener

Our reading of the executable and of the st03 / st02 layouts and banks (stagesound.py, the bank reader of pdsound.py). It answers the playtest note “ambient sounds are missing from the level”: yes, the rebuild plays none of the stage bank, and it also has no footsteps, no movement / landing sounds and no 3-D falloff of the game’s kind. Confidence H (read in the code and checked against the files) unless marked. Not confirmed by ear: in the reference recordings the music covers the ambience (see the end of the section).

What a match plays with no skill use

The Palace (st03, stage bank MapSEShoppingMall, parameter group 3). All from the stage-wide EF00 list (17 sound entries), started when the stage starts:

Stage cue Entries How Sound parameters (group 3) Bank cue
0 1 held bed, no position class 2, held volume 80; two tracks of one stereo loop (3.3 s, 16 kHz), fine tune +60 / −30 cents; sends front 125 + rear 60 and front 60 + rear 125
1 10 held, positional: five points at height 50.8 and the same five at 110.3 (the two floor levels) class 2, held, positional; near 50, far 200, linear, spread 34 % volume 30; four tracks of one mono loop (12 s, 22 kHz) at −1, +1, −5, −6 semitones, started 0 / 3.5 / 3.5 / 2 s in; each track sent to one side or both
4 6 (two share a point) positional one-shot, interval 90: one play every 91 ticks, forever class 2, positional; near 0, far 140, linear, spread 20 % volume 50; a ~9 s phrase: track 1 = five short one-shot clips (0.14–0.78 s) at 0.03 / 1.03 / 1.7 / 5.3 / 8 s, track 2 = a quiet looping clip gated by the event length at the same times
3 none not placed in st03 / st13 / st23 and no code site plays it (M) as cue 4 the same clips in another order (a second drip phrase)

Cue 2 is an empty slot. The entries of cue 4 play 3.03 s apart while the phrase is ~9 s long, so about three phrases of each emitter overlap.

st02 (stage bank MapSEHighway, group 2).

Stage cue Who How Sound parameters Bank cue
2 the one EF00 sound entry held bed, no position class 2, held volume 30; two tracks of a 2.3 s loop, left only / right only, 0 and −2 semitones
0 the sand storm object started once, no position; volume each tick = clamp(storm intensity, 0, 1) (“Stage sounds”) class 2, held volume 110; four tracks of a 6.8 s loop at 0 / −2 / +1 / +6 semitones spread over the four corners
1 near papers held, no position (M) class 2, held volume 55; three tracks of a 6.5 s loop, effect send 60
3–5 thunder: st12 only — class 2 stereo one-shots, 3.6 s
6 st12’s second entry — class 2, held —

Every stage also has, from the common bank (earlier sections): footsteps (surface table, “Match, menu and footstep sounds”), the movement and landing cues of the character code, the surface sound by ground attribute, the lock-on and refused cues, the aura point cue, the countdown, and the battle music at the music option’s level.

Ours (main, 11-14): the music, the countdown, lock-on, refused and aura point cues, skill / hit / voice / stage-object cues. pdsound.py converts common and the voice banks only; no MapSE bank is converted and nothing reads the EF00 sound entries. So on the Palace the room bed, ten water points and six drip emitters are silent, and on st02 the bed, the storm bed and the paper loop.

Play volume: option and volume class

Both play requests (plain 0x140240870, 3-D 0x140240a00) compute v = volume argument × sound option × class volume, truncated to an integer (0x1000 = 1.0):

The listener

One routine sets it, 0x1402403a0(matrix, position, listener index), called once per frame from the camera commit 0x14012bfc0:

3-D sends (0x140241440)

For a positional request the routine fills the request’s eight send scales (the per-send scale of “Speaker sends”, 0x1000 = 1.0) from the emitter position E, the listener position L and the cue’s soundparam record (near and far in tens of units, spread in percent):

  1. d = |L − E|. If d ≥ far: all eight scales are 0 (the request stays alive, silent).
  2. a = 1 when d ≤ near, else 1 − (d − near) / (far − near).
  3. Distance volume by the curve byte:
    • 0 (linear): V = v × a;
    • 1: V = v when a ≥ 0.9, else v × (−log10(1 − a));
    • 2 and up: V = 0 when a ≤ 0.1, else v × (1 + log10(a)).
  4. In split-screen (battle mode 6) V is halved.
  5. For each of the five speakers: P = L + direction × d (the speaker sits at the emitter’s distance), g = 1 − |P − E| / (spread / 100 × 2 × far). The scale is 0 when g < 0, else V × min(g, 1), capped at 0x1000.
  6. The three sends without a direction (LFE id 3, effect sends ids 11 and 12) get v × a (the linear factor whatever the curve, not halved).

The event’s own send levels (0..127) still multiply these per send (“Speaker sends”), so a cue’s left / right layering survives the panning. Consequences: a source at the listener (d = 0) is equal in all five speakers; the farther it is, the narrower it gets (at distance d a speaker at angle φ from the source is |P − E| = 2 d sin(φ / 2) away). Palace water points: silent from 200 units, full inside 50, spread length 136 units. Drips: silent from 140 units, spread length 56 units.

Per tick (0x1402400f0 → 0x140240210): each of the 84 request slots that is playing is updated: positional ones through 0x140240c10 (sends recomputed from the stored emitter position and the current listener, plus the Doppler pitch), the others through the plain volume update. In split-screen a positional start makes a second request in slot + 84 for listener 1. The slot steal policy was not followed (M for the pool size as the voice limit).

Not decoded: what the effect sends (ids 11, 12) feed on the PC port; the fader’s users; the Doppler step’s details; the meaning of the event word at 0x14.

Mix: the game against ours

Game Ours (main)
Stage bank cues played as above not converted, not played
Positional falloff per cue: near / far / curve from soundparam, linear for both stage groups; silent beyond far Godot’s inverse-distance default with one unit size and max distance for every cue
Panning five speakers around the character, width from the cue’s spread and the distance Godot 3-D panning around the camera
Listener the character (position and facing) the camera
Level of a bed Palace bed: volume 80 × track 100, send 125 → about −6.7 dB, × the sound option (60 → about −11 dB in all); music at the default option about −4.7 dB —
Reverb none on the PC port (DSP_*.bin loaded and freed, “Sound banks”); the effect send levels exist in the events (60–100 on the highway cues, send 12 on the Palace cues) but their bus is not decoded none
Event length (0x1C) ends looping events not applied: a looping event would never end

Recordings. One private recording has the PC port idle on the Palace (0–206 s) and our build on the Palace (668–772 s), both with the music. Spectrograms of 30 s of each show the music in both and nothing that can be told apart as the bed or the drips, so the recordings neither confirm nor contradict the list above. A recording with the music option at 0 would.

Rebuild (ambient build, 11-14)

Implementation notes for the rebuild