Add little saturation to Leiwand setting
This commit is contained in:
parent
33ee4560c5
commit
40ab4bfe68
@ -128,6 +128,14 @@ void LeiwandizerAudioProcessor::prepareToPlay (double sampleRate, int samplesPer
|
||||
gain.reset();
|
||||
gain.setGainDecibels(-2.0f);
|
||||
|
||||
saturation.prepare(spec);
|
||||
saturation.reset();
|
||||
saturation.functionToUse = [](float x) {
|
||||
float satFactor = 0.05f;
|
||||
x = satFactor * x;
|
||||
return ( x / (1 + std::abs(x)) ) / satFactor;
|
||||
};
|
||||
|
||||
lowCutFilterOa.prepare(spec);
|
||||
auto lowCutOa = juce::dsp::IIR::Coefficients<float>::makeHighPass(sampleRate, 100.0f, 5.0f);
|
||||
lowCutFilterOa.coefficients = *lowCutOa;
|
||||
@ -236,6 +244,7 @@ void LeiwandizerAudioProcessor::processBlock (juce::AudioBuffer<float>& buffer,
|
||||
lowShelfFilterLw.process(context);
|
||||
highShelfFilterLw.process(context);
|
||||
gain.process(context);
|
||||
saturation.process(context);
|
||||
compressor.process(context);
|
||||
limiter.process(context);
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ private:
|
||||
juce::dsp::Compressor<float> compressor;
|
||||
juce::dsp::Limiter<float> limiter;
|
||||
juce::dsp::Gain<float> gain;
|
||||
juce::dsp::WaveShaper<float> saturation;
|
||||
//Oasch DSP
|
||||
juce::dsp::IIR::Filter<float> lowCutFilterOa;
|
||||
juce::dsp::IIR::Filter<float> highCutFilterOa;
|
||||
|
Loading…
x
Reference in New Issue
Block a user