Go Back   Cockos Incorporated Forums > REAPER Forums > newbieland

Reply
 
Thread Tools Display Modes
Old 05-19-2022, 01:31 PM   #1
for
Human being with feelings
 
Join Date: Feb 2012
Posts: 1,384
Default Does compression cause saturation?

Does compression cause saturation?

or its 2 different things

thanks
for is offline   Reply With Quote
Old 05-19-2022, 02:06 PM   #2
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,293
Default

Saturation is basically compression with high ratio and all time constants at 0. In fact, I use ReaComp this way literally all the time. A compressor with very fast time constants will start to impart what we call “ripple distortion”, which is not exactly the same thing, but close. Hardware compressors and those that are meant to emulate them might get some distortion/saturation when the components around the actual compression circuit are pushed to their limits, but that is really separate from the compression itself.

Last edited by ashcat_lt; 05-19-2022 at 04:28 PM.
ashcat_lt is offline   Reply With Quote
Old 05-19-2022, 04:21 PM   #3
Tukan_Studios
Human being with feelings
 
Tukan_Studios's Avatar
 
Join Date: Dec 2021
Location: Studio B
Posts: 382
Default

Generally: Yes.
But not necessarily constantly.
- The shorter your time constants are, the more saturation you will get.
- The more compression, the more saturation.

This is caused by the amplitude modulation. Mostly the saturation is not really noticeable.
If the time constants are much shorter than the wavelength it will cause saturation.
Tukan_Studios is offline   Reply With Quote
Old 05-19-2022, 08:26 PM   #4
DVDdoug
Human being with feelings
 
Join Date: Jul 2010
Location: Silicon Valley, CA
Posts: 2,786
Default

Dynamic compression reduces (compresses) the dynamic range (or "dynamic contrast") by making the loud parts quieter and/or the quiet parts louder.

In practice it usually used to "push down" the loud parts and then make-up gain is used to bring-up the overall-average loudness.

Limiting is a fast-kind of compression.

I sometimes forget about saturation but it's similar to limiting or maybe you can say it is limiting. Analog tape saturation has its own characteristics because of the recording/playback EQ. Tube amplifiers have their own characteristics too, maybe related to the output transformer.

Clipping is a bad-kind of limiting. (Although it's not necessarily bad if you want a distortion effect.)

Automatic volume control is a slow-kind of compression.
DVDdoug is offline   Reply With Quote
Old 05-20-2022, 04:41 AM   #5
bolgwrad
Human being with feelings
 
bolgwrad's Avatar
 
Join Date: Mar 2011
Location: On my arse in Glasgow, Scotland
Posts: 2,053
Default

Saturation means the amplitude of the signal wrt max level - how much headroom there is, if you like. Back in the days of signal-to-noise ratios, you wanted to saturate your recording to cover noise up, and that was done with compression. Or previously, just standing closer to the big horn.

So compression is a technique, saturation is one result. You don't really want to hear compression, unless it's an effect you want such as in EDM.
__________________
www.sachetsofrelish.com
bolgwrad is online now   Reply With Quote
Old 05-20-2022, 02:30 PM   #6
matt_t
Human being with feelings
 
Join Date: Nov 2012
Location: West Midlands, UK
Posts: 379
Default

I've been wondering *how* compression leads to saturation, i.e. how can compressing/reducing the amplitude of a sine wave lead to other sine(?) waves at different (higher) frequencies? (If that is what saturation is in the first place.) Doesn't it just alter the shape (flatten, depending on attack release times?) the original sine wave?

I'm probably misunderstanding just about everything here. Would be a good subject for a Dan Worrall(-type) video, since I guess it must be easier to explain and understand visually.

(Sorry about all the (((brackets)))!)
matt_t is offline   Reply With Quote
Old 05-20-2022, 03:16 PM   #7
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,293
Default

Quote:
Originally Posted by matt_t View Post
...how can compressing/reducing the amplitude of a sine wave lead to other sine(?) waves at different (higher) frequencies?
It doesn't, and neither does saturation/overdrive/distortion/clipping. There ARE additive distorters out there, but that's not how most work.
Quote:
Doesn't it just alter the shape...
Yes. That's all any of them do. The waveforms that they create can be approximated by a series of sine waves matching the harmonic series, and it will sound like such to our ears, but nothing is actually "generating harmonics". It's just changing the waveform directly. This is a common misconception and I make this point pretty often even though it's kind of pedantic in most contexts.
ashcat_lt is offline   Reply With Quote
Old 05-22-2022, 03:47 AM   #8
Philbo King
Human being with feelings
 
Philbo King's Avatar
 
Join Date: May 2017
Posts: 3,204
Default

An equivalent viewpoint:
Compression is a form of distortion. Because (above the threshold) what comes out is not equal to what went in. This is the very definition of distortion.

Any type of distortion adds harmonics to a signal. These are at frequency multiples of every frequency at the input. They are the exact phase and amplitude so that, when added to the input signal, the result is the output signal. The individual phase and amplitude of these added harmonics exactly characterize the distortion that occurs for any given input signal.

Distortion of any sort will do this, not just compression. Fuzz. Overdrive. Tube simulations. Tape head simulation. Limiters.
These are all time-invariant distortions.

These are also time variant distortions, such as Phasing and Flanging. These continuously change the character of the harmonics added, over a repetitive cycle by using sweeping time delays. The causes frequency peaks and nulls to sweep up and down the spectrum.
__________________
Tangent Studio - Philbo King
www.soundclick.com/philboking - Audio streams

Last edited by Philbo King; 05-22-2022 at 03:57 AM.
Philbo King is offline   Reply With Quote
Old 05-22-2022, 08:14 AM   #9
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,293
Default

Quote:
Originally Posted by Philbo King View Post
An equivalent viewpoint:
Compression is a form of distortion. Because (above the threshold) what comes out is not equal to what went in. This is the very definition of distortion.
Naw. Most typical compression is slow enough that it doesn’t actually change much other than overall volume. By your definition, volume automation would be distortion, but unless you’re doing something pretty extreme, I don’t think anybody would see it that way.

Quote:
Any type of distortion adds harmonics to a signal.
This is flat false for the reasons I described above, and this kind of description is exactly what leads to the OP’s confusion. You theoretically can create the sound of distortion by artificially generating harmonics of the signal and adding them together, but that is actually a pretty complicated and CPU intensive process and the plugins which do it are usually pretty difficult to make sound any good.

Like I said, most distortion actually changes the wave shape directly, and the “added harmonics” are basically an artifact of analysis. You can almost describe the new waveform using a series of harmonics, but it’s an approximation and just a way to describe the resulting sound. Distortion really only takes away, never adds anything.

Quote:
These are also time variant distortions, such as Phasing and Flanging. These continuously change the character of the harmonics added…
This is a real stretch here. First of all, no harmonics are generated. And I mean even if you squint a little and allow the common parlance that “distortion adds harmonics”, this kind of time-based effect doesn’t. These are really just fairly complex filters. They will emphasize or de-emphasize harmonics that already exist in a signal, but they’re definitely not adding anything on their own.
ashcat_lt is offline   Reply With Quote
Old 05-22-2022, 04:34 PM   #10
Philbo King
Human being with feelings
 
Philbo King's Avatar
 
Join Date: May 2017
Posts: 3,204
Default

Quote:
Originally Posted by ashcat_lt View Post
Naw. Most typical compression is slow enough that it doesn’t actually change much other than overall volume. By your definition, volume automation would be distortion, but unless you’re doing something pretty extreme, I don’t think anybody would see it that way.


This is flat false for the reasons I described above, and this kind of description is exactly what leads to the OP’s confusion. You theoretically can create the sound of distortion by artificially generating harmonics of the signal and adding them together, but that is actually a pretty complicated and CPU intensive process and the plugins which do it are usually pretty difficult to make sound any good.

Like I said, most distortion actually changes the wave shape directly, and the “added harmonics” are basically an artifact of analysis. You can almost describe the new waveform using a series of harmonics, but it’s an approximation and just a way to describe the resulting sound. Distortion really only takes away, never adds anything.


This is a real stretch here. First of all, no harmonics are generated. And I mean even if you squint a little and allow the common parlance that “distortion adds harmonics”, this kind of time-based effect doesn’t. These are really just fairly complex filters. They will emphasize or de-emphasize harmonics that already exist in a signal, but they’re definitely not adding anything on their own.
Try this: Create a 10 kHz square wave. Loop it back into the interface and rerecord it. Guess what? That 'altered waveform' is now a sine wave! Why? Because all those harmonics were removed by the A/D antialiasing filter. It's not revolutionary. It's a basic math fact of DSP technology that the spectrum on any non-perfect sine wave *will* contain harmonics. Whether you choose to accept the idea is another matter entirely.

Another simple test: Run any sine generator into a compressor. Use a spectrum analyzer both before and after the compressor plugin. Hmmm... Where did all those harmonics come from? Weird, huh?
__________________
Tangent Studio - Philbo King
www.soundclick.com/philboking - Audio streams

Last edited by Philbo King; 05-22-2022 at 04:41 PM.
Philbo King is offline   Reply With Quote
Old 05-22-2022, 05:17 PM   #11
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,293
Default

Quote:
Originally Posted by Philbo King View Post
Where did all those harmonics come from? Weird, huh?
Artifact of the analysis. Look at the actual waveform. It's not a collection of new harmonics. It's a distorted version of the original. It can be approximated by a series of harmonics, which is lterally how FFT analysis works. It looks (and sounds) a shit ton like you added harmonics, but you didn't. You changed the waveform.
ashcat_lt is offline   Reply With Quote
Old 05-22-2022, 10:18 PM   #12
Philbo King
Human being with feelings
 
Philbo King's Avatar
 
Join Date: May 2017
Posts: 3,204
Default

All I can say was already said:

Whether you choose to accept the idea is another matter entirely.
__________________
Tangent Studio - Philbo King
www.soundclick.com/philboking - Audio streams
Philbo King is offline   Reply With Quote
Old 05-23-2022, 07:36 AM   #13
alanofoz
Human being with feelings
 
alanofoz's Avatar
 
Join Date: Sep 2009
Location: Oz - Blue Mountains NSW, formerly Geelong
Posts: 944
Default

Quote:
Originally Posted by ashcat_lt View Post
Artifact of the analysis. Look at the actual waveform. It's not a collection of new harmonics. It's a distorted version of the original. It can be approximated by a series of harmonics, which is lterally how FFT analysis works. It looks (and sounds) a shit ton like you added harmonics, but you didn't. You changed the waveform.
I hear Fourier turning in his grave.
__________________
It's "its" except when it's "it is".

alanofoz, aka Alan of Australia
alanofoz is offline   Reply With Quote
Old 05-23-2022, 07:58 AM   #14
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,293
Default

Quote:
Originally Posted by Philbo King View Post
Whether you choose to accept the idea is another matter entirely.
Well at least we agree on something

Go open the code for JS Saturation and find me the part where it adds harmonics. I’m not holding my breath.

Last edited by ashcat_lt; 05-23-2022 at 08:03 AM.
ashcat_lt is offline   Reply With Quote
Old 05-23-2022, 03:48 PM   #15
Philbo King
Human being with feelings
 
Philbo King's Avatar
 
Join Date: May 2017
Posts: 3,204
Default

Ok.

New Single-track project.

FX Chain:
JS: Tone Generator, set to 500 Hz
JS: Frequency Spectrum Analyzer, set to 8192 point FFT (BEFORE image, on the left)
JS: Saturation, Amount slider set to 100%
JS: Frequency Spectrum Analyzer, set to 8192 point FFT (AFTER image, on the right)
All other plugin settings at Default

Image link:
https://imgur.com/bwqojIT

Those little spikes to the right in the AFTER image:
Harmonics created by the waveform distortion of JS:Saturation
The first spike: 3rd harmonic of the fundamental tone (1500 Hz = 500 Hz x 3)
The second spike: 5th harmonic (500 x 5)

My last contribution to this thread...
__________________
Tangent Studio - Philbo King
www.soundclick.com/philboking - Audio streams

Last edited by Philbo King; 05-24-2022 at 12:19 PM.
Philbo King is offline   Reply With Quote
Old 05-23-2022, 04:31 PM   #16
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,293
Default

What part of "artifact of analysis" are you not getting? Look at the actual waveforms. That's what's really happening.

Try to reconstruct that exact waveform by adding harmonics. You'll find it's not so easy.

Better yet try that same test with a triangle wave input. You'll see that it starts to look more like a sine wave and actually loses harmonics.

Last edited by ashcat_lt; 05-23-2022 at 04:43 PM.
ashcat_lt is offline   Reply With Quote
Old 05-24-2022, 09:24 AM   #17
Held
Human being with feelings
 
Held's Avatar
 
Join Date: Nov 2019
Posts: 540
Default

Quote:
Originally Posted by Philbo King View Post
An equivalent viewpoint:
Compression is a form of distortion. Because (above the threshold) what comes out is not equal to what went in. This is the very definition of distortion.

Any type of distortion adds harmonics to a signal.
According to your definition, filtering is also distortion which removes harmonics from a signal. If smooth out a square wave and turn it into a sine-wave, you're removing harmonics.

There's also distortion that adds inharmonic partials.

Saturation, on the other hand, is a special type of distortion that adds harmonics to a signal.

Quote:
Originally Posted by ashcat_lt View Post
Try to reconstruct that exact waveform by adding harmonics. You'll find it's not so easy.
That's pretty easy (if you consider FFT easy, that is). Additive synthesis works like that. You define a bunch of partials (and their phase) and get a wave as a result.

Checkout Vital's wavetable editor where you can modify the partials and see the wave shape update in real-time.
Held is offline   Reply With Quote
Old 05-24-2022, 09:57 AM   #18
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,239
Default

Ah yes, time domain, frequency domain, what's you main domain Jane ?

As for me, I'm outta here, I gotta catch a train

Minimum phase, excessive phase, ain't got nuttin' to do with the music I plays
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote
Old 05-24-2022, 03:16 PM   #19
bucca
Human being with feelings
 
bucca's Avatar
 
Join Date: Mar 2016
Location: near my POB
Posts: 388
Default

Quote:
Originally Posted by matt_t View Post
(Sorry about all the (((brackets)))!)

you may need a brackxit.
__________________
who's gonna water my plants ... if not you
bucca is offline   Reply With Quote
Old 05-24-2022, 03:19 PM   #20
matt_t
Human being with feelings
 
Join Date: Nov 2012
Location: West Midlands, UK
Posts: 379
Default

Quote:
Originally Posted by bucca View Post
you may need a brackxit.
Ha ha! But I voted remain
matt_t is offline   Reply With Quote
Old 05-24-2022, 05:14 PM   #21
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,293
Default

Quote:
Originally Posted by Held View Post
That's pretty easy (if you consider FFT easy, that is).
CPU-wise this is not actually easy, especially if you seek to minimize such things as preringing and other artifacts of FFT processes. You have to analyze the original waveform and create an approximation of that. Then you have to synthesize an entire set of harmonics, mix that all together, and then try to combine that all back together through a finite number of sine and cosine generators. To do it well induces latency and requires a bunch of code and a bunch of ticks.

And it's not how anything rational does it. It's definitely not what happens when you overdrive an analog gain stage, and it's frankly not what most saturation algorithms are doing under the hood. Straight waveshaping is all a basic analog amplifier ever does. Even a very complex anti-aliased transfer curve is easier to code, more efficient on the CPU, and always more accurate and better sounding than anything additive can be.
ashcat_lt is offline   Reply With Quote
Old 05-25-2022, 04:58 PM   #22
bucca
Human being with feelings
 
bucca's Avatar
 
Join Date: Mar 2016
Location: near my POB
Posts: 388
Default

Quote:
Originally Posted by matt_t View Post
Ha ha! But I voted remain
so matt, my mum was from the tullamore area. my dad from the european main land. i used to be facing brexit everyday, since 1953.
https://www.youtube.com/watch?v=4h0J6VrHuQE
hf listening
__________________
who's gonna water my plants ... if not you
bucca is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:59 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.