Compressor with 0 latency.
More...
#include "SuperpoweredCompressor.h"
|
float | attackSec |
| Attack in seconds (not milliseconds!). Limited between 0.0001 and 1. Default: 0.003 (3 ms). More...
|
|
bool | enabled = false |
| Turns the effect on/off. The actual switch will happen on the next process() call for smooth, audio-artifact free operation. More...
|
|
float | hpCutOffHz |
| Key highpass filter frequency, limited between 1 and 10000. Default: 1. More...
|
|
float | inputGainDb |
| Input gain in decibels, limited between -24 and 24. Default: 0. More...
|
|
float | outputGainDb |
| Output gain in decibels, limited between -24 and 24. Default: 0. More...
|
|
float | ratio |
| Ratio, rounded to 1.5, 2.0, 3.0, 4.0, 5.0 or 10. Default: 3. More...
|
|
float | releaseSec |
| Release in seconds (not milliseconds!). Limited between 0.1 and 4. Default: 0.3 (300 ms). More...
|
|
unsigned int | samplerate = 0 |
| Sample rate in Hz. More...
|
|
float | thresholdDb |
| Threshold in decibels, limited between 0 and -40. Default: 0. More...
|
|
float | wet |
| Dry/wet ratio, limited between 0 (completely dry) and 1 (completely wet). Default: 1. More...
|
|
Compressor with 0 latency.
It doesn't allocate any internal buffers and needs less than 1 kb of memory.
◆ Compressor() [1/2]
Superpowered::Compressor::Compressor |
( |
unsigned int |
samplerate | ) |
|
Constructor.
Enabled is false by default.
- Parameters
-
samplerate | The initial sample rate in Hz. |
◆ ~Compressor()
Superpowered::Compressor::~Compressor |
( |
| ) |
|
◆ Compressor() [2/2]
Superpowered::Compressor::Compressor |
( |
const Compressor & |
| ) |
|
|
private |
◆ getGainReductionDb()
float Superpowered::Compressor::getGainReductionDb |
( |
| ) |
|
◆ operator=()
◆ process()
bool Superpowered::Compressor::process |
( |
float * |
input, |
|
|
float * |
output, |
|
|
unsigned int |
numberOfFrames |
|
) |
| |
|
virtual |
Processes the audio.
Always call it in the audio processing callback, regardless if the effect is enabled or not for smooth, audio-artifact free operation. It's never blocking for real-time usage. You can change all properties and call getGainReductionDb() on any thread, concurrently with process(). If process() returns with true, the contents of output are replaced with the audio output. If process() returns with false, the contents of output are not changed.
- Parameters
-
input | Pointer to floating point numbers. 32-bit interleaved stereo input. |
output | Pointer to floating point numbers. 32-bit interleaved stereo output. Can point to the same location with input (in-place processing). |
numberOfFrames | Number of frames to process. Recommendations for best performance: multiply of 4, minimum 64. |
Implements Superpowered::FX.
◆ attackSec
float Superpowered::Compressor::attackSec |
Attack in seconds (not milliseconds!). Limited between 0.0001 and 1. Default: 0.003 (3 ms).
◆ enabled
bool Superpowered::FX::enabled = false |
|
inherited |
Turns the effect on/off. The actual switch will happen on the next process() call for smooth, audio-artifact free operation.
◆ hpCutOffHz
float Superpowered::Compressor::hpCutOffHz |
Key highpass filter frequency, limited between 1 and 10000. Default: 1.
◆ inputGainDb
float Superpowered::Compressor::inputGainDb |
Input gain in decibels, limited between -24 and 24. Default: 0.
◆ internals
compressorInternals* Superpowered::Compressor::internals |
|
private |
◆ outputGainDb
float Superpowered::Compressor::outputGainDb |
Output gain in decibels, limited between -24 and 24. Default: 0.
◆ ratio
float Superpowered::Compressor::ratio |
Ratio, rounded to 1.5, 2.0, 3.0, 4.0, 5.0 or 10. Default: 3.
◆ releaseSec
float Superpowered::Compressor::releaseSec |
Release in seconds (not milliseconds!). Limited between 0.1 and 4. Default: 0.3 (300 ms).
◆ samplerate
unsigned int Superpowered::FX::samplerate = 0 |
|
inherited |
◆ thresholdDb
float Superpowered::Compressor::thresholdDb |
Threshold in decibels, limited between 0 and -40. Default: 0.
◆ wet
float Superpowered::Compressor::wet |
Dry/wet ratio, limited between 0 (completely dry) and 1 (completely wet). Default: 1.
The documentation for this class was generated from the following file:
- latest/Superpowered/SuperpoweredCompressor.h