Build with this node

Start with a prompt in Studio, or copy it into your own coding agent.

Ask Studio

@maruaudio/dsp/mixing/constant outputs the same clamped value on every sample: a DC or offset source for modulation graphs and the simplest probe for comparing execution lanes. It has no input and no state besides the stored value.

const state = initConstantNode(48000)
setConstantNodeValue(state, 0.375)
const y = constantNodeTick(state) // 0.375

Parameters

SetterRange the setter enforcesDefault
setConstantNodeValue−1 to 10

The sample rate passed to initConstantNode is stored and not read.

Lifecycle

initConstantNode → setConstantNodeValue → constantNodeTick. There is no reset: the tick reads the stored value and changes nothing. Ticks allocate nothing and do no I/O.

When to use it

A fixed control offset, a bias to add to a modulation signal, or a known signal to feed a chain when checking that two targets produce the same numbers.

Limits

  • Mono sample tick, not a block Processor.
  • The clamp is the kernel node's conditional clamp, not the math/range policy: a NaN passes through unchanged.
  • A new value applies on the next tick, with no smoothing.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Value valuefloatsetConstantNodeValue

Ports

  • Out outoutput · audio · mono

One sample per constantNodeTick call.

Dependencies

None: this node imports no other node.

Dependents

No other node imports this one.

Used by

No plugin with a published composition uses this node yet.