AmplitudeModulator¶
Overview¶
AmplitudeModulator instances can be used to create low-frequency amplitude oscillation effects on a loop, oscillator, or other steady sound source. It is not a sound generator itself, and is instead intended to be used as a component within a sound generator.
@author John Blanco (PhET Interactive Simulations)
Class AmplitudeModulator¶
Constructor¶
new AmplitudeModulator( providedOptions? : AmplitudeModulatorOptions )¶
Instance Methods¶
dispose()¶
Clean up memory references to avoid memory leaks.
getConnectionPoint() : GainNode¶
Get the gain node to which connections should occur.
connect( destination : AudioNode | AudioParam )¶
Connect the output of this modulator to a destination.
Instance Properties¶
frequencyProperty : NumberProperty¶
(readonly)
frequency of the oscillation, generally pretty low, like 1 to 20 or so
depthProperty : NumberProperty¶
(readonly)
depth of modulation, 0 for none, 1 for full modulation
waveformProperty : Property<OscillatorType>¶
(readonly)
Web Audio oscillator type
myEnabledProperty : Property<boolean>¶
(readonly)
Type AmplitudeModulatorOptions¶
- frequencyProperty?: NumberProperty | null
controls the frequency of modulation, created if not supplied - depthProperty?: NumberProperty | null
controls the depth of modulation, 0 means no modulation, 1 is the max, created if not supplied - waveformProperty?: Property<OscillatorType> | null
Controls the type of waveform being used for the modulation, see the documentation for Web Audio OscillatorNode for the available types. Created if not supplied. - & StrictOmit<EnabledComponentOptions, "enabledProperty">
Source Code¶
See the source for AmplitudeModulator.ts in the tambo repository.