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

why there is always gain reduction? #106

Open
geextahslex opened this issue Sep 26, 2024 · 1 comment
Open

why there is always gain reduction? #106

geextahslex opened this issue Sep 26, 2024 · 1 comment

Comments

@geextahslex
Copy link

geextahslex commented Sep 26, 2024

Hi, can someone explain why this is necessary? Why making the song faster or slower causes clipping and then need gain reduction which is most of the time at the maximum at 0.75?

When I use --ignore-clipping and then check the file inside Cubase, then there is no clipping visible. So I don't understand this behaviour.

Thank you :)

@cannam
Copy link
Member

cannam commented Sep 30, 2024

Because the stretcher works by adjusting phases of the frequency components separately from one another, it can easily end up adjusting some components for an additive effect in the output (or the opposite - the output signal level can vary both up and down somewhat independent of the perceived volume).

The stretcher itself doesn't do anything about this - it just leaves it up to the caller to decide whether it matters and, if so, what to do about it. But in the command-line tool, when the input and output are both encoded into a fixed range (as with PCM WAV files), this can result in clipping, so the tool takes the simplistic approach of reducing the gain and restarting.

Because the command-line tool exports to a fixed-range (PCM24) WAV, the exported file will already be clipped - any values out of range will be clamped into range on export. So on inspection you may see "flat tops" but you won't see any out-of-range values.

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

No branches or pull requests

2 participants