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

Feature Request: Support for Target Level Normalization #176

Open
LarocheC opened this issue Apr 8, 2024 · 1 comment
Open

Feature Request: Support for Target Level Normalization #176

LarocheC opened this issue Apr 8, 2024 · 1 comment

Comments

@LarocheC
Copy link

LarocheC commented Apr 8, 2024

Feature Description

I propose the addition of an target level normalization augmentation to the torch-audiomentations library. This feature would analyze an audio signal's average power and adjust its gain to normalize the signal to a target RMS level.

Current Limitations

While the library currently supports peak normalization and gain adjustments, these methods do not directly allow setting a specific RMS across audio signals. Gain adjustments without explicit RMS targeting can result in inaccurate loudness levels especially those with large dynamic ranges.

Potential Implementation

An RMS normalization feature would provide a more accurate way to achieve a set level across different audio signals. Considering the function already available in the library. It would be similar to the gain augmentation. The actual gain would be a function of the signal current level and of the target RMS value.

Considerations for Preventing Clipping

When setting high levels, clipping can occur if the signal's peak amplitude exceeds the system's maximum representable limit, leading to distortion. To prevent this issue, we could take into consideration the crest factor for different types of signals.

I believe this would enhance the library's utility for audio processing and production tasks. Thank you for considering this proposal. I look forward to discussing it further and am open to contributing to its implementation.

@LarocheC LarocheC changed the title Feature Request: Support for RMS Level Normalization Feature Request: Support for Target Level Normalization Apr 8, 2024
@iver56
Copy link
Collaborator

iver56 commented Apr 8, 2024

Thanks for the feature request

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