[Feature Request] Volume improvements -- Loudness normalization
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 2.8k
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
Volume levels vary between sources/songs. When this is encountered, the volume level must be adjusted periodically for each user in some cases. This is tiresome and can be managed programmatically.
**Describe the solution you'd like**
Some form of level normalization to be implemented so that the average loudness of each song is similar, eliminating the need for periodic fiddling of the bot's volume on each client's end.
**Describe the basic flow/steps of using this feature**
How this feature would be used:
1. Configure desired loudness in the bot's config file, and/or via a command in Discord directly to make global adjustments.
1a. This value could be either a percentage (easier to understand -- 100% = no gain adjustment, plus or minus to amplify or attenuate, respectively) or direct values in dB/LUFS (more difficult to understand for the average user).
2. A quick initial pass through the cached song prior to playback would be necessary to determine the average loudness for any gain adjustments.
3. Gain adjustment is made to bring average loudness to the desired target and playback begins. This would likely be an internal adjustment on the bot's end within the playback chain itself and completely transparent to the end user.
**Additional context**
https://en.wikipedia.org/wiki/Audio_normalization#Loudness_normalization
Average normalization is generally more suitable for this purpose than peak normalization, as the dynamic range of songs vary considerably and some are "peakier" than others.
**Have you confirmed that this idea is not already described here?**
https://github.com/jagrosh/MusicBot/projects/1
I saw a couple volume-related enhancements here, but nothing pertaining to dynamic level normalization.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are identified in the issue. Start by locating the configuration, Discord command handling, and playback chain, then determine how cached songs can be analyzed before playback; done means configurable loudness normalization reliably adjusts gain toward the selected target.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- audio-video-rtc
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100