-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
replaygain: albumpeak on large collections is calculated as average, not maximum #3008
Comments
Do you think you could please fill out the issue template so we can get a bit more information about your setup? |
I don't think so. I don't have an album with more than 5000 titles. I was reasoning how to refactor the inner part of the for loop to reuse it while making the code run multiple replaygain encoders in parallel. |
Got it; yes, that does pretty much look like a bug! Would you mind opening a pull request to see how the tests do? |
I can fix albumpeak but not albumgain. In the meantime I did a test:
This clearly shows that albumpeak is the max but albumgain is not the average |
Hmm. I’m not sure what I’m supposed to be looking for in the example. Are you suggesting that we shouldn’t be averaging the gain? While that may not be ideal, we might not have any other option if there’s no clear way to combine separate measurements. |
Sorry, that was unclear. I would remove the whole block to prefer correctness over usability cough better to crash with many titles in one 'album' than to have the wrong gain. But I am not sure what beets prefers, also I don't like album mode anyways |
Got it; thank you for explaining! Maybe one course of action would be look at that tool’s source to see how it does things. For example, it’s plausible that it uses a geometric or harmonic mean instead of the simple arithmetic mean—since those numbers are decibels (right?), which follow a logarithmic scale, one of those averages might be more appropriate anyway. |
Yeah, that's how I would expect it. I'm sorry to say I won't do that. I don't have enough time for that and I don't use album mode |
OK; thanks for the fix on the maximum value. I’ll close this issue for now; if anyone wants to dig into the gain averaging, they can open a new one. |
Problem
while working on parallelizing the replaygain command I found
beets/beetsplug/replaygain.py:202
this averages the album gain and album peak but the peak is supposed to be the maximum, right?
It would have to be something like
albumpeaktot = max(albumpeaktot ,returnchunk[-1].peak
What about albumgain, I am not sure here?
The text was updated successfully, but these errors were encountered: