|
Gin
|
Soft clipper with an adjustable knee, worked out in the dB domain. More...
#include <gin_softclipper.h>
Public Member Functions | |
| SoftClipper ()=default | |
| ~SoftClipper ()=default | |
| void | setDrive (float db) |
| Gain applied before the curve, in dB. | |
| void | setKnee (float k) |
| Knee width as a fraction of the drive, 0 to 1. | |
| void | setCeiling (float db) |
| Output ceiling in dB - the level the curve flattens out at. | |
| float | processSample (float x) const |
| void | process (juce::AudioSampleBuffer &buffer) const |
Soft clipper with an adjustable knee, worked out in the dB domain.
Below the knee nothing is touched at all. Through the knee the curve bends quadratically in dB, and above it the output is pinned to the ceiling. Doing the curve in dB rather than on the sample value is what makes it sound gradual: a waveshaper that looks smooth on a linear plot is still bending most sharply where the ear is most sensitive to it.
The knee is expressed as a fraction of the drive, so pushing the drive widens the region being softened instead of just hitting the ceiling harder and sooner.
Key Features:
Usage:
|
default |
|
default |
Gain applied before the curve, in dB.
More drive means more of the signal ends up in the knee and above it.
Knee width as a fraction of the drive, 0 to 1.
At 0 this is a hard clip at the ceiling; at 1 the knee spans the whole drive range either side of it.
Output ceiling in dB - the level the curve flattens out at.
| void SoftClipper::process | ( | juce::AudioSampleBuffer & | buffer | ) | const |
References processSample().