@maruaudio/dsp/physical/modal-radiation turns a modal resonator's internal displacement and velocity taps into a bounded output signal. A mode's readout weight follows a smooth high-pass shelf, h(f) = (f/ref) / (f/ref + corner/ref) raised to an exponent: 0 is flat, a positive exponent favours high modes and a negative one low modes. The readout mixes displacement and velocity, applies that weight and a gain, and a symmetric per-channel gain spreads it in stereo. Every input is clamped, so model data from the control plane cannot turn a tap into an unbounded gain.
Parameters
| Function and argument | Clamp as coded |
|---|---|
modalRadiationFrequencyWeight exponent | −4 to 4; a non-finite exponent reads 0, which returns weight 1 |
modalRadiationFrequencyWeight result | 0 to 4 (MODAL_RADIATION_MAX_WEIGHT); a non-positive or non-finite frequency, reference or corner returns 0 |
modalRadiationReadout velocityMix | 0 (displacement) to 1 (velocity) |
modalRadiationReadout gain | 0 to 4 |
modalRadiationChannelGain(width, channel) | Width 0 to 1; a negative channel is left: 1 ∓ width / 2 |
Lifecycle
None: pure stage functions with no state or allocation. The weight calls pow, so compute it when a mode's frequency or the readout settings change.
When to use it
The pickup or microphone stage of a struck physical model: choosing whether a bar or plate is heard by its displacement or its velocity, how much its high modes radiate, and how wide its stereo image is.
Limits
- The readout is rounded to f32 at each step; the weight is f32 when the exponent is non-zero.
- The clamp is the kernel stage's conditional clamp, not the
math/rangepolicy, so its reversed-bound and NaN behaviour follows that code: a NaN mix or gain passes through the clamp unchanged. MODAL_RADIATION_DISPLACEMENT(0) andMODAL_RADIATION_VELOCITY(1) name the two taps for callers; the functions take the mix directly.