## dynamic compressor question

shaikath
Posts: 14
Joined: Wed Oct 28, 2020 4:12 pm

### dynamic compressor question

Hello, I was wondering if you could share more details on how exactly the FFT bins are grouped together into frequency bands for the level detector stage of the dynamic compressor plugin? Is it accurate to assume that the bins are grouped into logarithmically spaced bands? It would be great if you might be able to provide more detail onto how this is done as it seems the level detection could be influenced by this grouping.

paulmaanen
Posts: 7
Joined: Fri Jul 19, 2019 9:10 am

### Re: dynamic compressor question

For dynamic compression in STFT domain, the STFT bins are assigned to frequency bands by a fftfilterbank.

We have two different plugins that can do this, these are named "fftfilterbank" and "multibandcompressor". Both use the same underlying fftfilterbank implementation.

Please refer to the documentation of these plugins in our openMHA plugin manual for a detailed description how the filter shapes are generated. Plugin manual is available from here: http://www.openmha.org/documentation/

Notice from the table of plugin variables that it is possible to retrieve and inspect the exact filter shapes that these plugins have generated from your filterbank settings by reading the monitor variable "shapes" which is present in both plugins.

shaikath
Posts: 14
Joined: Wed Oct 28, 2020 4:12 pm

### Re: dynamic compressor question

Thanks Paul. Thats very helpful and I clearly understand how to interpret the center and edge frequencies generated based on the specified filterbank settings. Can you elaborate a bit more on how to interpret the "shapes" variable? Does the shapes specify if the filter shapes are rectangular in the attached image?
Attachments
FFTShape.png (52.4 KiB) Viewed 115 times

tobiasherzke
Posts: 56
Joined: Mon Jun 24, 2019 12:51 pm

### Re: dynamic compressor question

Each entry in the shapes matrix is a weight factor with which each STFT bin is mapped to each band. For rectangular filters, you will see mostly ones and zeros. I suggest plotting the shapes with Matlab or octave to inspect the shapes:

Code: Select all

mesh(mha_get(mhahandle,'path.to.fftfilterbank.shapes'))
(Adapt path.to.fftfilterbank and mhahandle as needed.)
Alternatively, use "imagesc" or "plot" or some other function to inspect the shapes instead of "mesh".