Build with this node

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

Ask Studio

@maruaudio/dsp/voices/gong models large struck plates as a modal resonator bank with two behaviors a linear bank lacks: an upward energy bloom that raises the high modes after the strike, and an amplitude-dependent pitch glide of the low modes. Six recipes: tam-tam, wind gong, daluo, xiaoluo, gong ageng and symphonic, up to twelve modes each, with left and right resonators per mode, four mallets, deterministic xorshift exciter noise and ombak beating. The source cites its research and marks the other tables as design values.

Parameters

setGongParam(state, index, value), clamped as coded (indices rounded where integer):

IndexRangeDefaultUnit
0 IR_INSTRUMENT / 7 MALLET_TYPE0 to 5 (recipe order above) / 0 yarn, 1 felt, 2 wood, 3 metal0 / 0—
1 IR_SIZE / 2 IR_DECAY_SCALE / 3 IR_DAMPING0.5 to 2 / 0.1 to 3 / 0.05 to 41 / 1 / 1—
4 IR_STEREO_WIDTH / 5 STRIKE_POSITION / 6 STRIKE_VEL_TONE0 to 10.4 / 0.15 / 0.6—
8 EXCITER_NOISE / 9 BLOOM_AMOUNT / 11 GLIDE_AMOUNT0 to 10.15 / 0.7 / 0.7—
10 BLOOM_TIME / 23 GLIDE_TIME0.1 to 3 / 0.1 to 2.50.8 / 0.85s
12 OMBAK_AMOUNT / 13 OMBAK_RATE0 to 2 / 0 to 8 Hz1 / 2.5—
14 AMP_DECAY / 15 AMP_RELEASE0.05 to 15 / 0.02 to 415 / 0.6s
16 TUNING_BASE_FREQ55 to 440; MIDI 45 plays this, 12-TET110Hz
17 MASTER_LEVEL0 to 1; 0.01 s glide while voices ring0.8—
18 MODEL_STIFFNESS / 21 MODEL_RADIATION−1 to 10—
19 MODEL_COUPLING / 20 MODEL_EDGE_LOSS / 22 GLIDE_DEPTH0 to 10 / 0 / 0.65—

Lifecycle

initGongVoice(rate) → setGongParam / gongNoteOn / gongNoteOff → gongGlideQuantum(state, voice) per render quantum per voice → gongVoiceTick per voice per frame into a caller-owned stereo bus, and gongAdvanceMasterLevel once per frame. A note-on releases a ringing voice on that note, then takes the lowest free slot or steals the oldest (starting the note-transition bridge). Note-off releases every voice on the note. To reset, init a new state.

When to use it

Tam-tams, opera gongs and gong ageng whose high modes should rise after the strike or whose pitch should settle as the plate decays.

Limits

  • Stereo, sample tick, six voices of up to twelve modes; a tail is capped at 15 s, or amp decay + 0.05 s below an amp decay of 12.
  • Every key is mapped, 12-TET only; there are no slendro or pelog keys here.
  • The PCM16 render entry stays in audio-kernels; the voices barrel omits it.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Dependencies

Dependents

No other node imports this one.

Used by