API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classRingModulatorEffect

@codexo/exojs-audio-fx / audio / stable

Ring modulator effect using native Web Audio nodes (no worklet required). A carrier `OscillatorNode` is connected directly to the `gain` AudioParam of a `GainNode` whose base gain value is 0. The carrier's bipolar output (±1) modulates the gain, multiplying the input signal by the instantaneous carrier amplitude — the mathematical definition of ring modulation. The result contains the sum and difference frequencies of the input and carrier but suppresses the original carrier (unlike amplitude modulation, which retains the carrier). At sub-audio carrier frequencies (< 20 Hz) the effect becomes a tremolo. Node graph: ``` input(GainNode) ┬── dryGain ──────────────────────────┐ │ ├── output(GainNode) └── ringGain ── wetGain ────────────────┘ carrierOsc ── ringGain.gain (AudioParam, base = 0) ``` Gains: `dryGain.gain = 1 - wet`; `wetGain.gain = wet`; `ringGain.gain` base = 0 (carrier provides the ±1 modulation).

6
props
1
methods
0
events
Import
import { RingModulatorEffect } from '@codexo/exojs-audio-fx'

Ring modulator effect using native Web Audio nodes (no worklet required).

A carrier `OscillatorNode` is connected directly to the `gain` AudioParam of a `GainNode` whose base gain value is 0. The carrier's bipolar output (±1) modulates the gain, multiplying the input signal by the instantaneous carrier amplitude — the mathematical definition of ring modulation. The result contains the sum and difference frequencies of the input and carrier but suppresses the original carrier (unlike amplitude modulation, which retains the carrier). At sub-audio carrier frequencies (\< 20 Hz) the effect becomes a tremolo.

Node graph: ``` input(GainNode) ┬── dryGain ──────────────────────────┐ │ ├── output(GainNode) └── ringGain ── wetGain ────────────────┘

carrierOsc ── ringGain.gain (AudioParam, base = 0) ``` Gains: `dryGain.gain = 1 - wet`; `wetGain.gain = wet`; `ringGain.gain` base = 0 (carrier provides the ±1 modulation).

Constructors 1
new(options: RingModulatorEffectOptions): RingModulatorEffect
Methods 1
destroy(): void
Properties 6
frequency: number
inputNode: AudioNode
outputNode: AudioNode
ready: Promise<void>
waveform: OscillatorType
wet: number
Source