Announcement

Collapse

Midwest Audio Fest

It’s that time audio enthusiasts! Registration for the 2019 Speaker Design Competition is now open! Visit midwestaudiofest.com for details and to list your speaker project. We are excited to see all returning participants, and look forward to meeting some new designers this year, as well! Be sure your plans include a visit to the Parts Express Tent Sale for the lowest prices of the year, and the Audio Swap Meet where you can buy and trade with other audio fans. We hope to see you this summer! Vivian and Jill
See more
See less

Dumb question: PC/Digital volume

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dumb question: PC/Digital volume

    I'm listening to streaming music via PC at relatively low volume right now, with the volume turned down via the Windows volume control. I started thinking: "Am I loosing bit depth doing this?"

    In other words, should I run volume controls close to max on the digital end, and control volume on the analog end, or does it matter.

    A quick rundown: I just signed up to qobuz, with high-res streaming. Output from the PC is via toslink to a Topping D30, then into a plain vanilla Adcom preamp.

    ...So I have up to 24/192 at the DAC. Am I killing the bit depth with windows volume?

    Disclaimer: I admit I can't really tell the difference with these high resolutions....but it makes me feel better knowing I'm not loosing something ;)

  • #2
    Originally posted by chad1376 View Post
    I'm listening to streaming music via PC at relatively low volume right now, with the volume turned down via the Windows volume control. I started thinking: "Am I loosing bit depth doing this?"

    In other words, should I run volume controls close to max on the digital end, and control volume on the analog end, or does it matter.

    A quick rundown: I just signed up to qobuz, with high-res streaming. Output from the PC is via toslink to a Topping D30, then into a plain vanilla Adcom preamp.

    ...So I have up to 24/192 at the DAC. Am I killing the bit depth with windows volume?

    Disclaimer: I admit I can't really tell the difference with these high resolutions....but it makes me feel better knowing I'm not loosing something ;)
    Here is what I think happens during playback:
    The player plays the source (local or streaming)
    This digital audio stream is passed along to the OS.
    The OS applies the volume control
    Then OS passes the volume-modified bitstream to the DAC
    The DAC renders the digital stream as analog audio

    To implement volume control, you are shifting the digital audio representation to a lower value. When the lowest bits drop below the total bit depth (e.g. 16 bits, 24 bits, etc) then they are truncated or rounded, and this constitutes "loss" of signal. The question is whether this is something to be concerned with, or not.

    Case 1: source is 16 btis, not well recorded/mastered. This audio might be 14-16 bits in total depth.
    Case 2: source is 24 bit audio.

    In case 1, the OS will pass the 16 bit audio to the volume control. After shifting down to decrease volume, several of the top bits are now "0" and the lowest bits have been truncated. You have have e.g. 8 bit audio. That would be a loss of quality you could hear.

    In case 2, the same thing happens, but 24 bits is way more signal to noise than the human ear can hear. Assuming the source uses all 24 bits, if the audio is shifted down to decrease the volume, the signal is still 18-20 bits "deep". This is still so much signal range that you will still have excellent fidelity. This is one reason why music is recorded in 24 or 32 bits - it gives lots of room for "error" before any kind of detectable signal degradation can be heard.

    So, the bit depth of the source is more important than that of the DAC. 16 bits (when used full) is plenty of resolution for very high quality audio. It's only when a few of those bits are lost, either by poor use in mastering the recording, or via digital manipulation, that the quality suffers.

    If you can do high-quality attenuation in the analog domain, which I assume you preamp can do, that would be preferable when you are listening to 16bit sources or anything compressed (e.g. MP3, AAC, etc) since those will likely be rendered into a 16 bit equivalent. With 24 bits is really doesn't matter where you attenuate.
    Charlie's Audio Pages: http://audio.claub.net

    Comment


    • #3
      Digital encoding of analog signals uses companding algorithms. They are non-linear schemes designed to accommodate this very scenario. That is, more bits are devoted to encoding the lower signal amplitudes than used for the higher amplitudes. The technique was invented by an AT&T engineer in 1928 (clever, these engineers, eh?). It is used virtually everywhere digital transmission/storage conveys analog signals: CDs, DVDs, cell phones, MP3s, etc. etc.
      Last edited by Millstonemike; 05-11-2019, 08:22 PM.

      Comment


      • #4
        Originally posted by Millstonemike View Post
        Digital encoding of analog signals uses companding algorithms. They are non-linear schemes designed to accommodate this very scenario. That is, more bits are devoted to encoding the lower signal amplitudes than used for the higher amplitudes. The technique was invented by an AT&T engineer in 1928 (clever, these engineers, eh?). It is used virtually everywhere digital transmission/storage conveys analog signals: CDs, DVDs, cell phones, MP3s, etc. etc.
        Ok, I got no clue what you just said. Is that in support of or a rebuttal of Mr. Laub's comments?
        http://techtalk.parts-express.com/fo...khanspires-but
        http://techtalk.parts-express.com/fo...pico-neo-build
        http://techtalk.parts-express.com/fo...ensation-build

        Comment


        • #5
          Originally posted by Kornbread View Post

          Ok, I got no clue what you just said. Is that in support of or a rebuttal of Mr. Laub's comments?
          II'll clarify by example.

          Say you have a signal that varies between 0 and 2.55 V. And you have 8 bit encoding. 8 bits gives you 256 combinations or numbers to encode the signal.

          In a linear scheme, each of the 256 combinations represents 1 mV from 0 to 255 mV. When the signal is 0, the 8 bits are zero representing 0 mV. When the signal is 1.0 V, the 8 bits are encoded as 100 mV. When the signal peaks at 2.55 V, all eights bits are set to one representing an encoding of 255 mV. With this scheme, there is way more error in the lower level signal than in the higher level signal.

          For example: when the signal is 1.5 mv, your encoding choices are limited to 1 mV or 2 mV. At 1 mV, your error is 50% (or 33% depending on your view point). When the signal is 100.5 mV, your encoding choices are 100 mV or 101 mV,or ~0.5% error. This error is called the "quantization" error.

          A non linear scheme (e.g., a companding algorithm) attributes more bits to the lower level signal to reduce error in that range. In an ideal scheme, the bits are assigned to minimize the error for any level of the signal. For example, lets say 3 bits were devoted to signal levels between 0 and 3 mV. Now you have the ability to encode 0.5 mV increments in that range. This reduces the quantization error at low signal levels.

          True companding algorithms are mathematically formulated to optimize the error over the entire signal range. That is, it's better to have 3% error at all signal levels than 0.5% error at high levels and 50% error at low levels.

          So, when a digital signal's volume is low (e.g., using Windows as the volume control), you have similar quantization error on that low signal as you would have had if the signal was at full volume.

          Pretty clever these engineers, eh?




          Comment


          • #6
            So your response is in rebuttal to Mr. Laub's ...
            http://techtalk.parts-express.com/fo...khanspires-but
            http://techtalk.parts-express.com/fo...pico-neo-build
            http://techtalk.parts-express.com/fo...ensation-build

            Comment


            • #7
              Originally posted by Kornbread View Post
              So your response is in rebuttal to Mr. Laub's ...
              I'm not sure what would prevent both posters from being correct. If you clip the bit depth, you'll lose quality, this seems pretty straightforward. Now, digital audio signals being processed in a non-linear manner should not be mutually exclusive to that idea.

              I'm not an expert in this field but it sounds very similar to bit depth and non-linearity (gamma correction) in computer graphics which I am quite familiar with, and both concepts are accurate / applicable there, so I would be somewhat surprised if they don't make sense here.

              Comment


              • #8
                Now, to provide an anecdote of my own: I've found that it's better to have the volume level higher on the source, and to amplify it as little as necessary. With the understanding of what has been posted in this thread, this should maximize the dynamic range and provide optimal single to noise.

                For instance, I noticed a problem with some crackle in my setup recently, my source volume from the PC was set quite low and the amp high. When I increased the source volume and decreased the amp volume, the crackle went away, as I had more signal to noise (i'm not entirely sure if the noise was from the amp, or from the signal being cramped into a low bit depth range due to the low volume from the digital source).

                I expect this concept would apply to pre-amps as well as amps, as Charlie seems to be suggesting.

                Comment


                • #9
                  Originally posted by Millstonemike View Post
                  Digital encoding of analog signals uses companding algorithms.
                  This just isn't true. Starting with Windows Vista, the audio engine in a PC represents audio as 32-bit floating point linear PCM data, and it will convert the audio as needed to the output device. See https://blog.szynalski.com/2009/11/a...s-vista-and-7/ or https://docs.microsoft.com/en-us/win...device-formats

                  Companding algorithms such as A-law and mu-law were popular in the early days of digital telephony to provide 12-bit quality with only 8 bits, but those formats are now part of audio ancient history. Charlie's description is mostly correct--just a lot more happens in the OS than he describes.

                  Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

                  Comment


                  • #10
                    So - based on my caveman interpretation:
                    - Don't worry too much about using low level volume in the digital realm (some loss of bit depth, but it's not necessary linear to the actual volume.)
                    - But it's still better, overall, to maximize digital volume where possible.

                    Comment


                    • #11
                      Originally posted by neildavis View Post

                      This just isn't true. Starting with Windows Vista, the audio engine in a PC represents audio as 32-bit floating point linear PCM data, and it will convert the audio as needed to the output device. See https://blog.szynalski.com/2009/11/a...s-vista-and-7/ or https://docs.microsoft.com/en-us/win...device-formats

                      Companding algorithms such as A-law and mu-law were popular in the early days of digital telephony to provide 12-bit quality with only 8 bits, but those formats are now part of audio ancient history. Charlie's description is mostly correct--just a lot more happens in the OS than he describes.
                      Charlie I'll take your point. Although the original input scheme and the converted output scheme will have a sophisticated algorithms to insure minimal quantization error, Windows converts to a linear scheme in between (where the volume control is applied). However, since Windows uses floating point numbers (as opposed to integer) it should have the ability to minimize the error at low levels using fractional numbers.

                      As to Joes experience, he pints out a good question: Is it the encoding or is it a low analog signal into an amp with high gain? I would think the latter and thus, it''s better to have Windows volume set higher and the amp volume lower.

                      Comment


                      • #12
                        Originally posted by chad1376 View Post
                        So - based on my caveman interpretation:
                        - Don't worry too much about using low level volume in the digital realm (some loss of bit depth, but it's not necessary linear to the actual volume.)
                        - But it's still better, overall, to maximize digital volume where possible.
                        You always want the largest signal out of the gate, purely for SNR reasons.
                        "I just use off the shelf textbook filters designed for a resistor of 8 ohms with
                        exactly a Fc 3K for both drivers, anybody can do it." -Xmax

                        Comment


                        • #13
                          Originally posted by dcibel View Post

                          You always want the largest signal out of the gate, purely for SNR reasons.
                          Yes sir - understood from the get-go.

                          I'm exploring the sonic impacts of being really lazy and not optimizing digital and analog gain in multiple locations every time I want a large change in system volume. In more detail, I have:

                          Digital gain at the streaming app.
                          Digital gain at the overall windows volume control
                          Digital gain within the windows mixer
                          Digital gain within the soundcard settings application
                          Analog gain at the pre-amp (basic volume control)
                          Analog gain at an RCA to XLR "direct box"
                          Analog input gain at the input to an equalizer
                          Analog input gain at the input to a 3-way crossover
                          Analog gain at each output from the 3-way crossover
                          Analog gain to each of the amplifiers.

                          Not looking for an answer here....just elaborating why thinking about this stuff too much can drive me nutty. Lazyness is the key to my sanity.

                          Comment


                          • #14
                            Michael Mardis (Pano at diyAudio) wrote an article about Gain Structure that you might find interesting. He looked at a number of the same issues: https://www.diyaudio.com/archive/art...xt-thread.html. These are "Power Budget" considerations that are very important in several engineering fields, to ensure that you get the right output with minimal noise and distortion. When I was in a System Engineering program, we had a class where we did a lot of calculations like these.
                            Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

                            Comment


                            • #15
                              Originally posted by neildavis View Post
                              Michael Mardis (Pano at diyAudio) wrote an article about Gain Structure that you might find interesting. He looked at a number of the same issues: https://www.diyaudio.com/archive/art...xt-thread.html. These are "Power Budget" considerations that are very important in several engineering fields, to ensure that you get the right output with minimal noise and distortion. When I was in a System Engineering program, we had a class where we did a lot of calculations like these.
                              That's a very well written article - thank you. I'll need to spend some more time reading through the whole thread. I think it will help make sense of my multi-gain 'o rama.

                              Comment

                              Working...
                              X