Skip to content

obs-filters: Add compressor gain reduction meter - #13737

Closed
briannicholls wants to merge 1 commit into
obsproject:masterfrom
briannicholls:add_gain_reduction_meter
Closed

obs-filters: Add compressor gain reduction meter#13737
briannicholls wants to merge 1 commit into
obsproject:masterfrom
briannicholls:add_gain_reduction_meter

Conversation

@briannicholls

Copy link
Copy Markdown

Description

Adds a real-time gain reduction meter for the Compressor filter.

The compressor already computed applied gain per sample but never exposed it. This PR:

  • Tracks the strongest gain reduction in each audio block and exposes it via a get_gain_reduction proc handler
  • Shows a horizontal meter and live dB readout above the compressor properties in the Filters dialog
  • Draws a short peak-hold tick on the bar

This should be able to be applied to other dynamics filters as well.

image

Motivation and Context

Speaking as a professional audio engineer for over 15 years, this is a standard feature on all compressors. Without gain reduction feedback, the compressor must be tuned by ear alone, which is neither accurate nor intuitive. Output level meters don’t show how much reduction is actually being applied. This has come up from users before, e.g. forum and ideas.

How Has This Been Tested?

  • Built from source on Windows 11 (windows-x64 )
  • Works as expected in filters / UI. Reduction changed as expected with threshold/ratio changes
  • Switching to another filter hid the meter; selecting Compressor again brought it back
  • Disabling the compressor returns the meter to idle

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Expose applied gain reduction from the compressor and show a
live meter in the Filters dialog so users can tune by eye.
@WizardCM

WizardCM commented Aug 2, 2026

Copy link
Copy Markdown
Member

Hmm, generally I'd expect the reduction to be visualised from the right/top of the bar, not the left/bottom. At least personally.

Additionally, I believe it's preferred that new Qt widgets are constructed using .ui files rather than manual C++. Obviously, functionality like custom paint would be done in code.

@Warchamp7

Copy link
Copy Markdown
Member

This appears at first glance to be AI created/assisted which goes against our contribution guidelines. There are a variety of snippets that also do not conform to our codestyle rules.

Even in the case that it is not however, on merit alone this is still being hacked into the properties UI in this current implementation. The properties API is simply not designed for describing bespoke UI elements like this. Any such functionality would need to start with a proper architectural change to allow this.

@briannicholls

Copy link
Copy Markdown
Author

Well it's more effort than anyone else has made to get this very basic and expected feature into the app. I give up, maybe someone else can take up the reigns

@Warchamp7 Warchamp7 closed this Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants