Continuous Frequency Compressor (CFC) questions

Jay_N2MGA
Posts: 15
Joined: Sun Apr 09, 2017 5:26 pm

Continuous Frequency Compressor (CFC) questions

Postby Jay_N2MGA » Tue Oct 31, 2017 11:41 pm

Hello, can anyone point me in the right direction to find more information on what the CFC sliders are doing for the individual frequency bands? I can certainly hear a difference when making changes to the sliders and their associated frequencies. But, normally when I work with a typical compressor and/or limiter I have access to controls for timing constants like attack time, release time, hold time, decay time and so forth along with various levels like threshold, gain reduction, makeup or output gain, (compression ratio) among others.

I was not very successful in my search of this and other forums and prior to trying and reverse engineer any of the code I wanted to reach out to anyone that may be able to provide a URL or such location for some good reading on the CFC audio tools.

Thanks in advance for any and all information you can share!

Jay
n2mga
User avatar
w-u-2-o
Posts: 5539
Joined: Fri Mar 10, 2017 1:47 pm

Re: Continuous Frequency Compressor (CFC) questions

Postby w-u-2-o » Wed Nov 01, 2017 1:19 am

All good questions, Jay. We are going to need the author, Warren, to answer them.

Obviously the attack/release/hold times are fixed and not adjustable.

The CFC is quite a bit different than the typical multi-band compressor. It is actually individually processing many hundreds of bands, the settings for which are interpolated based on the slider adjustments. I had suggested just doing a 10 band compressor, but Warren wanted to do something different and unique.

73,

Scott
Warren_NR0V
Posts: 10
Joined: Sun Apr 09, 2017 9:59 pm

Re: Continuous Frequency Compressor (CFC) questions

Postby Warren_NR0V » Wed Nov 01, 2017 2:34 am

Hi Jay,

Some information can be found in the release notes:
<https://github.com/TAPR/OpenHPSDR-PowerSDR/blob/master/ReleaseNotes.md>
Scroll down to the 3.4.1 release.

However, I'll explain a bit more here. The traditional approach to multi-band compressors uses filters to separate the frequency spectrum into some number of segments, processes those segments individually, and then adds them back together. The approach used in the CFC takes that a step farther by using an FFT to separate the spectrum into overlapping segments that are only a few Hertz wide. The signal amplitude in each FFT bin is then examined and, based upon that amplitude, an appropriate amount of non-linear compression is applied to each bin. Following that, an inverse FFT is done to get back to time-domain samples. The sliders do NOT specify an amount of compression to be applied to a "band", they specify the amount of compression to be applied at particular frequencies. Then, in between the frequencies of the sliders, the amount of compression to apply is interpolated.

OK, in the interest of full disclosure, I should say that it's not quite as simple as I've described above. It turns out that one cannot apply variable non-linear gains on a bin-by-bin basis without creating serious artifacts. So, this algorithm is "wrapped" in a weighted overlap-add algorithm to avoid that.

There is some time-averaging of bin values is determining the compression to be applied to each bin due to the FFT itself and due to the weighted overlap-add wrapper. However, one can view the compression level for each bin as being close to instantaneous. I.e., this is not the same as an algorithm incorporating attack and decay times. It is possible to implement attack and decay times on a bin-by-bin basis and I've considered that. I'm not pursuing it at this point as the feedback has been very positive on the current implementation. However, I suspect that the adjustment procedure and the user "feel" of this approach is quite a bit different than a traditional multi-band compressor.

Hope that helps.

73,
Warren NR0V
Jay_N2MGA
Posts: 15
Joined: Sun Apr 09, 2017 5:26 pm

Re: Continuous Frequency Compressor (CFC) questions

Postby Jay_N2MGA » Wed Nov 01, 2017 6:54 pm

Hi Warren, this is good stuff, thank you for Replying. I did see the release notes prior to my posting and very much appreciate you taking the time to further the explanations.

Another question for you; how easy would it be to use the same methodology of the CFC routines to create a CFL (continuous frequency limiter)?

Ok on the instantaneous action of the individual compression levels. It might be an interesting experiment to incorporate the aforementioned time constants, the effect of which would perhaps in theory introduce some smoothing out characteristics although i'm not too sure this would be the intended outcome. But as you stated the "FFT bin" approach is very much different than the traditional counterpart and does indeed work very well!

jay
n2mga
Warren_NR0V
Posts: 10
Joined: Sun Apr 09, 2017 9:59 pm

Re: Continuous Frequency Compressor (CFC) questions

Postby Warren_NR0V » Wed Nov 22, 2017 12:11 am

Hi Jay,

You ask an interesting question and one with a somewhat complicated answer. In some sense the current implementation is already a CFL in that there is a hard-limit that is carefully and gradually imposed on a bin-by-bin basis. However, this must be considered along with two other factors, the first minor and the second in some sense major.

The first is that when one performs an FFT on, for example, a signal that is simply a fixed frequency carrier, unless that carrier is exactly centered within a frequency bin, its energy does not end up in a single bin -- some component ends up in EACH bin. The amount of spreading is controlled by what type (if any) "window function" that has been applied to the time-domain samples. I use a window function that keeps the spread minimized. (This is somewhat analogous to the situation with a multi-band compressor where the bands meet and overlap.) In any case, when the inverse FFT is done, the energy is all properly collected and the time-domain signal can be properly reconstructed.

The second factor, for some purposes more significant, is that when we're working on a bin-by-bin (or band-by-band) basis, we do not see the entire signal amplitude until the bins (or bands) are are "added" back together into a single signal. Therefore, we have no means to limit the amplitude of the entire signal. For this reason, a time-domain limiter that looks at the entire signal is still required. In my WDSP software, both the basic compressor and, especially, the ALC perform this function. The ALC employs attack and decay time constants in its processing.

73,
Warren NR0V
Thierry
Posts: 13
Joined: Sun Dec 10, 2017 7:52 pm

Re: Continuous Frequency Compressor (CFC) questions

Postby Thierry » Thu Dec 14, 2017 6:13 am

Hello,

Good example of FFT process with a French broadcast FM processor... ;)

http://www.idt-fr.com/en/dvp_fonct.php


73,

Thierry F4FPQ

Return to “PowerSDR mRX”