RMS in compressors; how is period of time determined?
-
- KVRAF
- Topic Starter
- 2470 posts since 15 Apr, 2004 from Capital City, UK
I've just been reading up on RMS, tried prototyping something in a modular environment.. and then I considered this:
When designing compressors which respond to the RMS of the signal, how do you decide how much time to RMS before the volume is altered?
I just wonder, I've not seen a compressor plugin which gives me the option to change the window over which the RMS is calcluated. It seems like it might be an interesting value to be able to change.
It feels like a dumb question, but I really can't tell.
When designing compressors which respond to the RMS of the signal, how do you decide how much time to RMS before the volume is altered?
I just wonder, I've not seen a compressor plugin which gives me the option to change the window over which the RMS is calcluated. It seems like it might be an interesting value to be able to change.
It feels like a dumb question, but I really can't tell.
- KVRian
- 698 posts since 7 Dec, 2009 from GWB
Blue Cat Dynamics?
Klanghelm DC8C3?
Klanghelm DC8C3?
- KVRAF
- 15273 posts since 8 Mar, 2005 from Utrecht, Holland
We are the KVR collective. Resistance is futile. You will be assimilated.
My MusicCalc is served over https!!
My MusicCalc is served over https!!
- KVRian
- 872 posts since 6 Aug, 2005 from England
You know the sample rate, so you can calculate the number of samples you need to count in...
Dave Hoskins. http://www.quikquak.com
- KVRist
- 415 posts since 3 Jun, 2017
They do exist, for example the free ReaComp. And yes, you're right, it really is an interesting feature to have. Not always useful, but also not always in the way. As quikquak pointed out, you know the samplerate which tells you how many samples pass through per second. Divide the samplerate by 1000 (or better multiply by 0.001) and you get the number of samples passing through per millisecond. From there on it's essentially just resizing and iterating a for loop. Changing the RMS window timing boils down to just that, resizing the loop limit.CinningBao wrote: ↑Wed Oct 10, 2018 12:27 am I've not seen a compressor plugin which gives me the option to change the window over which the RMS is calcluated.
Confucamus.
-
- KVRAF
- Topic Starter
- 2470 posts since 15 Apr, 2004 from Capital City, UK
I'm not trying to be rude, but I'm not thick.
You misunderstand the question.. I was asking _why_ choose .. half a second.. or 300 ms? Or any period of time! Does music at 120 bpm suit an RMS of 250ms? I was hoping to start a discussion.. but it seems to have failed.
-
- KVRAF
- Topic Starter
- 2470 posts since 15 Apr, 2004 from Capital City, UK
Maybe I should have mentioned that I'm not a complete spid and do understand how to math a little bit..Rockatansky wrote: ↑Wed Oct 10, 2018 7:02 amThey do exist, for example the free ReaComp. And yes, you're right, it really is an interesting feature to have. Not always useful, but also not always in the way. As quikquak pointed out, you know the samplerate which tells you how many samples pass through per second. Divide the samplerate by 1000 (or better multiply by 0.001) and you get the number of samples passing through per millisecond. From there on it's essentially just resizing and iterating a for loop. Changing the RMS window timing boils down to just that, resizing the loop limit.CinningBao wrote: ↑Wed Oct 10, 2018 12:27 am I've not seen a compressor plugin which gives me the option to change the window over which the RMS is calcluated.
Ok, yes, folks have pointed out Blue Cat and some other manufacturers do offer RMS window adjustment - I'm not much of a compressor whore so I guess that's my failing.
But those compressors with a fixed RMS, how do developers choose how big the window should be?
I guess I'm also asking how non-IC technology handles the window of time. Analogue doesn't work in samples.. so is RMS not something which can work in old-school pre-transistor circuits? That question might be for another forum..
-
- KVRian
- 688 posts since 17 Sep, 2007 from Planet Thanet
-
- KVRAF
- Topic Starter
- 2470 posts since 15 Apr, 2004 from Capital City, UK
- KVRian
- 872 posts since 6 Aug, 2005 from England
The question "how is period of time determined?" was misunderstood, sorry.
Dave Hoskins. http://www.quikquak.com
-
- KVRAF
- Topic Starter
- 2470 posts since 15 Apr, 2004 from Capital City, UK
-
- KVRAF
- 3080 posts since 17 Apr, 2005 from S.E. TN
If I say some things you already know please don't panic.CinningBao wrote: ↑Wed Oct 10, 2018 8:33 am But those compressors with a fixed RMS, how do developers choose how big the window should be?
I guess I'm also asking how non-IC technology handles the window of time. Analogue doesn't work in samples.. so is RMS not something which can work in old-school pre-transistor circuits? That question might be for another forum..
The RMS is:
1. Square the signal
2. Average (take the arithmetic mean) of the squared signal
3. Take the Square Root of the Mean to get RMS amplitude
The Mean of the Squared Signal is power. Power is 10 * Log10(Level) and Amplitude is 20 * Log10(Level). Therefore for a dynamics processor or meter plugin, the final square root may not be necessary. You can sometimes figure the level to display on a meter or the amount of dynamics to apply based on the power measurement, making the final square root unnecessary.
You can take the mean by averaging an n-length window of samples: add n samples then divide the sum by n. You can also get the mean by applying a lowpass filter of some kind. In fact, an averaged window of samples is a lowpass filter sometimes called a Box FIR filter. A Box filter is sometimes "as good as it gets" for some tasks but for many purposes is not a very "sharp" filter.
Some analog dynamics processors used as simple as first-order analog lowpass filters to perform the arithmetic mean, and fancier analog dynamics processors used fancier analog filter networks.
Though the following applies to any dynamics processor, lets consider compressors-- If you feed a pure sine wave into the envelope detector but the envelope smoother is not "perfect" then the envelope output will be a DC level with a sine wave riding on-top of the DC level. That signal leaking thru on-top of the envelope DC output is often called ripple. When you modulate the level of the input sine wave with that DC signal with ripple riding on-top, then the ripple will distort the shape of the input sine wave, and the output sine wave will have added distortion harmonics. This is called intermodulation distortion.
In the case of more complex audio, single instruments with real-world higher harmonic content or polyphonic instruments or full mixes, any ripple in the control signal causes everything (that leaks thru in the ripple) to modulate each and every harmonic of the input signal, which can cause rather nasty distorted output.
If you don't want the bass intermodulating the carp out of bass, mids and highs, you have to figure some way to smooth the bass ripple as good possible. There is a linkage between time and frequency and "nearly always" if you want to heavily smooth low frequencies you have to use long time constants, which results in slow envelopes. So a short/fast envelope will typically allow more low frequency ripple and more intermodulation distortion. Contrariwise, a long/slow envelope can have low IM distortion but rather slow in tracking rapid changes in the music.
If using a simple "not very sharp" filter such as an arithmetic mean box FIR filter or a 1st or 2nd order analog or IIR lowpass filter, you need real long time constants to minimize intermodulation distortion. 100 ms or much longer, to really clean out the bass ripple and bass IM, if using "not very sharp" simple filters.
The "fancy design work" in envelope designs is trying as good possible to fool mother nature and somehow get fast envelopes which are also smooth.
-
- KVRist
- 110 posts since 8 Jan, 2018
Trial and error is one method. I think I read some take a look at outboard, try to measure it and compare to their own implementation to find the "right" length.CinningBao wrote: ↑Wed Oct 10, 2018 12:27 amhow do you decide how much time to RMS before the volume is altered?
I'd also simply go by ear, what gives the expected results or how it behaves if the rms window gets altered. Maybe that way you find a sweetspot fitting fast, slow or dynamic material. Or you recognize a pattern which can be setup with adapting rms windows.
But I never read in a compressor manual that it follows some standard. Even in metering a good rms meter has an adjustable rms length. That is another option: take a look at the loudness standard like EBU. It defines how to measure for loudness, maybe you can adapt that for compressor rms.
- KVRAF
- 3187 posts since 31 Dec, 2004 from People's Republic of Minnesota
Dmg Compassion allows this as well.Rockatansky wrote: ↑Wed Oct 10, 2018 7:02 amThey do exist, for example the free ReaComp. And yes, you're right, it really is an interesting feature to have. Not always useful, but also not always in the way. As quikquak pointed out, you know the samplerate which tells you how many samples pass through per second. Divide the samplerate by 1000 (or better multiply by 0.001) and you get the number of samples passing through per millisecond. From there on it's essentially just resizing and iterating a for loop. Changing the RMS window timing boils down to just that, resizing the loop limit.CinningBao wrote: ↑Wed Oct 10, 2018 12:27 am I've not seen a compressor plugin which gives me the option to change the window over which the RMS is calcluated.
-
- KVRAF
- Topic Starter
- 2470 posts since 15 Apr, 2004 from Capital City, UK
Aaaaaah, now THAT makes sense! Thanks JCJR
And I look at what you've said, about how hard it is respond to both low and high frequency material without compromising, and wonder if splitting the signal up and using clever maths to work out how to combine the outputs to create a more responsive envelope. Is that reasonable? Do developers already do it?
And I look at what you've said, about how hard it is respond to both low and high frequency material without compromising, and wonder if splitting the signal up and using clever maths to work out how to combine the outputs to create a more responsive envelope. Is that reasonable? Do developers already do it?