Early development version of clipper plugin output stage
When working on new clipper plugin I suddenly found that oversampling can’t avoid intersample clips in all cases. Oversampling can reduce possibility of them but not completely avoid. See cooly picture (top samples are exactly 0 dB but the real signal is far above):
The idea is first to calculate real peak value using oversampled peak meter and next apply gain reduction not for single sample but for some window around it.
I’ve implemented both oversampled peak meter and window function-based gain reduction stage in this softclipper test plugin:
[Serp 2 Clipper Win 32 64 VST version]
This is signal above after this soft clipper:
As you can see now it doesn’t exceed 0 dB.
Why I call this clipper “soft”? Because it sounds very soft! But technically gain reduction knee is hard.
Clipper plugin parameters:
- “Gain” – signal gain before clipping
- “Clip” – clipping threshold
- “Oversamp” – turn on or off signal oversampling (signal upsampling for peak detection is always off)
- “GR.shape” – gain reduction shape
- “St.mode” – stereo modes:
- “Stereo” – linked stereo mode (Gain Reduction applied to both channels in equal proportion);
- “2Mono” – unlinked stereo mode (both channels processed independent);
- “Mono” – make mono from stereo source and process it;
- M/S, M, S – experimental modes.
- Gain reduction shapes are sample-based not time based. So they sound different in different sample rates.
- Upsampling/downsampling stages have 32-bit precision.
- Even if signal oversampling is off upsampling delay line is used so the sound is not “bit-transparent” if no gain reduction applied (2 lowest bits are affected I suppose).
- Real clipping threshold is -0.05 dB below given. Real input gain is -0.1 dB below given.
- If signal oversampling is on it can 0.1 dB overshoot threshold given.
- In M/S, M, S modes clipper doesn’t work as “brickwall” so L and R channels can overshoot threshold given.
- Anyway it’s “early development” version.
My plans for near future:
- To write Molot usage manual.
- To make minor Molot release.
- To make open-source new oversampler release and share information how SoX resampler can be used in plugins.
- To continue new plugin development. It should be Limiter/Clipper for master buss.
PS. No news on “Molot” Mac version update.