FR: dsp::Compressor get gain / reduction amount

As far as I can tell there is no function to querry the current gain value (or inverted gain / reduction amount)
of the compressor?

This would be very handy for drawing a compressor GUI and see if it’s currently working and to which extent.

as a workaround, can you compare your buffer’s RMS or magnitude prior to compressing and after compressing? would that give you some kind of value you could use to report the compression amount to the user?

yes thought about that. That’s a possibility!
Another possibility would to change the compressor class myself and just add a getter function for the current gain variable used to reduce the sample.

But maybe its something many people need so it could be just a feature for the class, similar to the great “getMagnitudeForFrequency” with the juce filters, which makes drawing EQ Gui’s so much easier <3


Another great feature would be some getter functions, Like getThreshhold(), getRatio() etc.
Compare it for example with the new dsp::DelayLine which has a set and get function.

The compressor is missing some quality of life features imo, which should be pretty easy to implement :slight_smile:


Bump - and agreed!