Skip to content

Autogain: please use LSP Autogain plug-in #5418

Open

Description

@LebedevRI

The autogain effect currently has no Lookahead parameter, as far as i can see.
Which means that previous [-window; 0] samples are used to decide
what the gain should be for the current sample.
(Am i understanding this correctly?)

I would like for the effect to support the traditional sidechain Lookahead behaviour,
like e.g. in LSP Compressor, so that the actual position of the sample window used
can be configured.

I.e. with Short-Term being 400ms (at least that is what the spec says it is?)

  • lookahead = 0ms means that last 400ms of audio are used, the current behaviour
  • lookahead = 400ms means that the next 400ms of audio are used
  • lookahead = 200ms means that the last 200ms and next 200ms of audio are used

I'm not sure what should the upper limit be on Lookahead,
but please don't make the LSP's mistake of introducing arbitrary low limits :)
It should be at least 400ms :)

Does this make sense?

Thank you!

Activity

  1. wwmm commented on Oct 22, 2026

    @wwmm
    Owner

    lookahead = 400ms means that the next 400ms of audio are used

    Hum... I am not sure that is what is going to happen. Right now we update the gain every time a new audio buffer arrives. But we have no control over libebur128 internal calculation. It decides on its own the amount of buffers it takes into account.

  2. LebedevRI commented on Oct 22, 2026

    @LebedevRI
    ContributorAuthor

    Hmm. Also, can't you just use LSP's Autogain? Then everything would just work...

  3. wwmm commented on Oct 22, 2026

    @wwmm
    Owner

    2. Hmm. Also, can't you just use LSP's Autogain? Then everything would just work...

    I prefer how this works. It is honestly totally fine for my needs.

  4. LebedevRI commented on Oct 22, 2026

    @LebedevRI
    ContributorAuthor

    Thanks for feedback!

    Right now we update the gain every time a new audio buffer arrives.

    Oh wow, now that i actually look, Autogain is a completely homebrewn effect,
    and gain is not smooth but computed once per buffer? Wow.
    Now i really think this should just use LSP Autogain :/

  5. wwmm commented on Oct 23, 2026

    @wwmm
    Owner

    Now i really think this should just use LSP Autogain :/

    It really depends on what is the intended use case. I wrote this autogain so I did not have to touch my desktop volume control. And it does that just fine.

  6. changed the title [-]Autogain: lookahead question/feature request[/-] [+]Autogain: please use `LSP Autogain` plug-in[/+] on Oct 31, 2026
  7. LebedevRI commented on Nov 3, 2026

    @LebedevRI
    ContributorAuthor

    This is purely functionality driven request for me

    • There's lookahead support
    • Can be configured to act as a compressor only (max gain = 0)
    • Smooth gain adjustment, not once per window unlike EE Autogain
    • I think there are bugs in the EE Autogain, it doesn't really want to work with Target = 0 dB

    That being said, i'm hoping lsp-plugins/lsp-plugins#633 will be resolved,
    since there's a few unfortunate shortcomings in the current LSP Autogain.

    Is there a principial reason to avoid LSP Autogain?

  8. wwmm commented on Nov 4, 2026

    @wwmm
    Owner

    Is there a principial reason to avoid LSP Autogain?

    The controls are different. And a result usability will also be. In almost all of the cases I use our current autogain plugin it is a matter of throwing it there and forgetting. The one from LSP has more controls and as it happens with all its plugins more thought has to be done when adjusting them.

    I doubt one plugin can replace the other because they attempt to achieve autogain with slightly different approaches. What we maybe should do is providing both.

  9. LebedevRI commented on Nov 8, 2026

    @LebedevRI
    ContributorAuthor

    I don't disagree that they are different and can't 1:1 replace each another.

    What we maybe should do is providing both.

    I suppose that is my question - would that be an acceptable solution/outcome?

  10. wwmm commented on Nov 8, 2026

    @wwmm
    Owner

    I suppose that is my question - would that be an acceptable solution/outcome?

    Although I usually avoid this it would not be the end of the world. We just have to name the one from LSP in a slightly different way so we do not have two plugins named exactly as "autogain"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址