|
Krotos Modules 3
|
Applies distortion to an audio signal using various transfer functions. More...
#include <Saturation.h>
Classes | |
| struct | Function |
Public Types | |
| enum | FunctionType { diodic = 0 , hyperbolicTangent , saturation1 , saturation2 , saturation3 } |
Public Member Functions | |
| Saturation () | |
| ~Saturation () | |
| void | prepareToPlay (double sampleRate, int blockSize) |
| float | processSample (float sample, int channel) |
| void | setFunctionType (FunctionType function) |
| void | setInputGainDb (float gainInDb) |
| void | setOutputGainDb (float gainInDb) |
| void | setLowCutFrequency (float newCutoffFrequency) |
| void | setHighCutFrequency (float newCutoffFrequency) |
| void | setMix (float newMixValue) |
Public Attributes | |
| const std::map< FunctionType, float(*)(float)> | functions |
Private Types | |
| enum | ParameterList { preGain = 0 , postGain , lowCut , hiCut , mix } |
| enum | Channel { left = 0 , right } |
Static Private Member Functions | |
| template<typename T > | |
| static int | sign (T val) |
Private Attributes | |
| const int | NUM_CHANNELS_MAX {2} |
| double | m_sampleRate {0.0} |
| float | m_outputGain {1.0f} |
| float | m_inputGain {1.0f} |
| float | m_mix {1.0f} |
| dsp::WaveShaper< float > | m_waveshaper |
| OwnedArray< IIRFilter > | m_lowCutFilters |
| OwnedArray< IIRFilter > | m_highCutFilters |
Applies distortion to an audio signal using various transfer functions.
|
private |
|
private |
| krotos::Saturation::Saturation | ( | ) |
| krotos::Saturation::~Saturation | ( | ) |
| void krotos::Saturation::prepareToPlay | ( | double | sampleRate, |
| int | blockSize ) |
| float krotos::Saturation::processSample | ( | float | sample, |
| int | channel ) |
| void krotos::Saturation::setFunctionType | ( | FunctionType | function | ) |
| void krotos::Saturation::setHighCutFrequency | ( | float | newCutoffFrequency | ) |
| void krotos::Saturation::setInputGainDb | ( | float | gainInDb | ) |
| void krotos::Saturation::setLowCutFrequency | ( | float | newCutoffFrequency | ) |
| void krotos::Saturation::setMix | ( | float | newMixValue | ) |
| void krotos::Saturation::setOutputGainDb | ( | float | gainInDb | ) |
|
staticprivate |
| const std::map<FunctionType, float (*)(float)> krotos::Saturation::functions |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |