Skip to main content
added 4 characters in body
Source Link
Romen
  • 416
  • 2
  • 8

Is there a standard way of combining multiple volume controls.

The multiplication of several "volume" coefficients is a good place to start; It makes the most sense to multiply these floats because they represent a linear coefficient for something. But you should know that these coefficients are not directly representing loudness, they are coefficients for the energy/voltage level in the sound device.

this gives me a pretty steep volume curve near lower numbers.

The loudness of a sound (what we perceive) has a non-linear relationship to the energy (voltage) used to make the sound. When you pass 0.5 to the sound card it will create a sound at 50% of its max voltage, but that will not be half as loud as 1.0 and 100% voltage. The actual relationship from energy to loudness is rather complicated but most software approximates it with a formula like loudness = log10(volume) or loudness = sqrt(energy).

You should be choosing the playbackVolume and assetVolume with this non-linear relationship in mind:

  • If playbackVolume scales with distance from the player you need to consider whether the "energy" of the sound drops off linearly or non-linearly with distance.
  • If assetVolume is predetermined and you want a specific asset to sound twice as loud as something else you'll need to review your volume numbers in "loudness" terms.
  • When you provide a slider in your settings UI for the user to adjust your globalVolume it should be a non-linear slider too. Use a formula like globalVolume = sliderValue^2.

Hopefully after addressing all of these considerations the simple product of your volume floats becomes a lot more usable and starts making sensesounding correct.

Is there a standard way of combining multiple volume controls.

The multiplication of several "volume" coefficients is a good place to start; It makes the most sense to multiply these floats because they represent a linear coefficient for something. But you should know that these coefficients are not directly representing loudness, they are coefficients for the energy/voltage level in the sound device.

this gives me a pretty steep volume curve near lower numbers.

The loudness of a sound (what we perceive) has a non-linear relationship to the energy (voltage) used to make the sound. When you pass 0.5 to the sound card it will create a sound at 50% of its max voltage, but that will not be half as loud as 1.0 and 100% voltage. The actual relationship from energy to loudness is rather complicated but most software approximates it with a formula like loudness = log10(volume) or loudness = sqrt(energy).

You should be choosing the playbackVolume and assetVolume with this non-linear relationship in mind:

  • If playbackVolume scales with distance from the player you need to consider whether the "energy" of the sound drops off linearly or non-linearly with distance.
  • If assetVolume is predetermined and you want a specific asset to sound twice as loud as something else you'll need to review your volume numbers in "loudness" terms.
  • When you provide a slider in your settings UI for the user to adjust your globalVolume it should be a non-linear slider too. Use a formula like globalVolume = sliderValue^2.

Hopefully after addressing all of these considerations the simple product of your volume floats becomes a lot more usable and starts making sense.

Is there a standard way of combining multiple volume controls.

The multiplication of several "volume" coefficients is a good place to start; It makes the most sense to multiply these floats because they represent a linear coefficient for something. But you should know that these coefficients are not directly representing loudness, they are coefficients for the energy/voltage level in the sound device.

this gives me a pretty steep volume curve near lower numbers.

The loudness of a sound (what we perceive) has a non-linear relationship to the energy (voltage) used to make the sound. When you pass 0.5 to the sound card it will create a sound at 50% of its max voltage, but that will not be half as loud as 1.0 and 100% voltage. The actual relationship from energy to loudness is rather complicated but most software approximates it with a formula like loudness = log10(volume) or loudness = sqrt(energy).

You should be choosing the playbackVolume and assetVolume with this non-linear relationship in mind:

  • If playbackVolume scales with distance from the player you need to consider whether the "energy" of the sound drops off linearly or non-linearly with distance.
  • If assetVolume is predetermined and you want a specific asset to sound twice as loud as something else you'll need to review your volume numbers in "loudness" terms.
  • When you provide a slider in your settings UI for the user to adjust your globalVolume it should be a non-linear slider too. Use a formula like globalVolume = sliderValue^2.

Hopefully after addressing all of these considerations the simple product of your volume floats becomes a lot more usable and starts sounding correct.

deleted 89 characters in body
Source Link
Romen
  • 416
  • 2
  • 8

Is there a standard way of combining multiple volume controls.

The multiplication of several "volume" coefficients is a good place to start; It makes the most sense to multiply these floats because they represent a linear coefficient for something. But you should know that these coefficients are not directly representing loudness, they are coefficients for the energy/voltage level in the sound device.

this gives me a pretty steep volume curve near lower numbers.

The loudness of a sound (what we perceive) has a non-linear relationship to the energy (voltage) used to make the sound. When you pass 0.5 to the sound card it will create a sound at 50% of its max voltage, but that will not be half as loud as 1.0 and 100% voltage. The actual relationship from energy to loudness is rather complicated but most software approximates it with a formula like loudness = log10(volume) or loudness = sqrt(energy).

You should be choosing the playbackVolume and assetVolume with this non-linear relationship in mind:

  • If playbackVolume scales with distance from the player you need to consider whether the "energy" of the sound drops off linearly or non-linearly with distance.
  • If assetVolume is predetermined and you want a specific asset to sound twice as loud as something else you'll need to review your volume numbers and comparein "loudness" terms.
  • When you provide a slider in your settings UI for the user to adjust your log10()globalVolume of their predetermined valuesit should be a non-linear slider too. Use a formula like globalVolume = sliderValue^2.

When you provide a slider in your settings UI for the user to adjust your globalVolume it should be a non-linear slider too. When the user adjusts the slider they're usually assuming that 50% on the slider means half as loud as 100%, so to make that slider feel better you should use the logarithm of the slider value as the globalVolume instead of the slider value directly.

Hopefully after addressing all of these considerations the simple product of your volume floats becomes a lot more usable and starts making sense.

Is there a standard way of combining multiple volume controls.

The multiplication of several "volume" coefficients is a good place to start; It makes the most sense to multiply these floats because they represent a linear coefficient for something. But you should know that these coefficients are not directly representing loudness, they are coefficients for the energy/voltage level in the sound device.

this gives me a pretty steep volume curve near lower numbers.

The loudness of a sound (what we perceive) has a non-linear relationship to the energy (voltage) used to make the sound. When you pass 0.5 to the sound card it will create a sound at 50% of its max voltage, but that will not be half as loud as 1.0 and 100% voltage. The actual relationship from energy to loudness is rather complicated but most software approximates it with a formula like loudness = log10(energy).

You should be choosing the playbackVolume and assetVolume with this non-linear relationship in mind:

  • If playbackVolume scales with distance from the player you need to consider whether the "energy" of the sound drops off linearly or non-linearly with distance.
  • If assetVolume is predetermined and you want a specific asset to sound twice as loud as something else you'll need to review your volume numbers and compare the log10() of their predetermined values.

When you provide a slider in your settings UI for the user to adjust your globalVolume it should be a non-linear slider too. When the user adjusts the slider they're usually assuming that 50% on the slider means half as loud as 100%, so to make that slider feel better you should use the logarithm of the slider value as the globalVolume instead of the slider value directly.

Hopefully after addressing all of these considerations the simple product of your volume floats becomes a lot more usable and starts making sense.

Is there a standard way of combining multiple volume controls.

The multiplication of several "volume" coefficients is a good place to start; It makes the most sense to multiply these floats because they represent a linear coefficient for something. But you should know that these coefficients are not directly representing loudness, they are coefficients for the energy/voltage level in the sound device.

this gives me a pretty steep volume curve near lower numbers.

The loudness of a sound (what we perceive) has a non-linear relationship to the energy (voltage) used to make the sound. When you pass 0.5 to the sound card it will create a sound at 50% of its max voltage, but that will not be half as loud as 1.0 and 100% voltage. The actual relationship from energy to loudness is rather complicated but most software approximates it with a formula like loudness = log10(volume) or loudness = sqrt(energy).

You should be choosing the playbackVolume and assetVolume with this non-linear relationship in mind:

  • If playbackVolume scales with distance from the player you need to consider whether the "energy" of the sound drops off linearly or non-linearly with distance.
  • If assetVolume is predetermined and you want a specific asset to sound twice as loud as something else you'll need to review your volume numbers in "loudness" terms.
  • When you provide a slider in your settings UI for the user to adjust your globalVolume it should be a non-linear slider too. Use a formula like globalVolume = sliderValue^2.

Hopefully after addressing all of these considerations the simple product of your volume floats becomes a lot more usable and starts making sense.

Source Link
Romen
  • 416
  • 2
  • 8

Is there a standard way of combining multiple volume controls.

The multiplication of several "volume" coefficients is a good place to start; It makes the most sense to multiply these floats because they represent a linear coefficient for something. But you should know that these coefficients are not directly representing loudness, they are coefficients for the energy/voltage level in the sound device.

this gives me a pretty steep volume curve near lower numbers.

The loudness of a sound (what we perceive) has a non-linear relationship to the energy (voltage) used to make the sound. When you pass 0.5 to the sound card it will create a sound at 50% of its max voltage, but that will not be half as loud as 1.0 and 100% voltage. The actual relationship from energy to loudness is rather complicated but most software approximates it with a formula like loudness = log10(energy).

You should be choosing the playbackVolume and assetVolume with this non-linear relationship in mind:

  • If playbackVolume scales with distance from the player you need to consider whether the "energy" of the sound drops off linearly or non-linearly with distance.
  • If assetVolume is predetermined and you want a specific asset to sound twice as loud as something else you'll need to review your volume numbers and compare the log10() of their predetermined values.

When you provide a slider in your settings UI for the user to adjust your globalVolume it should be a non-linear slider too. When the user adjusts the slider they're usually assuming that 50% on the slider means half as loud as 100%, so to make that slider feel better you should use the logarithm of the slider value as the globalVolume instead of the slider value directly.

Hopefully after addressing all of these considerations the simple product of your volume floats becomes a lot more usable and starts making sense.