Switchboard SDK
|
Class providing noise gating with hysteresis. More...
#include <NoiseGate.hpp>
Public Member Functions | |
NoiseGate (const uint sampleRate) | |
NoiseGate constructor. | |
~NoiseGate () | |
NoiseGate destructor. | |
void | setOpenThresholdDB (const float openThreshold) |
Sets the noise gate opening threshold in decibels. | |
float | getOpenThresholdDB () const |
Gets open threshold setting in decibels. | |
void | setCloseThresholdDB (const float closeThreshold) |
Sets the noise gate closing threshold setting in decibels. | |
float | getCloseThresholdDB () const |
Gets the close threshold setting in decibels. | |
void | setAttackTimeSeconds (const float attackTimeSeconds) |
Sets the volume envelope filter attack time in seconds. Minimum value: 0.0f Maximum value: 0.5f. | |
float | getAttackTimeSeconds () const |
Gets the attack time setting in seconds. | |
void | setHoldTimeSeconds (const float holdTimeSeconds) |
Sets the volume envelope filter hold time in seconds. Minimum value: 0.0f Maximum value: 1.0f. | |
float | getHoldTimeSeconds () const |
Gets hold time setting value in seconds. | |
void | setReleaseTimeSeconds (const float releaseTimeSeconds) |
Sets the volume envelope filter release time in seconds. Minimum value: 0.0f Maximum value: 1.0f. | |
float | getReleaseTimeSeconds () const |
Gets the release time setting value in seconds. | |
void | setEnabled (const bool enabled) |
Enables or disables the noise gate. | |
bool | isEnabled () const |
Gets the enabled setting value of the noise gate. | |
uint | getSampleRate () const |
Gets the sample rate setting value of the noise gate. | |
void | setSampleRate (const uint sampleRate) |
Sets the sample rate setting of the noise filter. | |
void | process (const float *input, float *output, const uint numberOfFrames) |
Processes the audio buffer and applies the noise gate. | |
Class providing noise gating with hysteresis.
switchboard::NoiseGate::NoiseGate | ( | const uint | sampleRate | ) |
NoiseGate constructor.
sampleRate | The initial sample rate. |
float switchboard::NoiseGate::getAttackTimeSeconds | ( | ) | const |
Gets the attack time setting in seconds.
float switchboard::NoiseGate::getCloseThresholdDB | ( | ) | const |
Gets the close threshold setting in decibels.
float switchboard::NoiseGate::getHoldTimeSeconds | ( | ) | const |
Gets hold time setting value in seconds.
float switchboard::NoiseGate::getOpenThresholdDB | ( | ) | const |
Gets open threshold setting in decibels.
float switchboard::NoiseGate::getReleaseTimeSeconds | ( | ) | const |
Gets the release time setting value in seconds.
uint switchboard::NoiseGate::getSampleRate | ( | ) | const |
Gets the sample rate setting value of the noise gate.
bool switchboard::NoiseGate::isEnabled | ( | ) | const |
Gets the enabled setting value of the noise gate.
void switchboard::NoiseGate::process | ( | const float * | input, |
float * | output, | ||
const uint | numberOfFrames ) |
Processes the audio buffer and applies the noise gate.
input | Interleaved stereo input audio buffer |
output | Interleaved stereo output audio buffer |
numberOfFrames | The number of frames to process. |
void switchboard::NoiseGate::setAttackTimeSeconds | ( | const float | attackTimeSeconds | ) |
Sets the volume envelope filter attack time in seconds. Minimum value: 0.0f Maximum value: 0.5f.
attackTimeSeconds | The new attack time in seconds. |
void switchboard::NoiseGate::setCloseThresholdDB | ( | const float | closeThreshold | ) |
Sets the noise gate closing threshold setting in decibels.
When the signal drops below this threshold value the noise gate closes. Minimum value: -96.0f Maximum value: 24.0f
closeThreshold | The new close threshold value. |
void switchboard::NoiseGate::setEnabled | ( | const bool | enabled | ) |
Enables or disables the noise gate.
enabled | Flag indicating whether the noise gate should be enabled or disabled. |
void switchboard::NoiseGate::setHoldTimeSeconds | ( | const float | holdTimeSeconds | ) |
Sets the volume envelope filter hold time in seconds. Minimum value: 0.0f Maximum value: 1.0f.
holdTimeSeconds | The new hold time in seconds. |
void switchboard::NoiseGate::setOpenThresholdDB | ( | const float | openThreshold | ) |
Sets the noise gate opening threshold in decibels.
When the signal raises above this threshold value the noise gate opens. Minimum: -96.0f Maximum: 24.0f
openThreshold | The new open threshold value. |
void switchboard::NoiseGate::setReleaseTimeSeconds | ( | const float | releaseTimeSeconds | ) |
Sets the volume envelope filter release time in seconds. Minimum value: 0.0f Maximum value: 1.0f.
releaseTimeSeconds | The new release time in seconds. |
void switchboard::NoiseGate::setSampleRate | ( | const uint | sampleRate | ) |
Sets the sample rate setting of the noise filter.
sampleRate | The new sample rate to set. |