
Is it better to turn up the volume in the software or on the speakers? - ivoflipse
http://superuser.com/questions/492281/from-a-quality-perspective-what-is-better-turning-volume-up-in-the-software-i
======
SeanLuke
I was surprised by the best answer as it seems to me to be more or less wrong.

Let's ignore the discussion about dynamic range and bit depth etc., and assume
that the volume control on your operating system controls the DAC rather than
doing the stupid thing of digital volume reduction. The fundamental issue is
signal to noise ratio on the analog line. If you turn the volume too far down
on the computer and turn the volume up on your speakers, the sound on the
analog line is too low with regard to the electrical noise and will be hissy.
If you turn the volume up too much on the computer and turn the volume down on
your speakers, then the signal will be so loud as to produce distortion either
in the DAC or on the line itself. You're looking for a middle ground: as loud
an output from the computer that you can produce without causing distortion in
your loudest music parts. Once you've got that set, change the volume on the
speakers to compensate.

~~~
ZoFreX
> assume that the volume control on your operating system controls the DAC
> rather than doing the stupid thing of digital volume reduction

Is this a safe assumption though? As much as I consider myself knowledgeable
in this area, this is way off my radar.

Even if this assumption does hold, the answer does make a good point when it
comes to per-application volume controls, which are certainly performed
digitally.

Your point on SNR is a very good one, particularly on the low-end, but I would
question whether any computer at max volume would produce a signal strong
enough to cause distortion. I generally run my computer at around 90% volume
but that's merely a habit carried over from having an analog hifi stack.

~~~
hammock
Guy with some sound knowledge here. It doesn't matter if the attenutation is
done digitally (as described by the top SE comment) or in analog fashion. The
answer is always the same. In the music biz the general rule is: you want to
put as much gain as early in the chain as possible. In other words, start at
the source of the sound, and working your way towards the speakers, turn it up
as loud as you can without distorting it.

Take the example of a guitarist. He turns his guitar up as high as he can,
then the amp gain as high without distorting it. Then at the sound console.
etc

The reason for this the later in the chain you are, the more electronics and
cable is involved which adds noise to your signal. Highest signal-to-noise is
achieved by ensuring you have as much signal as you can running thru from the
get-go.

In the case of a computer, again it doesn't matter how volume changes are
done- crank up your software as high as you need (but not beyond the point of
distortion), then adjust it further at the speakers.

~~~
anthonyb
_> Take the example of a guitarist. He turns his guitar up as high as he can,
then the amp gain as high without distorting it. Then at the sound console.
etc_

Without distorting it? Are you sure you have some sound knowledge? That
doesn't sound like you know many guitarists... ;)

qv. <https://www.youtube.com/watch?v=4gDsbOraiqg>

~~~
iamdave
I've worked in Austin as a live sound mixer (FOH engineer, as we say) for a
while now, and it's evenly split-some will say build your gain structure using
the exact method; up until you clip, and back off from there.

------
jpdoctor
Let's try to put this discussion on the right track. (There doesn't seem to be
any posts here from people who actually design analog circuits.) The SO post
reduces to comparing two versions of noise: One from (A) software control of
the DAC and the other (B) from hardware.

(A) Pretend that everything except the DAC was noiseless: The noise would be
due to the nonlinearities and quantization in the DAC.

(B) Pretend that the DAC was perfect: The noise would be dominated by the
noise-equivalent input-power introduced by the resistance present in the
components (including the transistors used for amps).

In short: (A) is a function of how wide the range of bitcodes that you use.
The smaller the range, the larger the noise component relative to the signal.

OTOH: (B) is a function of temperature: All of the noise power before the
final dial to your amp is passed through as is the signal, so the ratio stays
constant. There is also a constant noise power introduced after that final
amp, but I would guess it is negligible compared to the amplified noise power.

So tl;dr = For a decent sound card, maximize the software volume and then use
the analog dial.

------
zio99
Garbage in, Garbage out.

Max your software (usually this is 80% to prevent clipping and distortion),
then attenuate speakers to 50% (analog boost is much worse than digital as it
raises the noise floor).

Source: Mixing at studios for last 10 years

~~~
kafkaesque
I came in to say the same thing (having been in bands and recorded quite a bit
and working with sound engineers).

On a similar note, I learned and practised all this in another country and I
always thought it strange why when I, for example, flipped to American
channels, the volume would increase dramatically. I think a similar phenomenon
occurs in radio (Loudness Wars) and in malls, etc. Now I wonder if it occurs
in American software.

~~~
sukuriant
It makes me very glad that Windows ... either Vista or 7 and on have allowed
individual-app volume control

------
shawnz
The best answer neglects to address something I've noticed in the past: Many
phones and portable media players seem to clip when you set their volume to
maximum -- that is to say, what reads as "100%" sounds more like "120%". I
haven't measured this effect, and I've never seen it documented anywhere, so I
don't know whether or not it's just my imagination -- but I've personally
observed it with pretty much every phone I've owned.

On the PC, though, I rarely set my system volume to anything other than 100%.

~~~
goostavos
I've noticed this too. I suspect it is, at least in part, due to the poor
quality of the DACs on most phones.

I used to own a Samsung Moment; trying to listen to music on it was almost
unbearable due to the quality. It must have been dumping bits left and right
during the conversion. I tried 320kbps Mp3s, Broadcast Wavs, Flac -- it didn't
matter everything sounded like it was crushed down to a 32kbps.

I'd be interested in seeing a phone dedicated to high quality playback of
music. As a somewhat audiophile-ish guy, I would snatch up such a piece of
technology.

------
colanderman
The "best" answer seems wrong or at best misleading -- I would be very very
surprised if the user-visible OS master volume control, which typically
controls the sound card directly, was not directly controlling op-amp gain at
some later stage of the sound card.

Assuming this is true, the correct option would be to maximize any application
volumes (e.g. YouTube), to maximize master volume to a level just below the
sound clips (distorts) at the amplifier input, and to reduce the amplifier's
pre-gain (if it has any) so the master volume control has a reasonable range.

This method will minimize the _three_ (not just one) culprits of poor computer
audio quality: quantization at the application layer, electronic interference
over the physical connection, and clipping at the pre-amp.

~~~
nitrogen
Alsamixer for Linux makes this much easier, as it shows the actual level in dB
(at least for any sound card I've ever owned). For example, 0dB (maximum
volume without clipping) is at ~74/100 on one of my cards, not 100/100.

~~~
davvid
This is true. This is hardware-specific, which you may have hinted at when you
said "on one of my cards". The onboard Intel sound card on my Debian system
shows 0dB at 100/100 in alsamixer.

------
martincmartin
If you can't tell the difference by listening to it, it doesn't matter.

~~~
andreasvc
I was thinking exactly this, but then remembered that this goes for all
audiophile matters across the board, and people who are into that probably
won't listen to this advice anyway.

------
tocomment
Why do you guys think every sound application bothers to put a volume control?
Wouldn't they figure every device that plays sound already have its own volume
control?

For example if you built the YouTube player, what makes you think you need a
volume control?

~~~
polyfractal
Maybe I want to listen to Youtube in the background while listening to
something else at the same time? Per-application sound controls can be
important at times.

Or if some Youtube video has obnoxious sound and I want to mute it, but want
to keep my music playing from Spotify.

------
silvestrov
From "best" answer: _Reducing volume in software is basically equivalent to
reducing the bit depth_

This is really only true when The Audio System represents samples as integers
and not floats like CoreAudio does.

~~~
pedrocr
I don't think that's the case. Here's your pipeline:

App->CoreAudio->HWSoundCard->Speakers(or amplifier)

By using floats in the sound API you don't reduce the bit depth on the first
step but you still do on the next two steps. Imagine a scenario where you want
to set the volume at half the maximum volume. Your two options are:

1) You set the app to 50%. Core Audio handles that as floats but still has to
program the hardware to only output half volume, so if the HW itself doesn't
take floats the bit depth is halved. And the HW will always have to output
half the voltage so the "voltage depth" of the third step is always halved.

2) You set the speakers to 50%. All the pipeline functions at 100% bit/voltage
depth all the way to the speakers/amplifier. Only then, at the final
amplification stage, does the signal not get boosted to 100% and only to 50%.

How much this affects real world performance beats me...

~~~
silvestrov
In theory yes, but our ears can't hear below ca. 0 db, so the bits lost below
0 db were wasted anyway.

So if you use a 24-bit DAC, those bits doesn't matter...

~~~
Derbasti
For digital signals, 0 dB usually means full power. That scale is typically
denoted dB FS ("full scale"). Other scales are dB SPL ( "sound pressure
level"), which is what you where probably referring to.

So in other words, you are probably saying that reducing the signal loudness
is reducing your signal-to-noise ratio and thus your audible dynamic range.
However, your noise floor is probably far higher than 0 dB, more like 20-30 dB
SPL (if you're lucky!). A normally-loud (that is, non-damaging) music playback
will probably be at about 50-80 dB, so your usable dynamic range will be about
30-60 dB, which translates to about ten bits. Most environments will be worse.

0 dB are actually pretty hard to come by. Even well-insulated acoustical
measurement chambers only go to about 10 dB. Only several meter of acoustic
foam and a solid foundation and a purpose built air conditioning can go down
to 0 dB. So, umm, 0 dB is usually a rather useless figure for non-scientific
purposes.

------
manaskarekar
I'm surprised no one has discussed battery life yet.

One of my 'weird unverified theories of life' is that turning the volume on
portable device down (laptop/phone/mp3 player) and the volume on the speakers
up saves the battery of the device itself. (For example when you're in a car.)

~~~
mbell
A small amount, perhaps. In all likelihood your probably better off setting
the volume on the device somewhere in the middle, but this will vary based on
device. Two major things come into play:

1) The input impedance of powered speakers or any external processing stage
will be high. ~5-10k ohms, compared to 80-500 ohms for an average set of
headphones. This means regardless of the level you use on the player the
current draw will be substantially lower than it would be if driving
headphones. This means the level doesn't matter nearly as much.

2) The efficiency curve of the output amplifier. Depending on the topology of
the output amplifier of the device it may be more or less efficient at
different power levels. If the output driver is a class AB topology it
actually gets more efficient as it nears its rated output (generally the
relationship is logarithmic). As a result you can actually be 'better' overall
on power to using a higher power level at some points in the curve. You use
more power to drive the output but you also increase efficiency reducing your
overall power usage. Class AB is pretty in-efficient anyway as your only going
to see 30-50% peak efficiency. With a class D output which is becoming more
popular you can see upwards of 90% but your efficiency vs output power curve
is generally sharper, you get much closer to peak efficiency much faster
(depending on the exact design of course, most portable devices will be
filter-less class D topologies).

------
AngryParsley
If you're on a mac, you can obviate a lot of bit depth issues by opening
/Applications/Utilities/Audio MIDI Setup.app. From there you can see all your
audio input and output devices, and set their frequency and bit-rates. Most
default to 44kHz/16-bit, but a saner setting is 44kHz/24-bit.

You can see the objective differences between 16-bit and 24-bit output in
NwAvGuy's measurements of the 2011 MacBook Air's DAC:
[http://nwavguy.blogspot.com/2011/12/apple-macbook-
air-5g.htm...](http://nwavguy.blogspot.com/2011/12/apple-macbook-air-5g.html)

~~~
thirdsun
I may be wrong but as far as I know setting the output to 24 bit only makes
sense if your music actually is in 24 Bit. Whatever you set in the Audio/Midi
configuration is used as system-wide default output signal - including iTunes
and so on. Of course you want to avoid any further conversion in your signal
chain, which is why it is recommended to match the output configuration in
Audio/Midi settings with the bit depth and sample rate of your music library,
which most likely will be 44,1 KHz/16 Bit - unless, of course, you got your
hands on higher quality masters.

Considering your advice of setting the output to 24 Bit while your audio
collection is (most likely) encoded in 16 Bit, should trigger a conversion
while outputting the audio signal - this conversion is useless, of course, as
you can't turn this material into something it isn't (imagine upscaling 720p
video to 1080p, new packaging, same old content/quality). Yet, and correct me
if I'm wrong, the conversion still happens and alters the signal.

So, to avoid this match those audio/midi settings with your music library.
There are also expensive iTunes alternatives that deal with this problem by
adjusting the output settings to the currently playing audio file on the fly -
in case your library consists of mixed bit depth/sample rates. I don't use
those solutions though.

~~~
danbee
Upscaling from 720p to 1080p will not lose any information if it's done
properly. Similarly, upscaling from 16-bit to 24-bit will not either, and
running the audio output at 24-bit has the advantage that quantization noise
from volume scaling is a non issue. This means software volume controls will
not result in perceptual quality loss.

------
naner
This seems like it should be a simple straightforward issue, but I still have
problems with ocassionally getting clipped audio (or some kind of distortion,
I'm no audio expert) on Windows 7 with Realtek's "HD Audio" chipset/driver.

As far as I can tell, I rarely if ever have this problem with the same
hardware in Linux with PulseAudio (though I can intentionally cause it using
alsamixer by pushing "Master" to 100%) and didn't have this problem in the
past on Windows with Creative Labs soundblaster cards.

~~~
andrewaylett
PulseAudio does nice things: it looks at the requested volume level for each
input and output, and arranges the actual controls on each intermediate stage
to keep the values as high as possible without clipping, while also making use
of knowledge of each mixer's stepping values to give you finer control than
your hardware would give you by default :). It does rely on your sound
hardware correctly reporting its actual amplification characteristics, but it
seems that most hardware is pretty good nowadays, or at least consistent
enough to get worked around.

------
crististm
While we're at it - please use a logarithmic scale for your volume slider if
you're implementing one.

------
c0nsumer
This gets even more different when devices contain a digitally controlled
potentiometer between the DAC and the amp. I believe Macs do this, with the
main system volume control actually stepping down the voltage of the signal
being fed to the amp. Since this is an analog control one doesn't lose bit
depth when turning down the volume and thus this is a fine system to use.

Not all machines work this way, though. One way to check is to hook up an
external amp and headphones, turn the computer's volume way down and the amp
up to listen levels. If the quality is crap the it's probably just decreasing
the bit depth. Or you can do a teardown on the sound pathway.

(Oh, if it isn't clear by this point, keep all your apps turned all the way up
for best quality. Only turn them down on an individual, as-needed basis. All-
software stuff has to decrease bit depth to decrease volume on a per-app
basis.)

------
PhrosTT
More of this on the frontpage please.

------
guelo
Other posts here are making the point that the range in digital controls often
includes some dB gain by the time you get to MAX. That digital boost can be
very useful when using a laptop with barely audible speakers. I like how VLC
makes it explicit with a volume control that goes up to 200%. It would be nice
if OS level volume knobs worked the same way so you could always chose your
level of distortion vs gain.

------
CamperBob2
In the software. Noise early in the signal chain counts for more than noise
later. If you can get noise-free gain by changing a scalar value in a
register, it'd be a mistake to turn it down in favor of increasing the gain in
an analog stage later on.

For the case where an analog potentiometer immediately follows the DAC, of
course, there's no practical difference.

------
opminion
Which reminds me, why isn't having a single volume control a solved problem?

~~~
miahi
Because you can have more than one application with sound output. I like
listening to music while I play games; I set the music to 80%, and I set the
game to 15-20% volume. This cannot be implemented in one single volume
control.

~~~
schlomie28
It would be nice if all your running apps volumns could be controlled from a
single place though, rather than having to hunt around for menus in each app.

~~~
Cthulhu_
There does happen to be at least one operating system that supports this:
Windows. ^___^

~~~
rhplus
Yep, since at least Vista, I think. The UI guidelines recommend against in-app
volume controls for everything except media players:

[http://msdn.microsoft.com/en-
us/library/windows/desktop/aa51...](http://msdn.microsoft.com/en-
us/library/windows/desktop/aa511278.aspx#mixing)

~~~
miahi
This doesn't work well with games. Yes, you could change the volume settings
from there, but most 3D games are full screen and it's not usual to alt-tab
the game just to modify the volume settings.

------
maked00
Stupid idiot answers all.

Volume should always be controlled as close to the source as possible.
Anything else is simply inefficient and a waste of processing power.

There is no reduction of bit depth. total hoo-eee.

------
senthilnayagam
I tried increase volume via VLC and macbook pro speakers got fried, will stick
with using external speakers and changing volumes on them

~~~
larskinn
That's because VLC lets you adjust the volume above 100%. Generally not a good
idea. If you avoid that, you should be fine.

Also worth noting, if you attenuate the signal (in software) from the computer
you generally won't attenuate the noise, meaning that at the same perceived
loudness from your speakers the sound will include a lot more noise. On my
2007 MacBook Pro this is very audible.

------
gosub
I once thought about a naive streaming audio compression: If the client volume
is 50% or less, send only the relevant bits.

------
bitteralmond
+1 to the best answer-- always turn up your iPod before your speakers, folks.
It makes all the difference.

------
nodrama
if you have some cheap speakers, set hardware volume somewhere over 50% and
then never touch it. Use the software volume. That's because the hardware
volume button will almost certainly break (mine were Logitech).

------
armored_mammal
Isn't this one of those 'it depends' questions?

