Audio: footstep pulse VERIFIED end-to-end to the matcher; volume chain traced (task #50)
Footstep chain progress (each step empirically verified): - The FootStep watcher is an AudioMatchOf<Logical> (AudioLogicalTrigger extends AudioMatchOf, NOT AudioTriggerOf): authored config match=1 -> Start(2.0) on a DirectPatchSource. [trigcfg]/[matchcfg] ctor dumps added. - The pulse was pinned at 1: the decay lived in IntegrateMotion, which the current gait path NEVER CALLS. Moved to Mech::PerformAndWatch (provably per-frame) with a time-based 150ms window sized to the ~10Hz watcher poll. The matcher now fires per stride (14/run, was 1). - Every footstep Start is DROPPED at the renderer: the source's volumeScale is 0 (five VolumeAudioHandler sends of exactly 0 = inert/one-shot primes). The volume arrives through the authored control chain (AudioControlMultiplier inputs ctl 100+; one 0 input pins the product). Chain scales identified on this entity: LocalVelocity (live), LocalAcceleration (live), Myomers. SpeedEffect (=1.0 healthy; one authored scale maps [0,1]->[1,0] INVERTED), UnstablePercentage (INERT PAD -- always 0!), HeatSink.CurrentTemperature. PRIME SUSPECT: an UnstablePercentage-fed multiplier input primes 0 once and never updates (the pad never changes), pinning footstep volume at 0. - SF2 numbering fact recorded: 38 presets in AUDIO1 / 5 in AUDIO2 have wPreset != file index (gap at preset 77); my table keys by wPreset. The 184x ProgramButton01 (bank1 patch83) storm at ~7/s needs an identity check against index-numbering (it may be the wrong sample for that patch id). Diagnostics added (BT_AUDIO_SPATIAL/BT_ATTRBIND_LOG): [trigcfg]/[matchcfg] ctor dumps, [matchfire] with component ptr+class, [volset] VolumeAudioHandler, [mult0] multiplier zero-products, scale sends with authored boundaries, [fswatch] dedicated footstep watcher tracer (g_btFootStepAddr), SetupPatch ENTRY with bank/patch/state, Simulation::DebugAudioWatcherCount. NEXT: back UnstablePercentage with a real (live) member -- it is the mech's stability 0..1 (the stabilityAlarm/gyro family) -- or confirm via a one-run chain dump which multiplier input pins the FS source; then the footstep transient should clear the 0.3 drop gate at walking speed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
ba3040ea09
commit
1d019e8109
@@ -292,10 +292,8 @@ Logical
|
||||
// Choose this frame's forward-cycle slew rate.
|
||||
forwardCycleRate = airborneSelect ? airborneCycleRate : groundCycleRate; // 0x344<-0x5bc/0x5b8
|
||||
|
||||
// FootStep pulse decay (see SetBodyAnimation): clear the contact flag a few
|
||||
// frames after the plant so the AudioLogicalTrigger re-arms for the next step.
|
||||
if (footStepDecay > 0 && --footStepDecay == 0)
|
||||
footStep = 0;
|
||||
// (FootStep pulse decay moved to PerformAndWatch -- this integrator does not
|
||||
// run on the current gait path, so a decay here never fired.)
|
||||
|
||||
if (IsDisabled()) // FUN_0049fb54
|
||||
{
|
||||
@@ -5205,6 +5203,21 @@ void
|
||||
// (AudioLogicalTrigger FootStep, AudioMotionScale/Trigger LocalVelocity, ...)
|
||||
// never executed -- only the PUSHED StateIndicator watchers fired. That's
|
||||
// why footsteps/motion-scaled sounds were silent while state sounds worked. [T0]
|
||||
// FootStep pulse decay (see SetBodyAnimation): clear the contact flag ~150ms
|
||||
// after the plant so the FootStep matcher (fires on the CHANGE to 1) sees a 0
|
||||
// before the next stride re-pulses. Lives HERE (not IntegrateMotion, which the
|
||||
// current gait path never calls) so it provably ticks every mech frame, right
|
||||
// before the watcher poll below reads it. Time-based -- tick-rate immune.
|
||||
if (footStepDecay > 0)
|
||||
{
|
||||
footStepDecay -= (int)(dt * 1000.0f);
|
||||
if (footStepDecay <= 0)
|
||||
{
|
||||
footStepDecay = 0;
|
||||
footStep = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (getenv("BT_AUDIO_LOG")) { static int s_wd=0; if ((s_wd++ % 300)==0)
|
||||
DEBUG_STREAM << "[audio] mech watcher poll: delayed=" << (int)AreWatchersDelayed() << " audioWatchers=" << DebugAudioWatcherCount()
|
||||
<< " simFlags=0x" << std::hex << (unsigned)simulationFlags << std::dec
|
||||
|
||||
Reference in New Issue
Block a user