measureSharedWindow
measureSharedWindow(
program,sampleRate,sampleAt,drives,options?):object
Defined in: packages/runtime/src/settle.ts:532
Measure several drive levels over ONE window, after every one of them has settled.
Two drives measured at their own settle points are not two views of one state. Mains ripple
has a phase tied to absolute time, so comparing or subtracting windows captured at different
offsets does not cancel it and can double it — measured directly on 2026-09-09, where letting a
driven and a silent render each stop at its own settle time reported fender-twin-reverb with
more signal than total output and hiwatt-dr103, then believed to be a working amp, with a
signal of exactly zero.
measureSettledSignal is the two-drive difference case of this. This exists because callers
needing three or more levels — quiet, loud and silent, which is what a liveness screen compares —
were otherwise reimplementing the settle-then-capture policy themselves, and a shared policy
module only helps if the callers can get what they need from it. Every instrument that
hardcoded its own render window instead was wrong by up to 42 dB on the amp corpus.
The window is the latest settle point across the drives, so every render is steady across it. A drive that never settles does not veto the others: it contributes nothing to the choice of window and is reported over the same one, which is a level taken late rather than no level.
Parameters
Section titled “Parameters”program
Section titled “program”sampleRate
Section titled “sampleRate”number
sampleAt
Section titled “sampleAt”(index) => number
drives
Section titled “drives”readonly number[]
options?
Section titled “options?”SettleOptions = SETTLE_DEFAULTS
Returns
Section titled “Returns”criterion
Section titled “criterion”
readonlycriterion:SettleCriterion
Which criterion produced this row. Record it beside the verdict.
measurements
Section titled “measurements”
readonlymeasurements: readonlySharedWindowMeasurement[]
settleSeconds
Section titled “settleSeconds”
readonlysettleSeconds:number|null
null when no drive settled at all; the measurements are then taken at the ladder’s end.