Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugins/obs-filters, UI: Add support for N sidechain ducking sources for the compressor filter #11161

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Avuxo
Copy link

@Avuxo Avuxo commented Aug 21, 2024

Description

This patch adds in the ability to use N ducking sources in the compressor filter.

Motivation and Context

In broadcasting settings, there are often times when you have more than one ducking source into a compressor. A common example is multiple commentators commenting over a background audio track. Right now this requires expensive extra steps involved in the pipeline. Further, this is a much more obvious solution requiring less tinkering.

How Has This Been Tested?

This has been tested in the following way:

  1. create a compression target media source with the following params:
    i. threshold at min and release at max to make the effect obvious
  2. Create 1 input source, then 2, then 3, then 4 and for each:
    i. Add it as a compression sidechain source to compression target
    ii. mute and unmute each individually, then all together
    iii. Pause and unpause each individually then all together.

The effect should be very obvious in the levels view if threshold is set at minimum and release at maximum.
For best effect, use both ducking sources and target with constant audio peaking the level of its given channel.

Tested on macOS (Apple silicon 14.5) and Windows 11 (x86_64)

Types of changes

New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

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

@WizardCM WizardCM added New Feature New feature or plugin UI/UX Anything to do with changes or additions to UI/UX elements. Request for Comments More feedback & discussion is requested labels Aug 21, 2024
@Avuxo Avuxo force-pushed the multichain-2 branch 2 times, most recently from f3841f1 to 361787d Compare October 18, 2024 03:11
@Warchamp7
Copy link
Member

The PR and commit title currently don't adhere to our contribution guidelines. Can you also add screenshots or a video showing the changed behaviour here?

As it stands I'm currently leaning towards closing this as advanced audio control of this manner is something we generally feel is better left to dedicated audio software or hardware.

@Avuxo Avuxo changed the title Add support for N sidechain ducking sources for the compressor filter plugins: Add support for N sidechain ducking sources for the compressor filter Nov 19, 2024
@Avuxo
Copy link
Author

Avuxo commented Nov 19, 2024

@Warchamp7
Thank you for the comment.

Regarding the behavioral change, I have added an editable list of sources to the compressor filter such that you can have as many sidechain/ducking sources as you want. In short, this means that you can have any number of sources that can independently trigger the compressor. Other than the number of possible sources of compression now being higher, the actual behavior is identical to before.

Consider a sports broadcast where you might have two or three sports commentators speaking over game audio. In this case, you want to apply compression to the game audio when any of the sports commentators activates their mic over a certain threshold. This is our use case for OBS.
image

I would argue that this is, regardless of lines changed, a relatively minor behavioral change to the compressor filter and fits within the purview of OBS itself. Rather than being a drop-down, it is now an editable list from which you can select up to N sidechain/ducking sources (triggers) for compression.

I apologize for mistakes in the title or commit history. I will promptly address any concerns

@Avuxo
Copy link
Author

Avuxo commented Nov 19, 2024

I have updated the commit headings to hopefully be within guidelines. I apologize.

@Avuxo Avuxo changed the title plugins: Add support for N sidechain ducking sources for the compressor filter plugins/obs-filters, UI: Add support for N sidechain ducking sources for the compressor filter Nov 19, 2024
@kakra
Copy link

kakra commented Nov 19, 2024

Consider a sports broadcast where you might have two or three sports commentators speaking over game audio

I'd very much appreciate if this would be merged. Another very common use-case would be having speakers in Discord live on your stream. Currently I can only use my mic as a ducking source. Routing this through external software - at least on Linux - is cumbersome and adds latency. Buying external hardware for that is a little bit of overkill. It's a simple change with great benefits. If one argues to not bother with multisource sidechain ducking, you'd better not bother with it at all.

Slightly off-topic: Another more flexible approach would probably be a plugin which can combine multiple audio sources into a single virtual audio source, similar to how you can use scenes nested inside scenes - but apparently, the latter wouldn't make multiple audio sources into a single scene audio source. I don't really understand this: You can apply a single video filter to a whole scene, but audio tracks stay as individual sources... So this PR is a good compromise to add the most common use-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Feature New feature or plugin Request for Comments More feedback & discussion is requested UI/UX Anything to do with changes or additions to UI/UX elements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants