replaygain: add replaygain editing to track properties dialogs - #16062
replaygain: add replaygain editing to track properties dialogs#16062ywwg wants to merge 1 commit into
Conversation
in single track edit mode, prefills the dialog with the current replaygain value. blank values will not edit the current value. For multi track edit mode, prefills the dialog with an empty string. empty string means no change. An info string shows the current min, max, and average replaygain values. Users can type in whatever value they want. A filled-in value will be applied to all selected tracks. This is handy for leveling out a mixed album where every track is meant to blend together and should have the same volume. ai initial draft, hand edited and checked, hand tested. Signed-off-by: Owen Williams <owilliams@mixxx.org>
I understand the album use case, but what's the reason you want change it for single track in track info, like changing a rather meaningless value -- compared to adopting it from pregain via track menu or mapped control? |
It's more for symmetry with the multitrack dialog than anything else. I think it would be weird to have a way to edit replaygain for many tracks but then when only one is selected, suddenly it's not editable. In this case the amount of code needed to support editing it is minimal so it seemed worth doing. I could imagine someone wanting to reset replaygains to 0, or -6, or some other round number. Another thing I could imagine is right-click "set replaygain for all selected tracks", and the analyzer goes through all of them and calculates the replaygain for the tracks as a whole. That could be dangerous if someone selects the entire library, though. the great thing about AI code is I spent a lot less time to make this PR so I don't feel bad about trying out different approaches. |
|
(would detecting replaygain for a series of tracks be equivalent to averaging the replaygain values of those tracks, weighted by the lengths of the tracks?) |
|
actually claude points out it would have to be acoustically weighted, but yes we could do that. |
|
See here: mixxx/lib/replaygain/replaygain.cpp Line 61 in eeb11b8 Technically we have two replay gain values, album gain and title gain. I think we can assume that in an album, all tracks are normalized. So there is a single replay gain to achieve a desired target loudness. There might be a dynamic in the album that for instance an intro is played with less loudness which might make it too quiet for a DJ Mixxx. Is this actually an issue? If not or we can ignore this corner case, it would be great, because we get around the hassle of storing a second gain value and the required mode switch when playing ans album. So may allow to adopt the album gain in Mixxx for a whole album replacing the track gain. Can this be a right click action? Select all tracks of the album, right click "Apply Album Gain" or such? |
|
We have removed the GetAlbumGain function for some reason. Here is a version including the function: |
I have an album that is meant to be played continuously, each track mixes into the next. when the replaygain value is different for different tracks, there is an audible change in the volume when the tracks change. when playing the album as a cd, it is seamless. (example: https://throwingsnow.bandcamp.com/album/embers).
yes that works too I think, would you prefer that? |
|
one issue with averaging the replaygain of a series of tracks is, what to do if some of the tracks are unanalyzed? kick off an analysis for them? exclude them from calculation? |
|
Exclude them from calculation is probably the best choice. It is unlikely that this track is an outlier causing clipping or such. |
|
ok I'll close this PR and post the other one since it's a very different implementation |
in single track edit mode, prefills the dialog with the current replaygain value. blank values will not edit the current value.
For multi track edit mode, prefills the dialog with an empty string. empty string means no change. An info string shows the current min, max, and average replaygain values. Users can type in whatever value they want. A filled-in value will be applied to all selected tracks. This is handy for leveling out a mixed album where every track is meant to blend together and should have the same volume.
ai initial draft, hand edited and checked, hand tested.