Noise Gate Stages¶
Noise gate Stages remove quiet signals from the audio output.
NoiseGate¶
- class audio_dsp.stages.NoiseGate(**kwargs)
A noise gate that reduces the level of an audio signal when it falls below a threshold.
When the signal envelope falls below the threshold, the gain applied to the signal is reduced to 0 over the release time. When the envelope returns above the threshold, the gain applied to the signal is increased to 1 over the attack time.
The initial state of the noise gate is with the gate open (no attenuation); this models a full scale signal having been present before t = 0.
- Attributes:
- dsp_block
audio_dsp.dsp.drc.expander.noise_gate The DSP block class; see Noise Gate for implementation details.
- dsp_block
- make_noise_gate(threshold_db, attack_t, release_t, Q_sig=27)
Update noise gate configuration based on new parameters.
- Parameters:
- threshold_dbfloat
The threshold level in decibels below which the audio signal is attenuated.
- attack_tfloat
Attack time of the noise gate in seconds.
- release_tfloat
Release time of the noise gate in seconds.
- set_parameters(
- parameters: NoiseGateParameters,
Update noise gate configuration based on new parameters.
- pydantic model audio_dsp.models.noise_gate.NoiseGateParameters
Parameters for noise gate stage.
- field attack_t: float = 0.005
Time in seconds for gate to open when signal exceeds threshold
- Constraints:
gt = 0
le = 1
- field release_t: float = 0.12
Time in seconds for gate to close when signal falls below threshold
- Constraints:
gt = 0
le = 5
- field threshold_db: float = -35
Level in dB below which the gate begins to close
- Constraints:
ge = -162.55619765854985
le = 24.082399717833418
NoiseGate Control¶
The following runtime command ids are available for the NoiseGate Stage. For details on reading and writing these commands, see the Run-Time Control User Guide.
Control parameter |
Payload length |
|---|---|
CMD_NOISE_GATE_ATTACK_ALPHA |
|
The attack alpha in Q0.31 format. To convert an attack time in seconds to an |
|
CMD_NOISE_GATE_RELEASE_ALPHA |
|
The release alpha in Q0.31 format. To convert a release time in seconds to an |
|
CMD_NOISE_GATE_ENVELOPE |
|
The current peak envelope of the signal in Q_SIG format. To read the |
|
CMD_NOISE_GATE_THRESHOLD |
|
The threshold in Q_SIG format below which gating will occur. To convert a threshold in dB to the |
|
CMD_NOISE_GATE_GAIN |
|
The current gain applied by the noise gate in Q0.31 format. To read the |
|