10 ms·
Is it better to turn up the volume in the software or on the speakers?
- shawnz 14y agoThe 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%.
- mbell 14y agoIn my experience its often that the output driver gets saturated. For example if I plug my old iPod into the standard apple earbuds which have a very low impedance (~25 ohms at 100hz) I can easily push the output stage into clipping. Basically the supply rails can't push enough current and as a result the voltage of the rails sags down low enough to clip the output. On the other hand if I plug in my Sennheiser HD580 headphones with an impedance around 300 ohms I can't push the output into clipping (unless the source was clipped to begin with of course).
- cuu508 14y agoFor some phones at least it is not digital clipping, but speaker distorting the sound. A simple test would be to attach speakers or headphones. If it sounds bad both on internal speaker and external speakers, then, yeah, it's digital clipping. If only the internal speaker, then it's simply too weak to handle the signal, or phone chassis starting to resonate or something like that.
- goostavos 14y agoI'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.
- ynniv 14y agoYes, some media players sound louder than others. I haven't verified, but I suspect that they achieve this by purposely increasing the gain and inducing clipping. That sounds dumb, but weak computer speakers can't compensate for low mastering. The proper thing would be to compress the dynamic range, but that's real work compared to just inducing some clipping. Play a song in iTunes at 100% and compare to VLC @ "33%".
- silvestrov 14y agoFrom "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.
- sek 14y agoThis is one of these questions i wondered about for decades, but never looked it up.
- themckman 14y agoAnecdotally, I "feel" I get better definition in the music I'm listening to when my Mac volume is maxed and I adjust the listening volume at the speakers, rather than the other way around.
- pedrocr 14y agoI 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 14y agoIn 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...
- 14y ago
- opminion 14y agoWhich reminds me, why isn't having a single volume control a solved problem?
- CKKim 14y agoBecause computers and software work by linking together components often without sufficient communication between the pieces to easily centralise operation.
- opminion 14y agoAnd unfortunately a centralised volume control might require defining standards. I wonder if there is a way to hack around that.
- miahi 14y agoBecause 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 14y agoIt 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_ 14y agoThere does happen to be at least one operating system that supports this: Windows. ^___^
- rhplus 14y agoYep, 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/aa511278.aspx#mixing http://msdn.microsoft.com/en-us/library/windows/desktop/aa51...
- colanderman 14y agoThe "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 14y agoAlsamixer 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 14y agoThis 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.
- scep12 14y agoThis is spot on - thanks for posting this. You shouldn't be putting your OS volume at 100% - I never put mine past 50% when i'm sending the signal out.
- davidcuddeback 14y ago> You shouldn't be putting your OS volume at 100% Isn't that only true if you're using your sound card's analog output? If you're using a digital output, I would imagine you would want to keep it at 0dB (no gain and no attenuation). Am I right or am I missing something?
- naner 14y agoThis 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 14y agoPulseAudio 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.
- PhrosTT 14y agoMore of this on the frontpage please.
- tocomment 14y agoWhy 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 14y agoMaybe 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.
- JoshTriplett 14y agoImmersion: if you have to go use the OS UI for volume rather than part of the player UI, that makes it more likely that you'll stop using the player and do something else. That doesn't make it a good reason...
- fredsted 14y agoI've got a soundbar connected to a Dell U2711. If I play a piece of music on YouTube and the volume (of the YouTube player) is above 50%, the sound is distorted. Since I can't control the volume in Mac OS X, and changing the volume on the soundbar itself doesn't stop the sound from distorting, I'm dependent on the volume control of the application I'm using.
- manaskarekar 14y agoI'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.)
- nagrom 14y agoFrom the link, it appears that to get 'lower' volume, you scale the output values if digital, whereas you may scale the output signal if analogue. If you have an analogue output (stereo jack), then you probably generate a lower-power output and therefore save energy by turning the volume down. If you use digital out, then the volume of your local device doesn't have any bearing on the battery life of that device, because you are effectively putting out numbers. But I could be wrong!
- mbell 14y agoA 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).
- senthilnayagam 14y agoI tried increase volume via VLC and macbook pro speakers got fried, will stick with using external speakers and changing volumes on them
- larskinn 14y agoThat'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.
- bitteralmond 14y ago+1 to the best answer-- always turn up your iPod before your speakers, folks. It makes all the difference.
- zio99 14y agoGarbage 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 14y agoI 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 14y agoIt makes me very glad that Windows ... either Vista or 7 and on have allowed individual-app volume control
- c0nsumer 14y agoThis 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.)
- SeanLuke 14y agoI 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.
- deleted 14y ago[deleted]
- matheusalmeida 14y agoI think you're absolutely right and it's not the first time and I'm sure it will not be the last time that a very verbose post (read well structured with references and mentioning technical terms) gets much more credit than it deserves. It would be nice to have some statistics about the number of lines of a reply on SO or HN and the amount of 'upvotes'. I think a lot of people would be surprised...
- ZoFreX 14y ago> 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.
- martincmartin 14y agoIf you can't tell the difference by listening to it, it doesn't matter.
- andreasvc 14y agoI 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.
- CamperBob2 14y agoIn 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.
- guelo 14y agoOther 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.
- jpdoctor 14y agoLet'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.
- nodrama 14y agoif 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).
- crististm 14y agoWhile we're at it - please use a logarithmic scale for your volume slider if you're implementing one.
- AngryParsley 14y agoIf 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.html http://nwavguy.blogspot.com/2011/12/apple-macbook-air-5g.htm...
- thirdsun 14y agoI 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 14y agoUpscaling 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.
- armored_mammal 14y agoIsn't this one of those 'it depends' questions?
- maked00 14y agoStupid 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.
- gosub 14y agoI once thought about a naive streaming audio compression: If the client volume is 50% or less, send only the relevant bits.