AudioEffect
Represents a single audio effect that can be applied to an audio stream.
An AudioEffect encapsulates a native DSP processor (e.g., gain, compressor, reverb) and exposes a parameter-based API for real-time control. Effects are created through AudioEngine.createEffect and are typically added to an AudioEffectChain before being attached to an AudioStream.
Each effect has a fixed type that determines which parameters are available. Use the corresponding parameter constants object (e.g., CompressorParams, ReverbParams) to discover valid parameter IDs for a given effect type.
On JS, effects are Web Audio nodes rather than the C++ DSP core. The noise gate is a compressor approximation (NoiseGateParams.HOLD_MS is unused). Reverb is a convolver impulse (ReverbParams.WIDTH is unused). BPFParams.BANDWIDTH is converted from octaves to biquad Q.
Example usage:
val engine = AudioEngine.create()
val compressor = engine.createEffect(AudioEffectType.COMPRESSOR)
// Configure the compressor
compressor.setParameter(CompressorParams.THRESHOLD, -18f)
compressor.setParameter(CompressorParams.RATIO, 4f)
compressor.setParameter(CompressorParams.ATTACK_MS, 10f)
compressor.setParameter(CompressorParams.RELEASE_MS, 100f)
// Bypass the effect without removing it from the chain
compressor.isEnabled = false
// Re-enable it
compressor.isEnabled = true
// Release native resources when done
compressor.release()See also
Represents a single audio effect that can be applied to an audio stream.
An AudioEffect encapsulates a native DSP processor (e.g., gain, compressor, reverb) and exposes a parameter-based API for real-time control. Effects are created through AudioEngine.createEffect and are typically added to an AudioEffectChain before being attached to an AudioStream.
Each effect has a fixed type that determines which parameters are available. Use the corresponding parameter constants object (e.g., CompressorParams, ReverbParams) to discover valid parameter IDs for a given effect type.
On JS, effects are Web Audio nodes rather than the C++ DSP core. The noise gate is a compressor approximation (NoiseGateParams.HOLD_MS is unused). Reverb is a convolver impulse (ReverbParams.WIDTH is unused). BPFParams.BANDWIDTH is converted from octaves to biquad Q.
Example usage:
val engine = AudioEngine.create()
val compressor = engine.createEffect(AudioEffectType.COMPRESSOR)
// Configure the compressor
compressor.setParameter(CompressorParams.THRESHOLD, -18f)
compressor.setParameter(CompressorParams.RATIO, 4f)
compressor.setParameter(CompressorParams.ATTACK_MS, 10f)
compressor.setParameter(CompressorParams.RELEASE_MS, 100f)
// Bypass the effect without removing it from the chain
compressor.isEnabled = false
// Re-enable it
compressor.isEnabled = true
// Release native resources when done
compressor.release()See also
Represents a single audio effect that can be applied to an audio stream.
An AudioEffect encapsulates a native DSP processor (e.g., gain, compressor, reverb) and exposes a parameter-based API for real-time control. Effects are created through AudioEngine.createEffect and are typically added to an AudioEffectChain before being attached to an AudioStream.
Each effect has a fixed type that determines which parameters are available. Use the corresponding parameter constants object (e.g., CompressorParams, ReverbParams) to discover valid parameter IDs for a given effect type.
On JS, effects are Web Audio nodes rather than the C++ DSP core. The noise gate is a compressor approximation (NoiseGateParams.HOLD_MS is unused). Reverb is a convolver impulse (ReverbParams.WIDTH is unused). BPFParams.BANDWIDTH is converted from octaves to biquad Q.
Example usage:
val engine = AudioEngine.create()
val compressor = engine.createEffect(AudioEffectType.COMPRESSOR)
// Configure the compressor
compressor.setParameter(CompressorParams.THRESHOLD, -18f)
compressor.setParameter(CompressorParams.RATIO, 4f)
compressor.setParameter(CompressorParams.ATTACK_MS, 10f)
compressor.setParameter(CompressorParams.RELEASE_MS, 100f)
// Bypass the effect without removing it from the chain
compressor.isEnabled = false
// Re-enable it
compressor.isEnabled = true
// Release native resources when done
compressor.release()See also
Represents a single audio effect that can be applied to an audio stream.
An AudioEffect encapsulates a native DSP processor (e.g., gain, compressor, reverb) and exposes a parameter-based API for real-time control. Effects are created through AudioEngine.createEffect and are typically added to an AudioEffectChain before being attached to an AudioStream.
Each effect has a fixed type that determines which parameters are available. Use the corresponding parameter constants object (e.g., CompressorParams, ReverbParams) to discover valid parameter IDs for a given effect type.
On JS, effects are Web Audio nodes rather than the C++ DSP core. The noise gate is a compressor approximation (NoiseGateParams.HOLD_MS is unused). Reverb is a convolver impulse (ReverbParams.WIDTH is unused). BPFParams.BANDWIDTH is converted from octaves to biquad Q.
Example usage:
val engine = AudioEngine.create()
val compressor = engine.createEffect(AudioEffectType.COMPRESSOR)
// Configure the compressor
compressor.setParameter(CompressorParams.THRESHOLD, -18f)
compressor.setParameter(CompressorParams.RATIO, 4f)
compressor.setParameter(CompressorParams.ATTACK_MS, 10f)
compressor.setParameter(CompressorParams.RELEASE_MS, 100f)
// Bypass the effect without removing it from the chain
compressor.isEnabled = false
// Re-enable it
compressor.isEnabled = true
// Release native resources when done
compressor.release()See also
Represents a single audio effect that can be applied to an audio stream.
An AudioEffect encapsulates a native DSP processor (e.g., gain, compressor, reverb) and exposes a parameter-based API for real-time control. Effects are created through AudioEngine.createEffect and are typically added to an AudioEffectChain before being attached to an AudioStream.
Each effect has a fixed type that determines which parameters are available. Use the corresponding parameter constants object (e.g., CompressorParams, ReverbParams) to discover valid parameter IDs for a given effect type.
On JS, effects are Web Audio nodes rather than the C++ DSP core. The noise gate is a compressor approximation (NoiseGateParams.HOLD_MS is unused). Reverb is a convolver impulse (ReverbParams.WIDTH is unused). BPFParams.BANDWIDTH is converted from octaves to biquad Q.
Example usage:
val engine = AudioEngine.create()
val compressor = engine.createEffect(AudioEffectType.COMPRESSOR)
// Configure the compressor
compressor.setParameter(CompressorParams.THRESHOLD, -18f)
compressor.setParameter(CompressorParams.RATIO, 4f)
compressor.setParameter(CompressorParams.ATTACK_MS, 10f)
compressor.setParameter(CompressorParams.RELEASE_MS, 100f)
// Bypass the effect without removing it from the chain
compressor.isEnabled = false
// Re-enable it
compressor.isEnabled = true
// Release native resources when done
compressor.release()See also
Represents a single audio effect that can be applied to an audio stream.
An AudioEffect encapsulates a native DSP processor (e.g., gain, compressor, reverb) and exposes a parameter-based API for real-time control. Effects are created through AudioEngine.createEffect and are typically added to an AudioEffectChain before being attached to an AudioStream.
Each effect has a fixed type that determines which parameters are available. Use the corresponding parameter constants object (e.g., CompressorParams, ReverbParams) to discover valid parameter IDs for a given effect type.
On JS, effects are Web Audio nodes rather than the C++ DSP core. The noise gate is a compressor approximation (NoiseGateParams.HOLD_MS is unused). Reverb is a convolver impulse (ReverbParams.WIDTH is unused). BPFParams.BANDWIDTH is converted from octaves to biquad Q.
Example usage:
val engine = AudioEngine.create()
val compressor = engine.createEffect(AudioEffectType.COMPRESSOR)
// Configure the compressor
compressor.setParameter(CompressorParams.THRESHOLD, -18f)
compressor.setParameter(CompressorParams.RATIO, 4f)
compressor.setParameter(CompressorParams.ATTACK_MS, 10f)
compressor.setParameter(CompressorParams.RELEASE_MS, 100f)
// Bypass the effect without removing it from the chain
compressor.isEnabled = false
// Re-enable it
compressor.isEnabled = true
// Release native resources when done
compressor.release()See also
Properties
The type of this effect, which determines its DSP behavior and available parameters.
The type of this effect, which determines its DSP behavior and available parameters.
The type of this effect, which determines its DSP behavior and available parameters.
The type of this effect, which determines its DSP behavior and available parameters.
The type of this effect, which determines its DSP behavior and available parameters.
The type of this effect, which determines its DSP behavior and available parameters.
Functions
Retrieves the current value of a parameter on this effect.
Retrieves the current value of a parameter on this effect.
Retrieves the current value of a parameter on this effect.
Retrieves the current value of a parameter on this effect.
Retrieves the current value of a parameter on this effect.
Retrieves the current value of a parameter on this effect.
Releases the native resources associated with this effect.
Releases the native resources associated with this effect.
Releases the native resources associated with this effect.
Releases the native resources associated with this effect.
Releases the native resources associated with this effect.
Releases the native resources associated with this effect.
Sets a parameter on this effect.
Sets a parameter on this effect.
Sets a parameter on this effect.
Sets a parameter on this effect.
Sets a parameter on this effect.
Sets a parameter on this effect.