Skip to content

measureSettled

measureSettled(program, sampleRate, sampleAt, options?): SettledMeasurement

Defined in: packages/runtime/src/settle.ts:176

Render a program until its output level stops moving, and report that level.

The runtime is stateful across process() calls, so this walks forward through one continuous render rather than restarting per rung — which both costs less and is the only honest way to measure a circuit that is still charging.

sampleAt is the stimulus, in volts, as a function of absolute sample index; passing the same function every instrument uses is what makes two measurements comparable.

Program

number

(index) => number

SettleOptions = SETTLE_DEFAULTS

SettledMeasurement