Envelope Detector Stages¶
Envelope detector Stages measure how the average or peak amplitude of a signal varies over time.
EnvelopeDetectorPeak¶
- class audio_dsp.stages.EnvelopeDetectorPeak(**kwargs)
A stage with no outputs that measures the signal peak envelope.
The current envelope of the signal can be read out using this stage’s
envelopecontrol.- Attributes:
- dsp_block
audio_dsp.dsp.drc.drc.envelope_detector_peak The DSP block class; see Peak Envelope Detector for implementation details.
- dsp_block
- make_env_det_peak(attack_t, release_t, Q_sig=27)
Update envelope detector configuration based on new parameters.
- Parameters:
- attack_tfloat
Attack time of the envelope detector in seconds.
- release_tfloat
Release time of the envelope detector in seconds.
- set_parameters(
- parameters: EnvelopeDetectorParameters,
Update the parameters of the EnvelopeDetectorPeak stage.
- pydantic model audio_dsp.models.envelope_detector.EnvelopeDetectorParameters
Parameters for an EnvelopeDetector Stage.
- field attack_t: float = 0.01
Attack time of the stage in seconds.
- Constraints:
gt = 0
le = 1
- field release_t: float = 0.2
Release time of the stage in seconds.
- Constraints:
gt = 0
le = 5
EnvelopeDetectorPeak Control¶
The following runtime command ids are available for the EnvelopeDetectorPeak Stage. For details on reading and writing these commands, see the Run-Time Control User Guide.
Control parameter |
Payload length |
|---|---|
CMD_ENVELOPE_DETECTOR_PEAK_ATTACK_ALPHA |
|
The attack alpha in Q0.31 format. To convert an attack time in seconds to an |
|
CMD_ENVELOPE_DETECTOR_PEAK_RELEASE_ALPHA |
|
The release alpha in Q0.31 format. To convert a release time in seconds to an |
|
CMD_ENVELOPE_DETECTOR_PEAK_ENVELOPE |
|
The current peak envelope of the signal in Q_SIG format. To read the |
|
EnvelopeDetectorRMS¶
- class audio_dsp.stages.EnvelopeDetectorRMS(**kwargs)
A stage with no outputs that measures the signal RMS envelope.
The current envelope of the signal can be read out using this stage’s
envelopecontrol.- Attributes:
- dsp_block
audio_dsp.dsp.drc.drc.envelope_detector_rms The DSP block class; see RMS Envelope Detector for implementation details.
- dsp_block
- make_env_det_rms(attack_t, release_t, Q_sig=27)
Update envelope detector configuration based on new parameters.
- Parameters:
- attack_tfloat
Attack time of the envelope detector in seconds.
- release_tfloat
Release time of the envelope detector in seconds.
- set_parameters(
- parameters: EnvelopeDetectorParameters,
Update the parameters of the EnvelopeDetectorRMS stage.
- pydantic model audio_dsp.models.envelope_detector.EnvelopeDetectorParameters
Parameters for an EnvelopeDetector Stage.
- field attack_t: float = 0.01
Attack time of the stage in seconds.
- Constraints:
gt = 0
le = 1
- field release_t: float = 0.2
Release time of the stage in seconds.
- Constraints:
gt = 0
le = 5
EnvelopeDetectorRMS Control¶
The following runtime command ids are available for the EnvelopeDetectorRMS Stage. For details on reading and writing these commands, see the Run-Time Control User Guide.
Control parameter |
Payload length |
|---|---|
CMD_ENVELOPE_DETECTOR_RMS_ATTACK_ALPHA |
|
The attack alpha in Q0.31 format. To convert an attack time in seconds to an |
|
CMD_ENVELOPE_DETECTOR_RMS_RELEASE_ALPHA |
|
The release alpha in Q0.31 format. To convert a release time in seconds to an |
|
CMD_ENVELOPE_DETECTOR_RMS_ENVELOPE |
|
The current RMS² envelope of the signal in Q_SIG format. To read the |
|