You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I will start my analysis from scratch assuming little prior knowledge of Equal Loudness Contours. You may very well find the first sections trivial, in which case I urge you to simply skip them. I figured I might as well include them for the sake of completion and because they allow for a hopefully firm basis for my later proposals.
Let's have a brief look at loudness, then move on to how to compensate for it with loudness filters generally and then in FusionDSP. Then we'll look at some challenges with the current implementation and how to potentially tackle them. Finally, I will share some questions I have for you and some possible implementations.
Understanding Equal Loudness Contours
The standard equal loudness contours from ISO 226:2003 (colloquially Fletcher-Munson curves) show you the SPL curves that humans perceive as equally loud. They look as follows:
It shows, for example, that we're not as sensitive to bass frequencies as to higher frequencies. For instance, to perceive a 100Hz tone as equally loud as a 1kHz 80dB SPL tone, we need the 100Hz tone to be about 93dB SPL, following the '80 phon' line.
Music producers already implicitly take this into account when they're producing music, so we don't want to compensate for this. Instead, we're interested in how our sensitivity to different frequencies changes with volume.
To move to a more useful representation of the Equal Loudness Contours, we can reference all the lines to the 80phon line:
This shows the same data as the above, but the 80 phon line is now made flat at 0dB gain, with the other curves showing their respective differences to the 80 phon line. More useful already, but there's one more thing we can do. We can move all the lines up and down, so that they all overlap at 1khz at 0dB:
This gives us the 'perceived change in frequencies response', for lack of a better term that I'm aware of. It shows us how our perception of the music's frequency response will change as we decrease or increase the volume of the speakers.
It assumes we have an anechoic or in-room frequency response at around 80phon that we're perfectly content with, which doesn't need to be flat and indeed likely isn't*. However, because that 80 phon curve is used here as a reference, it is shown as a flat line at 0dB. The other curves than show how our perception of the frequency response changes with volume.
(*I'm simplifying here, and it isn't technically correct because the typical in-room response will not follow a Fletcher Munson curve and can thus not be represented by a phon curve, but for the sake of this discussion I think we can fairly make this simplification without negative consequences.)
Loudness Filters
Finally, let's invert the 'Perceived Change in Frequency Response Graph ' to show us the Required EQ to flatten the perceived change in frequency response:
This graph shows us what EQ we need to apply at what volume, to have music sound the same regardless of the volume.
For example, let's say you're perfectly happy with the amount of bass you hear with your speakers at around 80dB SPL. Then you reduce the volume of your speakers by 30dB, giving you an SPL of 50dB in your room. Suddenly the bass seems to be lacking. Reading the value of the 50 phon curve at, say, 50Hz, in the 'perceived change in frequencies response' plot, gives us a -12dB perceived change of the loudness of this bass tone compared to a 1kHz tone. Inversely, the 'Required EQ' figure shows us that we can apply a 12dB boost at 50Hz to have the 50Hz tone sound relatively as loud again as the 1kHz tone. By applying EQ to all frequencies in the right proportion, the entirety of the music can sound the same at 50dB as it did at 80dB, except now quieter.
It follows that the goal of a Loudness filter is to compensate for the perceived changes in frequency response at different volumes. The above graph shows that the change in the required EQ is relatively linear with volume. That is, the spacing between the phon lines is relatively even, which means if our music playback volume goes from 80 phon to 60 phon, we can apply double the loudnessGain compared to when we go from 80 phon to 70 phon.
Because of that, we can, as is currently done, implement the Loudness filter in two parts. First, a PEQ that closely follows one of the contours as shown in the 'Required EQ' graph, and secondly, apply the right gain to said EQ at different volumes, with a progressively higher gain as the playback volume decreases.
Loudness in FusionDSP
The PEQ that's currently used to match the contours is implemented very well, I'd say, and although I'm sure future optimization might be possible, I think we can leave it as is for the time being.
The gain ('loudnessGain') that scales the PEQ with volume is currently implemented as a linear gain than spans from 0dB at a user-defined digital volume percentage ('loudnessVolumeThreshold') to 23dB at 5% digital volume, and is calculated via linear interpolation between those points.
There are a couple of challenges with this implementation of the loudnessGain. To understand them better, let's clearly distinguish between two variables, here. First, we have the Volume Gain (dB), which shows the gain in SPL coming out of the speakers into the room. It can be controlled via the digital volume or an amplifier's gain/volume knob. Secondly, we have the Loudness Gain (dB) (= 'loudnessGain), which scales the EQ within the loudness filter.
Forgive the visually mediocre plot, which is a semi transparant overlay of the Loudness filter's PEQ as applied in FusionDSP with the maximum loudnessGain of 23dB (plotted with EqualizerAPO/Peace) on top of the 'Required EQ' plot:
It shows us that at the maximum Loudness Gain of 23dB, the loudness filter applies the correct amount of EQ for a listening level of somewhere between 30 and 40 phon, let's say 36 phon, when coming from 80 phon. This means that for a Volume Gain of 44dB (80-36=44), the correct Loudness Gain is about 23dB. Because the loudness effect is relatively linear for different volumes, this should apply equally whether we're going from 100dB SPL to 56dB SPL and when we're going from 70dB SPL to 26dB SPL.
Let's normalise that result, which gives us a target loudness gain quotient of 23dB/44dB = 0.52, meaning for every 1dB of Volume Gain, we'd ideally apply 0.52dB of Loudness Gain. For now, these are just approximate values, and if we were to implement these, I could think of some ways of quantifying them more explicitly.
The goal, and challenge, is to apply this correct gain of 0.52 to a volume span that's as large as possible. In the current implementation, this is quite challenging.
Relating Volume Gain to Digital Volume
To apply the correct gain, we must find a way to know the Volume Gain applied in the listener's room. Besides the digital volume, a user may also control the Volume Gain by turning the volume/gain knob on their amplifier, which is probably nearly impossible to track from FusionDSP and therefore would ruin our changes of applying the correct gain. Therefore, I think we can only reasonably move forward by assuming a situation where the amplifier's gain does not change, and thus the Volume Gain is controlled exclusively via the Volumio Digital Volume. I think we may want to encourage users to forego using the amplifier's volume controls when they turn on Loudness in the FusionDSP interface, but I'd say that's a UX/UI tweak for a later stage.
Now that we control the Volume Gain fully digitally from within Volumio, let's have a look have a look at the relation between the Digital Volume set in Volumio and the corresponding Volume Gain (dB) in the listener's room.
By the way, we can't calculate the absolute sound pressure level (SPL) (dB) in the listener's room. For that, we would at least require the output voltage of the DAC, the gain of the amplifier, the sensitivity of the speakers, and the properties of the listening room. Luckily, it is enough to concern ourselves with the Volume Gain (dB) without knowing the absolute SPL. This works because, as illustrated above, it doesn't really matter for us whether the SPL drops from 100 to 60 dB, or from 70 to 30 dB; the required Loudness Gain for such a Volume Gain should be similar.
Regardless of a speaker's sensitivity, its Volume Gain when going from one volume to another can be calculated directly via 'Volume Gain = 20 x LOG10(V2/V1) (dB), with V1 and V2 the (root mean square) voltage going to the speaker before and after the volume change, respectively. For example, when the output voltage of the DAC doubles from 0.5 Vrms to 1 Vrms, the corresponding Volume Gain can be calculated as 20 x LOG10(1/0.5) = 6 dB.
To calculate the Volume Gain as a function of the Digital Volume in Volumio, I measured the root mean square voltage coming out of my setup using a standard multimeter in AC Voltage mode and a 50Hz test tone. The used setup was a Raspberry Pi Zero 2 W running Volumio connected to an Apple USB DAC. In the Volumio Playback Options, you can set the Volume Curve Mode to either Natural (default) or Linear. The results for both modes are shown here, arbitrarily using 80% digital volume as the 0dB reference point:
The Linear volume curve mode shows a nice straight line, with the Volume Gain changing linearly with Digital Volume. This makes it an ideal curve to use if we want to calculate the required Loudness Gain based on a linear interpolation of the digital volume. In the above measurement, there was a consistent +6dB Volume Gain for every 10% added Digital Volume. Using the previously determined target quotient of 0.52dB/dB, the ideal Loudness Gain would thus be 0.52x6 = 3 dB for every 10% added Digital Volume.
Effective Volume Gain
There's catch, however. Because the Loudness filter introduces a positive EQ, it requires turning on the Auto Pre-Amp function in FusionDSP to avoid clipping. This means that the effective volume gain in the room will not only depend on the inherent volume gain of the digital volume, but additionally depends on the applied pre-amp. Since, if I'm not mistaken, the Auto Pre-Amp simply matches the Loudness Gain, we can calculate the Effective Volume Gain by adding the inverse of the Loudness Gain. That is, 'Effective Volume Gain = Volume Gain + Auto Pre Amp = Volume Gain - Loudness Gain'.
In turn, while I previously stated that the ideal Loudness Gain equals 0.52dB per dB of Volume Gain, the Loudness Gain should actually depend on the Effective Volume Gain instead. That is to say, we want 0.52dB of Loudness Gain per 1dB of Effective Volume Gain.
Solving for the correct loudness gain and corresponding auto pre-amp to reach 0.52dB of Loudness Gain per 1dB of Effective Volume Gain over the 0 to 80% volume range yields the following result:
In this plot it stands out that the total Effective Volume Gain has become very large, with the 0-100% digital volume now spanning almost 120dB. Above 80%, no Loudness Filter is applied, and hence the Effective Volume Gain equals the Volume Gain.
The Problem of a Total Volume Range that is Too Large
In my opinion, it is very undesirable to have such a large total Effective Volume Gain. Because listening levels likely won't exceed changes of 70-80dB of gain between quiet and loud listening, it would render a large portion of the digital volume unusable and reduce the granularity of the volume control.
This leads to a problem, to which I hope you can help find a solution. I speculate that the digital volume in Volumio is applied at the last step in its audio pipeline - the playback options imply that this happens on a hardware level on the DAC. If so, the Auto Pre-Amp is only needed because the positive Loudness EQ is applied earlier in the pipeline than the digital volume. Is there a way we can swap this around? The Loudness Gain will never exceed the negative Volume Gain, so if we could first reduce the digital volume and then apply the loudness gain, we wouldn't need to use the auto pre-amp. As a result, we would have a smaller total volume gain and thus much nicer digital volume control.
I can imagine that the above may not be possible. Is there another way you can think of to work around this? I could imagine applying a fixed negative pre-amp, instead of one that follows the loudness gain. This would decrease the total volume span to nicer levels, but it would also make the maximum volume much quieter, which seems far from ideal.
Perhaps, but I'm speculating here, we could change the digital volume applied at the DAC? That is to say, if 50% digital volume corresponds to -30dB compared to 100% volume, instead of telling the DAC to play at -30dB, we take into account the additional Auto Pre-Amp we applied of -15dB, and we thus tell the DAC to play at (-30--15=) -15 dB? This would mean the effective volume gain out of the DAC would still equal the desired -30dB as set by the user's 50% volume.
Anyway, I'm heavily speculating for solutions, here, because I am not familiar with the Volumio codebase. My hope is that I have conveyed the nature of the problem, and perhaps you can see a sensible solution.
Proposal for Loudness in FusionDSP
I didn't spend much time discussing the current implementation of Loudness Gain (loudnessGain) in FusionDSP. To shortly expand on it: the main challenge, I think, is that it is very difficult for a user to reach the optimal 0.52dB/dB Loudness Gain. There are several ways of improving the situation, including adding options to not only set the upper loudness threshold, but also allowing the user to set the lower threshold (currently 5%) and the maximum loudness gain (currently 23dB). However, without further changes, even that would still leave the user accountable for matching the loudness filter to the ideal 0.52dB/dB, which requires significant understanding of the underlying mechanisms.
Instead, my current idea is that we could have a fixed (or adjustable) slope of 0.52dB/dB for the loudness gain, that the user can turn on. In principle, we could have the loudness filter apply to the entire volume range. However, I can imagine some users would like to opportunity to still set an upper threshold above which the loudness filter has no effect, whether it be for purist reasons or because they're throwing a party and want that high volume to be accompanied by some extra perceived bass.
Thus, one idea could be to give the user these options:
Loudness on/off
when on:
Loudness Effect Strength. 0.52dB/dB by default, to match the ISO 226:2003 curves, but let's allow users to increase or decrease the strength based on personal preference
Upper Threshold. 100% by default, because I see no reason to apply loudness only to low volume listening as the ISO contours remain similarly spaced also at high volumes. However, let's allow users to set a lower upper threshold as they desire.
Reference Volume. The user should define a reference digital volume (%) at which they are content with the perceived frequency response of their system. At volumes lower than the reference, we can then apply a positive loudness gain, and at volumes greater than the reference, we can apply a negative loudness gain.
Additionally, the user should be prompted to switch from Natural to Linear volume mode in the Volumio Playback options.
This set of options should help the large majority of users to easily acquire a satisfactory loudness compensation, that is neither too strong nor too weak. It should also resolve the issue currently present where the upper threshold affects both the cutoff point as well as the strength (or slope) of the loudness filter, by decoupling the Effect Strength and the Upper Threshold. The exact recommended values such as the 0.52dB/dB should be more accurately determined later on. We should also verify the correct volume gain in linear mode using different equipment.
However, all of that would be influenced a lot by whether we can find a workaround for the aforementioned issue of the auto pre-amp resulting in a very large total volume range, that, in my eyes, is very undesirable.
Therefore, to conclude, I would propose to let the discussion on the exact user configurable options be for now, and focus first on the underlying mechanisms with regards to the auto pre-amp. In any case, I am happy to learn from you and to help clarify anything where possible. I may also very well have made mistakes, so feel free to point them out or share any other skepticisms. Our way forward is at your discretion, and I am happy to help or propose any changes that you're happy for me to make.
The text was updated successfully, but these errors were encountered:
I'd like to potentially propose some changes to the Loudness filter in FusionDSP, as I recently mentioned on the community forum https://community.volumio.com/t/fusiondsp-the-complete-dsp-center-for-volumio3/50474/1255.
I will start my analysis from scratch assuming little prior knowledge of Equal Loudness Contours. You may very well find the first sections trivial, in which case I urge you to simply skip them. I figured I might as well include them for the sake of completion and because they allow for a hopefully firm basis for my later proposals.
Let's have a brief look at loudness, then move on to how to compensate for it with loudness filters generally and then in FusionDSP. Then we'll look at some challenges with the current implementation and how to potentially tackle them. Finally, I will share some questions I have for you and some possible implementations.
Understanding Equal Loudness Contours
The standard equal loudness contours from ISO 226:2003 (colloquially Fletcher-Munson curves) show you the SPL curves that humans perceive as equally loud. They look as follows:
It shows, for example, that we're not as sensitive to bass frequencies as to higher frequencies. For instance, to perceive a 100Hz tone as equally loud as a 1kHz 80dB SPL tone, we need the 100Hz tone to be about 93dB SPL, following the '80 phon' line.
Music producers already implicitly take this into account when they're producing music, so we don't want to compensate for this. Instead, we're interested in how our sensitivity to different frequencies changes with volume.
To move to a more useful representation of the Equal Loudness Contours, we can reference all the lines to the 80phon line:
This shows the same data as the above, but the 80 phon line is now made flat at 0dB gain, with the other curves showing their respective differences to the 80 phon line. More useful already, but there's one more thing we can do. We can move all the lines up and down, so that they all overlap at 1khz at 0dB:
This gives us the 'perceived change in frequencies response', for lack of a better term that I'm aware of. It shows us how our perception of the music's frequency response will change as we decrease or increase the volume of the speakers.
It assumes we have an anechoic or in-room frequency response at around 80phon that we're perfectly content with, which doesn't need to be flat and indeed likely isn't*. However, because that 80 phon curve is used here as a reference, it is shown as a flat line at 0dB. The other curves than show how our perception of the frequency response changes with volume.
(*I'm simplifying here, and it isn't technically correct because the typical in-room response will not follow a Fletcher Munson curve and can thus not be represented by a phon curve, but for the sake of this discussion I think we can fairly make this simplification without negative consequences.)
Loudness Filters
Finally, let's invert the 'Perceived Change in Frequency Response Graph ' to show us the Required EQ to flatten the perceived change in frequency response:
This graph shows us what EQ we need to apply at what volume, to have music sound the same regardless of the volume.
For example, let's say you're perfectly happy with the amount of bass you hear with your speakers at around 80dB SPL. Then you reduce the volume of your speakers by 30dB, giving you an SPL of 50dB in your room. Suddenly the bass seems to be lacking. Reading the value of the 50 phon curve at, say, 50Hz, in the 'perceived change in frequencies response' plot, gives us a -12dB perceived change of the loudness of this bass tone compared to a 1kHz tone. Inversely, the 'Required EQ' figure shows us that we can apply a 12dB boost at 50Hz to have the 50Hz tone sound relatively as loud again as the 1kHz tone. By applying EQ to all frequencies in the right proportion, the entirety of the music can sound the same at 50dB as it did at 80dB, except now quieter.
It follows that the goal of a Loudness filter is to compensate for the perceived changes in frequency response at different volumes. The above graph shows that the change in the required EQ is relatively linear with volume. That is, the spacing between the phon lines is relatively even, which means if our music playback volume goes from 80 phon to 60 phon, we can apply double the loudnessGain compared to when we go from 80 phon to 70 phon.
Because of that, we can, as is currently done, implement the Loudness filter in two parts. First, a PEQ that closely follows one of the contours as shown in the 'Required EQ' graph, and secondly, apply the right gain to said EQ at different volumes, with a progressively higher gain as the playback volume decreases.
Loudness in FusionDSP
The PEQ that's currently used to match the contours is implemented very well, I'd say, and although I'm sure future optimization might be possible, I think we can leave it as is for the time being.
The gain ('loudnessGain') that scales the PEQ with volume is currently implemented as a linear gain than spans from 0dB at a user-defined digital volume percentage ('loudnessVolumeThreshold') to 23dB at 5% digital volume, and is calculated via linear interpolation between those points.
There are a couple of challenges with this implementation of the loudnessGain. To understand them better, let's clearly distinguish between two variables, here. First, we have the Volume Gain (dB), which shows the gain in SPL coming out of the speakers into the room. It can be controlled via the digital volume or an amplifier's gain/volume knob. Secondly, we have the Loudness Gain (dB) (= 'loudnessGain), which scales the EQ within the loudness filter.
Forgive the visually mediocre plot, which is a semi transparant overlay of the Loudness filter's PEQ as applied in FusionDSP with the maximum loudnessGain of 23dB (plotted with EqualizerAPO/Peace) on top of the 'Required EQ' plot:
It shows us that at the maximum Loudness Gain of 23dB, the loudness filter applies the correct amount of EQ for a listening level of somewhere between 30 and 40 phon, let's say 36 phon, when coming from 80 phon. This means that for a Volume Gain of 44dB (80-36=44), the correct Loudness Gain is about 23dB. Because the loudness effect is relatively linear for different volumes, this should apply equally whether we're going from 100dB SPL to 56dB SPL and when we're going from 70dB SPL to 26dB SPL.
Let's normalise that result, which gives us a target loudness gain quotient of 23dB/44dB = 0.52, meaning for every 1dB of Volume Gain, we'd ideally apply 0.52dB of Loudness Gain. For now, these are just approximate values, and if we were to implement these, I could think of some ways of quantifying them more explicitly.
The goal, and challenge, is to apply this correct gain of 0.52 to a volume span that's as large as possible. In the current implementation, this is quite challenging.
Relating Volume Gain to Digital Volume
To apply the correct gain, we must find a way to know the Volume Gain applied in the listener's room. Besides the digital volume, a user may also control the Volume Gain by turning the volume/gain knob on their amplifier, which is probably nearly impossible to track from FusionDSP and therefore would ruin our changes of applying the correct gain. Therefore, I think we can only reasonably move forward by assuming a situation where the amplifier's gain does not change, and thus the Volume Gain is controlled exclusively via the Volumio Digital Volume. I think we may want to encourage users to forego using the amplifier's volume controls when they turn on Loudness in the FusionDSP interface, but I'd say that's a UX/UI tweak for a later stage.
Now that we control the Volume Gain fully digitally from within Volumio, let's have a look have a look at the relation between the Digital Volume set in Volumio and the corresponding Volume Gain (dB) in the listener's room.
By the way, we can't calculate the absolute sound pressure level (SPL) (dB) in the listener's room. For that, we would at least require the output voltage of the DAC, the gain of the amplifier, the sensitivity of the speakers, and the properties of the listening room. Luckily, it is enough to concern ourselves with the Volume Gain (dB) without knowing the absolute SPL. This works because, as illustrated above, it doesn't really matter for us whether the SPL drops from 100 to 60 dB, or from 70 to 30 dB; the required Loudness Gain for such a Volume Gain should be similar.
Regardless of a speaker's sensitivity, its Volume Gain when going from one volume to another can be calculated directly via 'Volume Gain = 20 x LOG10(V2/V1) (dB), with V1 and V2 the (root mean square) voltage going to the speaker before and after the volume change, respectively. For example, when the output voltage of the DAC doubles from 0.5 Vrms to 1 Vrms, the corresponding Volume Gain can be calculated as 20 x LOG10(1/0.5) = 6 dB.
To calculate the Volume Gain as a function of the Digital Volume in Volumio, I measured the root mean square voltage coming out of my setup using a standard multimeter in AC Voltage mode and a 50Hz test tone. The used setup was a Raspberry Pi Zero 2 W running Volumio connected to an Apple USB DAC. In the Volumio Playback Options, you can set the Volume Curve Mode to either Natural (default) or Linear. The results for both modes are shown here, arbitrarily using 80% digital volume as the 0dB reference point:
The Linear volume curve mode shows a nice straight line, with the Volume Gain changing linearly with Digital Volume. This makes it an ideal curve to use if we want to calculate the required Loudness Gain based on a linear interpolation of the digital volume. In the above measurement, there was a consistent +6dB Volume Gain for every 10% added Digital Volume. Using the previously determined target quotient of 0.52dB/dB, the ideal Loudness Gain would thus be 0.52x6 = 3 dB for every 10% added Digital Volume.
Effective Volume Gain
There's catch, however. Because the Loudness filter introduces a positive EQ, it requires turning on the Auto Pre-Amp function in FusionDSP to avoid clipping. This means that the effective volume gain in the room will not only depend on the inherent volume gain of the digital volume, but additionally depends on the applied pre-amp. Since, if I'm not mistaken, the Auto Pre-Amp simply matches the Loudness Gain, we can calculate the Effective Volume Gain by adding the inverse of the Loudness Gain. That is, 'Effective Volume Gain = Volume Gain + Auto Pre Amp = Volume Gain - Loudness Gain'.
In turn, while I previously stated that the ideal Loudness Gain equals 0.52dB per dB of Volume Gain, the Loudness Gain should actually depend on the Effective Volume Gain instead. That is to say, we want 0.52dB of Loudness Gain per 1dB of Effective Volume Gain.
Solving for the correct loudness gain and corresponding auto pre-amp to reach 0.52dB of Loudness Gain per 1dB of Effective Volume Gain over the 0 to 80% volume range yields the following result:
In this plot it stands out that the total Effective Volume Gain has become very large, with the 0-100% digital volume now spanning almost 120dB. Above 80%, no Loudness Filter is applied, and hence the Effective Volume Gain equals the Volume Gain.
The Problem of a Total Volume Range that is Too Large
In my opinion, it is very undesirable to have such a large total Effective Volume Gain. Because listening levels likely won't exceed changes of 70-80dB of gain between quiet and loud listening, it would render a large portion of the digital volume unusable and reduce the granularity of the volume control.
This leads to a problem, to which I hope you can help find a solution. I speculate that the digital volume in Volumio is applied at the last step in its audio pipeline - the playback options imply that this happens on a hardware level on the DAC. If so, the Auto Pre-Amp is only needed because the positive Loudness EQ is applied earlier in the pipeline than the digital volume. Is there a way we can swap this around? The Loudness Gain will never exceed the negative Volume Gain, so if we could first reduce the digital volume and then apply the loudness gain, we wouldn't need to use the auto pre-amp. As a result, we would have a smaller total volume gain and thus much nicer digital volume control.
I can imagine that the above may not be possible. Is there another way you can think of to work around this? I could imagine applying a fixed negative pre-amp, instead of one that follows the loudness gain. This would decrease the total volume span to nicer levels, but it would also make the maximum volume much quieter, which seems far from ideal.
Perhaps, but I'm speculating here, we could change the digital volume applied at the DAC? That is to say, if 50% digital volume corresponds to -30dB compared to 100% volume, instead of telling the DAC to play at -30dB, we take into account the additional Auto Pre-Amp we applied of -15dB, and we thus tell the DAC to play at (-30--15=) -15 dB? This would mean the effective volume gain out of the DAC would still equal the desired -30dB as set by the user's 50% volume.
Anyway, I'm heavily speculating for solutions, here, because I am not familiar with the Volumio codebase. My hope is that I have conveyed the nature of the problem, and perhaps you can see a sensible solution.
Proposal for Loudness in FusionDSP
I didn't spend much time discussing the current implementation of Loudness Gain (loudnessGain) in FusionDSP. To shortly expand on it: the main challenge, I think, is that it is very difficult for a user to reach the optimal 0.52dB/dB Loudness Gain. There are several ways of improving the situation, including adding options to not only set the upper loudness threshold, but also allowing the user to set the lower threshold (currently 5%) and the maximum loudness gain (currently 23dB). However, without further changes, even that would still leave the user accountable for matching the loudness filter to the ideal 0.52dB/dB, which requires significant understanding of the underlying mechanisms.
Instead, my current idea is that we could have a fixed (or adjustable) slope of 0.52dB/dB for the loudness gain, that the user can turn on. In principle, we could have the loudness filter apply to the entire volume range. However, I can imagine some users would like to opportunity to still set an upper threshold above which the loudness filter has no effect, whether it be for purist reasons or because they're throwing a party and want that high volume to be accompanied by some extra perceived bass.
Thus, one idea could be to give the user these options:
This set of options should help the large majority of users to easily acquire a satisfactory loudness compensation, that is neither too strong nor too weak. It should also resolve the issue currently present where the upper threshold affects both the cutoff point as well as the strength (or slope) of the loudness filter, by decoupling the Effect Strength and the Upper Threshold. The exact recommended values such as the 0.52dB/dB should be more accurately determined later on. We should also verify the correct volume gain in linear mode using different equipment.
However, all of that would be influenced a lot by whether we can find a workaround for the aforementioned issue of the auto pre-amp resulting in a very large total volume range, that, in my eyes, is very undesirable.
Therefore, to conclude, I would propose to let the discussion on the exact user configurable options be for now, and focus first on the underlying mechanisms with regards to the auto pre-amp. In any case, I am happy to learn from you and to help clarify anything where possible. I may also very well have made mistakes, so feel free to point them out or share any other skepticisms. Our way forward is at your discretion, and I am happy to help or propose any changes that you're happy for me to make.
The text was updated successfully, but these errors were encountered: