## Digital clipper

Official support for: sonicbirth.sourceforge.net
Nocturnal Swede
KVRer
2 posts since 11 Mar, 2008
Hello everybody!

I am very, very new at this but Sonic Birth has really cought my interest. I have spent some substantial time trying to understand all the elements of SB, but this is easier said than done

One thing I find missing amongst the range of plugs for mac is a good digital clipper such as Gclip.
I was wondering if it would be possible for someone to point me in the right direction in terms of modules to use etc?

dscro
KVRist
92 posts since 29 Nov, 2007
I'm not familiar with the characteristics of digital clipping as opposed to analog overdrive (what harmonics get added to the signal etc.) But a real easy way to add soft clipping to a signal is to run it through a hyperbolic tangent function (see the trig function elements menu > tanh. Some people use an inverse tangent function instead (arctan in the menu). But the former will literally pin the audio between -1 and 1 whereas the latter will let it gradually go above. Use either with a pregain multiplier and post gain. These functions will add only odd harmonics to your signal and I don't know if that's the sound you want. It's sort of . . . well . . .tube-ish.

For harder clipping you can use comparators such as the greater module ie: if the signal is > 0.8 make it 1 and if it's < -0.8 make it -1.

These techniques are generally referred to as wave-shaping the audio signal.

To add even harmonics to the signal which I think might be more of what you want by "digital clipping" you just have to make the waveshaping form assymetric above and below 0. This can be done with comparators, again ie using the greater module: if signal > 0 do tanh(x) but if it's < 0 do something else. That's only an example, obviously, many other things are possible.

When you run high frequency audio through any of these waveshapers you will generate harmonic frequencies higher than the sample rate / 2 and that will lead to aliasing. Some people want that sound. But you can also do all the waveshaping within a 2xsample rate module (in the misc elements section) and then filter to eliminate frequencies above 22KHz if you don't want aliasing.

Aletheian-Alex
KVRist
38 posts since 6 Mar, 2008 from Philadelphia
Nocturnal Swede wrote:Hello everybody!

I am very, very new at this but Sonic Birth has really cought my interest. I have spent some substantial time trying to understand all the elements of SB, but this is easier said than done

One thing I find missing amongst the range of plugs for mac is a good digital clipper such as Gclip.
I was wondering if it would be possible for someone to point me in the right direction in terms of modules to use etc?

Here is a rather different method that I have been playing with: using FFT points to mutilate the signal. Give it a try. To see what is going on inside, hilight the "sr db1" and click "next" button.

Feel free to use it as you wish, but if you redistribute it, just drop my name in there somewhere

If your browser adds .txt or .html to the file, just change the name so that the extension is .sbc and drag it to the SonicBirth application icon.

Nocturnal Swede
KVRer
2 posts since 11 Mar, 2008
Hello guys!

First of all, thanks for taking the time to reply! I realize that I asked a pretty vast question, but I definitely feel that there's some interesting tips to work on.
Basically what I wanted is to push the overall level of the incoming audio, while determining a ceiling "percentage" of the audio where everything above will be clipped (hope that makes sense).

Aletheian-Alex
KVRist
38 posts since 6 Mar, 2008 from Philadelphia
Nocturnal Swede wrote:Hello guys!

Basically what I wanted is to push the overall level of the incoming audio, while determining a ceiling "percentage" of the audio where everything above will be clipped (hope that makes sense).

It makes perfect sense. The issue is HOW you want the signal clipped. If you are talking about just chopping off the top and bottom of the waveform equally, then you are looking for symmetrical hard clipping. Here is an example file of one way to do it with the typical hyperbolic tangent (tanh) function. The circuit should be self explanitory as I put notes on it. I included a sine generator, but you can just switch the input to Channel 0 to play a sound sample through it.

Clip equation example

johnmck6
KVRist
34 posts since 19 Jun, 2005
Hi Alex,

The Tanh seems to have the same effect as the equation I was using in my saturation equation, at least on a sine wave!

If you're looking for a 'hard' clip sound, simply passing the audio through a max and then a min function will do it, though the sound is pretty violent!

Just set up a slider with a value between o and 1, the take the min of the audio signal and the slider, then the max of the output from that compared with the negation of the slider value. Probably want an input and output gain setup, too...

johnmck6
KVRist
34 posts since 19 Jun, 2005
Here's one:
[url]http:///suitcaserecordings.com/HardClipper.sbc[/url]

Steve P
KVRer
2 posts since 16 Dec, 2008 from Italy
Speaking of formulas, why not multiply the input by, say, 10000? I can't imagine a harder digital clipping than that...
Could be worse. Could be raining.

zmix
KVRist
184 posts since 17 Aug, 2005
Nocturnal Swede wrote:Hello everybody!

I am very, very new at this but Sonic Birth has really cought my interest. I have spent some substantial time trying to understand all the elements of SB, but this is easier said than done

One thing I find missing amongst the range of plugs for mac is a good digital clipper such as Gclip.
I was wondering if it would be possible for someone to point me in the right direction in terms of modules to use etc?

There is an element called "cleaner" that has a hard clipper. It defaults with the "also clamp to -1..1" box ticked.

If you feed the 'cleaner" element with signal hotter than that it will clip the waveform.

You can add gain to the input and attenuate the output and thereby control the onset of clipping.

dscro
KVRist
92 posts since 29 Nov, 2007
Cool. I thought the cleaner was just to remove potential undefined/infinities (divide by zero etc.)

Per Lichtman
KVRian
1116 posts since 18 Jan, 2004 from Los Angeles, California, USA
For Mac clpping, try Stillwell Plug-ins Event Horizon or Voxengo Elephant 3. Both offer clipping modes on both Mac and PC.