Spotify: volume normalization does not work correctly if volume control is set to None

Hi, and thank you for a great product!

Running RoPieee XL 2022.06.4

I have an issue with volume normalization not working properly if volume control is set to None in Ropieee XL. If I enable software volume control everything works as intended. However, this enables volume adjustments from the spotifiy clients which I do not want as I want it fixed at 100%.

Reading the librespot documentation and looking at 90-ropieeexl_librespot_config in the image it seems that the issue is that “–mixer softvol” is not included for the “no volume control” use case where “–volume-ctrl fixed” is set.

For the purists, you can use `--mixer softvol --volume-ctrl fixed --initial-volume 100` to completely bypass volume control.

I think “None” should be renamed to “Fixed” (bonus: like in Roon) and the “no volume control” args list be changed to “–mixer softvol --volume-ctrl fixed” instead of the “None” setting of today for better clarity. The “None” setting could be kept, but I don’t really see the use case for that when it has some unforeseen behaviour issues. Also, note:

Note that softvol is recommended unless you have specific requirements, as softvol works in 64-bit floating point which is better than most hardware implementations, even if you have a 32-bit DAC.

There is an issue here, but not what I initially thought. The problem is that the initial volume setting is not provided for the None use case according to 90-ropieeexl_librespot_config. This means that when fixed is used the volume is ironically fixed on the default softvol setting of 50, which seems to be active only when volume normalization is in use.

If I select software volume and set the initial volume to 50 I get the same result as with None with volume normalization.

The fix should be to include the --initial-volume arg also for the None volume control use case (or Fixed if None is renamed), so the initial volume can be set to 100.

Also, do you think it would be possible to include the --normalisation-pregain setting in the GUI? This enables me to to set the target loudness level to also level very dynamic tracks. The spotify client equivalent here is the [Loud, Normal, Quiet] setting. The default is 0 (-14 dB LUFS target if the spotify docs are right). Based on Roon experience a pregain of -4 (-18 dB LUFS in Roon) should also ensure that almost any classical and jazz songs are played back at the same level as other kinds of music (with pregain 0 these songs will be played back at a lower level than the target level to ensure dynamics are preserved)

That would not be difficult to do, but I’m not in favor of a free text field where you can enter the dB value. I suggest it becomes a selection list with values ‘loud’, ‘normal’, and ‘quiet’ with the following mapping:

loud → 6
normal (default) → 3
quiet → -5

What do you think?

Actually the values (according to Options · librespot-org/librespot Wiki · GitHub) should be

`--enable-volume-normalisation --normalisation-pregain 3`

**Normal (Default)**
`--enable-volume-normalisation --normalisation-pregain 0`

`--enable-volume-normalisation --normalisation-pregain -9`

The Quiet target does not really match the value that I ideally want (it normalizes to -23 dB LUFS, which is too much IMHO), but it does match the spotify client, so I understand if you want to do it this way.

You could do it the more flexible Roon way, e.g map the values to a selectable dB LUFS dropdown menu instead. So 0 = -14 dB LUFS, -1 = -15 dB LUFS, -2 = -16 dB LUFS…, and similarily to represent LOUD, e.g 3 = -11 dB LUFS.

Interesting that there are different opinions on the internet about what the Spotify equivalents are :wink:

Anyways, let’s start with the values according to the Librespot documentation and take it from there.

1 Like

If it makes anything better I have manually verified that a track normalized to -14 dB LUFS in Roon plays back at exactly the same volume level in librespot with normalization-pregain set to 0. In other words there is no doubt in my mind that the official spotify docs and the librespot docs referring to -14 dB LUFS (or pregain 0) for the normal level is factually correct.

1 Like

So you suggest:

  • rename ‘none’ to ‘fixed’
  • make sure the --initial-volume is applied when running with ‘fixed’


Exactly that yes. That also conforms to the “purist” config in the docs and should fix volume normalization levels.

Interesting that there are different opinions on the internet about what the Spotify equivalents are

Spotify had other lufs targets several years ago, so the values you had was probably correct for spotify at some earlier point in time.

Which platform are you on? Pi 4?

Yes, Pi 4.

Perhaps we could have Loud, Normal and Quiet, but also a fourth value “Custom” where the user can input a value between 3 and -9 or something like that, to both be familiar to the existing spotify user and satisfy enthusiasts with different needs. The lack of granularity to select normalization levels in ordinary spotify client has always been annoying to me, so it would be awesome if Ropieee can do even better than the officicial client when the possibility for it exists!

Hi @Hans-Kristian_Bakke ,

I’ve released a beta release with this functionality (expect the ‘custom’ value, that’s more work).
If you’re up to it you can test it by changing to the beta release channel.


Wow, thanks! I’ll test later today!

The beta works like a charm! Fixed now works with volume normalization at 100 volume. I also verified -14 db LUFS down at “Normal” against -14 dB LUFS in Roon and they matched. Also tested Quiet and it was 9 dB down (-23 dB LUFS) as documented.

Don’t worry about the custom setting, it was just a suggestion that depending on how dynamic the GUI is could be easy or hard to implement. Better to keep it simple than cluttered in most cases. I use Roon for critical listening anyway.

Thank you very much!

1 Like