IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
How does software volume control work ?
goodsound
post Mar 1 2006, 18:30
Post #1





Group: Banned
Posts: 179
Joined: 6-February 06
Member No.: 27586



How exactly does software (windows mixer, players like foobar, etc..) volume control work ? Is it the equivalent of replay gain or normalizing ? or is it more "electronic" or "hardware" than that ?
Thanks.
Go to the top of the page
+Quote Post
Shade[ST]
post Mar 1 2006, 18:37
Post #2





Group: Members
Posts: 1189
Joined: 19-May 05
From: Montreal, Canada
Member No.: 22144



It can be approximated by normalizing. No analysis is performed on sound to determine percieved loudness; It simply multiplies the played back samples by a constant number.
Go to the top of the page
+Quote Post
gasmann
post Mar 1 2006, 18:38
Post #3





Group: Members
Posts: 112
Joined: 18-August 05
Member No.: 23986



It depends. Windows Mixer and most players use the sound drivers implementation for setting the volume.
Foobar2000 does it on it's own - it scales the output before sending it to the driver, and is thereby not using the sound drivers implementation. However, it depends on it too since the data sent to the driver by foobar will be output to speakers/headphones etc. at the sound drivers volume setting. So in this case it's like two mixers in a chain.

And no, it doesn't have anything to do with rg or normalizing in this case. Normalizing means scaling the waverform so that the peak is at or very near 100% (-0dB), and RG means making all tracks/albums have the same overall loudness.

This post has been edited by gasmann: Mar 1 2006, 18:39


--------------------
flac 1.2.1 -8 (archive) | aoTuVb5.7 -q 4 (pc, s1mp3)
Go to the top of the page
+Quote Post
Shade[ST]
post Mar 1 2006, 19:09
Post #4





Group: Members
Posts: 1189
Joined: 19-May 05
From: Montreal, Canada
Member No.: 22144



You don't have to normalize to a specified level. Normalization only involves multiplying a statistic set by a constant number.

http://en.wikipedia.org/wiki/Audio_normalization
Go to the top of the page
+Quote Post
saratoga
post Mar 1 2006, 19:20
Post #5





Group: Members
Posts: 4968
Joined: 2-September 02
Member No.: 3264



In addition to scaling the samples, some software (Ipod OS for instance) controls the output power level on the audio hardware.
Go to the top of the page
+Quote Post
goodsound
post Mar 1 2006, 20:11
Post #6





Group: Banned
Posts: 179
Joined: 6-February 06
Member No.: 27586



but what exactly happens when "scaling" ? I am asking about the implementation details. For example, normalizing works by adding bits to the actual sample(right?). Likewise what does scaling do ?
Go to the top of the page
+Quote Post
Fandango
post Mar 1 2006, 20:42
Post #7





Group: Members
Posts: 1548
Joined: 13-August 03
Member No.: 8353



What bothers me all the time is that there is very rarely any values shown of how much the volume is changed. At most we get a slider, that's all. No percent scale is shown, you have to "guess" it with your eyes or count the marks, steps on the slider, which is either no guarentee that you will set the volume to a specific level or very cumbersome to hit the cursor keys 20-40 times every time you or worse an application has changed the driver volume settings. This is too old-way analog for me, using a slider. I want to be able to set the volume more precisely, or at best lock them, so that no program can change them on their own (Real Player/Plugin).

The only mixer control programs that I remember that let the user do this were made for Linux/BSD type systems. There were many of them because it was as easy as opening a file (/dev/mixer) to manipulate the drivers settings.
Go to the top of the page
+Quote Post
AndyH-ha
post Mar 1 2006, 21:09
Post #8





Group: Members
Posts: 2207
Joined: 31-August 05
Member No.: 24222



QUOTE
normalizing works by adding bits to the actual sample(right?)
No, no bits are ever added or subtracted. Each sample is a number, a signal level measurement, normally expressed in dB for convenience. That value is modified, increased or decreased, so the new value (the new signal level) is closer to, or further from, 0dB.

As you decrease the volume level, sample values decrease below the minimum supported (e.g. aprox -96dB for sixteen bit files) so you are effectively decreasing the bit depth.
Go to the top of the page
+Quote Post
goodsound
post Mar 1 2006, 22:07
Post #9





Group: Banned
Posts: 179
Joined: 6-February 06
Member No.: 27586



If I understand correctly, the software volume control acutally only 'reduces' the volume - from 0 to -96. It cannot 'increase' it.

So at max volume level the actual sample value is used, and at say 50% volume the actual sample value is divided by 2 before its passed on ?
Am I thinking this through correctly ? If this is correct then does this messing around with the actual/real sample value in any way affect the sound ?
I'd imagine not, but....
Go to the top of the page
+Quote Post
Shade[ST]
post Mar 1 2006, 22:14
Post #10





Group: Members
Posts: 1189
Joined: 19-May 05
From: Montreal, Canada
Member No.: 22144



QUOTE (goodsound @ Mar 1 2006, 03:07 PM)
If I understand correctly, the software volume control acutally only 'reduces' the volume - from 0 to -96. It cannot 'increase' it.

So at max volume level the actual sample value is used, and at say 50% volume the actual sample value is divided by 2 before its passed on ?
Am I thinking this through correctly ? If this is correct then does this messing around with the actual/real sample value in any way affect the sound ?

That's approximately it. However, some badly programmed drivers cannot treat sample values that go over a certain point, and that's why you can have clipping when above a certain volume setting in the windows mixer.

eg : say you have a sample value that goes from -32768 to 32767; the volume control will multiply the sample by a number between 0 and 1, and then truncates it. Eg :

a sample at 345 with volume at 50 % (0.5) will be down to 172 after volume setting.

Now let's say that a sound driver can't play samples if they're above, say.. 30000. Some music will clip (all values above 30000 will be brought to that number), and the playback will sound worse.
Go to the top of the page
+Quote Post
goodsound
post Mar 1 2006, 23:16
Post #11





Group: Banned
Posts: 179
Joined: 6-February 06
Member No.: 27586



QUOTE
.and then truncates it.

dang..I was afraid of that! Atleast theoritically all that rounding/truncating will skew the resulting waveform. It won't really be a half-size 'image' of the original. Not sure if this results into any perceivable distortion. Does it ?

This post has been edited by goodsound: Mar 1 2006, 23:18
Go to the top of the page
+Quote Post
Shade[ST]
post Mar 1 2006, 23:27
Post #12





Group: Members
Posts: 1189
Joined: 19-May 05
From: Montreal, Canada
Member No.: 22144



If there is no clipping, the truncating and / or rounding should not be detectable to human ears. It's less than 0.01 db volume amplitude change.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st September 2014 - 11:53