Digital attenuation?
Mar 7, 2005 at 11:34 PM Thread Starter Post #1 of 13

cosmopragma

Headphoneus Supremus
Joined
Dec 30, 2003
Posts
3,091
Likes
12
Location
Germany
What I want:
I want to bypass all those pots in my amps because of the inherent precision issues.
What I already know:
In the realm of the 16 bit format digital attenuation is lossy.IIRC I loose 1 bit for every -6dB attenuation.This loss won't make that much of a difference for overcompressed modern rock/pop, but for music covering the whole dynamic range like classical music this is unacceptable.

Most of my DACs and soundcards are already capable of 24 bit operation.
I would like to transfer my 16 bit music into a 24 bit format, and afterwards I could use the 8 insignificant bits = 256 steps for lossless digital attenuation.

Audio processing pipeline of foobar2000:
Decoder--> replaygain>DSP (volume control is a DSP-effect) >convert to output data format (in our case that would be 24 bit)>output (to the DAC).

What I need is something like:
Decoder-->replaygain-->ordinary DSP(which are designed for 16 bit input)-->convert to 24 bit format-->volume control-->output

Is there such a plug-in or is my idea totally flawed?

Edit:
In my cofiguration ( RME Digi 96/8 --> Benchmark DAC) no software player based volume control works.I know the RME uses it's own driver and bypasses K-mixer this way, but how does it bypass the volume control of foobar or winamp?I mean, any other DSP-effect works, except volume control.
 
Mar 8, 2005 at 12:30 AM Post #2 of 13
Bumping my own thread after a few minutes feels foolish, but i really want clean digital attenuation instead of inferior analog pots or expensive stepped attenuators which don't fit into existing cases.
 
Mar 8, 2005 at 12:43 AM Post #3 of 13
I think DSPs should work with 24 and 32 bit depth. If you just set foobar to 24/32 bit operation, won't it first convert to 24/32 bit and then apply all DSP? Isn't that best?
 
Mar 8, 2005 at 12:54 AM Post #4 of 13
Quote:

Originally Posted by CSMR
I think DSPs should work with 24 and 32 bit depth. If you just set foobar to 24/32 bit operation, won't it first convert to 24/32 bit and then apply all DSP?


Unfortunately AFAIK neither foobar nor other players convert first and apply volume control in 24 or 32 bit mode.
Again, this is what foobar itself claims it does Quote:

Audio processing pipeline of foobar2000
Decoder--> replaygain>DSP (volume control is a DSP-effect) >convert to output data format (in our case that would be 24 bit)>output (to the DAC).


The conversion to a higher bit rate comes after the DSP-effects.
 
Mar 8, 2005 at 1:13 AM Post #5 of 13
If i were you, i would Ditch that worthless foobar volume control..... and use the Foobar Preamp. They are basically the same thing but the preamp is a bit better. I usually go for -6dB on the preamp and adjust the volume on my external amp.

Depending on your source, your best path is to raise the volume on everything you have and then have a volume control on the last link in your chain. ie. Max volume on your source before clipping sets in. Personally my setup goes like this..

Foobar(Preamp -6dB) -> 0404 -10dB analoge session - > PPA ALPS POT
 
Mar 8, 2005 at 1:21 AM Post #6 of 13
Quote:

Originally Posted by cosmopragma
Unfortunately AFAIK neither foobar nor other players convert first and apply volume control in 24 or 32 bit mode.

Again, this is what foobar itself claims it does The conversion to a higher bit rate comes after the DSP-effects.



The internal processing of foobar is 64bit and that includes the volume. The conversion at the end is to lower bit rate to 24, 16, etc.

You don't really have 8bit of room to lower the volume because DACs can't resolve 24bits really. It's maybe only 18 to 20bit or so of real performance.

But the thing about this is, the final outcome still depends on the quality of all the parts of the DAC and even the interconnect. I know you're not into the volume pot but there is an advantage of sending a powerful signal to the amp. There's just less loss and less interference per percetange of the signal coming from the source.
 
Mar 8, 2005 at 1:22 AM Post #7 of 13
Quote:

Originally Posted by llmobll
If i were you, i would Ditch that worthless foobar volume control..... and use the Foobar Preamp. They are basically the same thing but the preamp is a bit better.



Where is this foobar preamp? i don't see why it's better.
 
Mar 8, 2005 at 11:41 PM Post #8 of 13
Quote:

Originally Posted by cosmopragma
What I want:
Is there such a plug-in or is my idea totally flawed?



Your idea is flawed. By definition, there is no such thing as lossless attenuation (in the digital realm). Lossless means no change, attenuation mean change. You cannot attenuate a signal digitally losslessly. Every bit you add increases the MAXIMUM dynamic range by about 6 dB. The problem is that the source is already 16 bit so you cannot add dynamic range to the source. If you want to attenuate a digital signal from 16 bit, you are saying that you want the maximum dynamic range lowered. By using 24 bit output you can decrease the "steps" between changes, but it is still not lossless.

Edit: I think your idea might also flawed in the reasoning behind digital attenuation. The point of having 16 bits is so that you can have loud parts and also have quiet parts that do not have noise. If you want to attenuate the signal, that means you probably do not want to play your music as loud and thus, you can get away with fewer bits representing things and you still will not hear noise at low volume levels. This is whole point of bitdepth. That is why it is perrfectly acceptable to have for instance 12 bit sound if you are not going to play it very loud. This is basically what happens whenever you turn down the volume in the digital realm.
 
Mar 9, 2005 at 1:00 AM Post #9 of 13
Quote:

Originally Posted by philly4
Your idea is flawed. By definition, there is no such thing as lossless attenuation (in the digital realm). Lossless means no change, attenuation mean change. You cannot attenuate a signal digitally losslessly. Every bit you add increases the MAXIMUM dynamic range by about 6 dB. ...


The application of dither can increase the dynamic range. It takes large collated quantizaton errors and redistributes them across the spectrum as white noise. It is applied whenever bits are truncated. Basically it is adds a randomization on the least-significant bit. It also doesn't really matter too much if the volume function is applied pre or post resampling. Obviously I would pick post if I had my choice though. In short, I think doing it in Foobar is fine. Maybe I can record a couple files at 100% and 50% and see if the constant 0.5 checks out...
 
Mar 9, 2005 at 2:27 AM Post #10 of 13
Quote:

Originally Posted by jefemeister
The application of dither can increase the dynamic range.


(I am no expert on dither so please correct me if I am wrong about the following)
Not really. You do not want to just apply dither to a signal. That just adds noise. You apply dither when you are changing bit depths to decrease distortion introduced during that process. Dither will not simply increase the dynamic range of 16 bit for example. It can increase the dynamic range of the resultant signal in bit conversion situations.

Take this example: You have a 24 bit source, you want to put it on a CD so you need to change it to 16 bits. In that conversion process, you can either dither or not. The dithered version will have a higher dynamic range than the non dithered, but the dynamic range will actully be lower in both situations than the 24 bit version (unless the 24 bit version did not have more than 16 bits worth of dynamic range etc, but not higher). In short, it doesn't increase dynamic range, it just helps preserve as much dynamic range as possible of the original. Any process like this can't increase the dynamic range of the original.
 
Mar 9, 2005 at 10:33 PM Post #11 of 13
Quote:

Originally Posted by philly4
Your idea is flawed. By definition, there is no such thing as lossless attenuation (in the digital realm)


Well, twentyfive years ago I've studied computer science and today I've recalled my nearly forgotten knowledge from those days.
You are right, digital attenuation isn't totally lossless, but the loss is small, and I think in theory much smaller than the loss induced by analog technology.
I've googled around today and found this.
Seems that my dream of superior digital attenuation (as far as Redbook audio is concerned) isn't impossible.
 
Mar 10, 2005 at 1:04 AM Post #12 of 13
Quote:

Originally Posted by philly4
(I am no expert on dither so please correct me if I am wrong about the following)
Not really. You do not want to just apply dither to a signal. That just adds noise. You apply dither when you are changing bit depths to decrease distortion introduced during that process. Dither will not simply increase the dynamic range of 16 bit for example. It can increase the dynamic range of the resultant signal in bit conversion situations.



you're absolutely correct. I was refering more to dither as part of the whole process. perhaps DR wasn't quite the right term.
 
Mar 10, 2005 at 1:06 AM Post #13 of 13
Quote:

Originally Posted by cosmopragma
and I think in theory much smaller than the loss induced by analog technology.


I agree. It's just analog methods don't have nice words to apply like "bit loss." Stepped attenuators are another matter though, I feel this is the best method. But if does probably require another set of interconnects, power supply, etc for the preamp. Digital atten is still nice though, because you can fine tune the volume by remote.
 

Users who are viewing this thread

Back
Top