Started by jllodra, January 14, 2022, 15:19:09
Quote from: jllodra on January 14, 2022, 15:19:09Hi. I have noticed that one of the things that annoy me when I play different songs (using libopenmpt), is that I need to manually adjust speaker's volume. Not all the times, but some times.
Quote from: jllodra on January 14, 2022, 15:19:09First question I have is: Is there anything in the lib itself I can use and automagically helps? Eg: Normalization? RMS calculation? ReplayGain?
Quote from: jllodra on January 14, 2022, 15:19:09If not, would be a good idea to analyze the PCM outputted by libopenmpt and do some kind of algorithm (which is unknown to me at this moment) to calculate a "replay gain" value in dB.
Quote from: jllodra on January 14, 2022, 15:19:09Or... instead of having to do any offline calculation, would a compressor and limiter help? or it would make it worse?
Quote from: jllodra on January 14, 2022, 16:15:45Thank you for answering and providing such good information.
Quote from: jllodra on January 14, 2022, 16:15:45I have been applying just now the "EBU R128 (ITU-R BS.1770) algorithm" to a collection of modules (different formats and styles, xm, it, chiptunes and doskpop...).I used openmpt123 to convert into PCM and then used bs1770gain to rewrite the wav files with the applied LU (dB).The results are extremely gratifying.
Quote from: jllodra on January 14, 2022, 16:15:45I will be exploring the automatic gain plus hard limiter too, since it can be applied in realtime, and decide.
Quote from: Saga Musix on January 14, 2022, 17:37:37One thing to keep in mind that applies to modules just as well as streamed albums: Sometimes it doesn't make sense to normalize all tracks to the same volume because they might be part of a set of tunes that are supposed to be played in a gapless manner. This was somewhat common especially in the heyday of the Amiga when people wanted to write longer tracks with many different samples, as a way to exceed ProTracker's limitation of 31 samples. Some musicdisks work that way. In this case, you want to normalize the whole set of tunes using the same factor. Hence there are separate ReplayGain values for single tracks and albums. Depending on what you want to achieve, this may be relevant for your module playback as well.
Quote from: Saga Musix on January 14, 2022, 17:43:14True, and that's why I wouldn't want to implement a complete ReplayGain or R128 normalization in libopenmpt. However, sometimes "I just want all tracks to be roughly equally loud" is a valid use case, and a user of the library may not have the possibility to cache the whole track output upfront for ReplayGain calculation, and it would be considerably more expensive to do this than a simple approximation, so I still think that an optional feature for this makes sense. It would often be better than having no such option at all.