# How can I practically check audio parameters?

Is there any way (may be program or by hand) to check audio parameters? I ask because I heard somewhere the hi-res audio websites are at certain titles fooling people to believe they bought hi-res audio, but ,in a fact, they have not.

My interest is in two main parameters - sampling frequency and bit depth.

Let alone any compression. We are talking in raw PCM - plain WAV file. Let's say the publisher says it is 192kHz at 24 bits. Is it really 192kHz/24b or the publisher fooled me and the file is just a "regular" 44,1kHz/16b file?

I know many audio players will show me the 192kHz at 24 bits, but the scammer could have theoretically just quadrupled the 48kHz. So, the player is showing the value of file, but not the real frequency.

P.S. Not sure if I am at right StackExchange category?

• I don’t think your question is a bad fit here, but it might be better posted at Sound Design or Signal Processing. – Bob Broadley Mar 25 at 8:37

The Nyquist theorem dictates that the highest frequency that an audio recording can have is 1/2 the sampling frequency. If a song is sampled at 44.1 kHz, the highest possible frequency that it will be able to have will be 22 kHz. If you put an audio file into a spectrogram, you will be able to see what frequencies it has. For example, the spectrogram of this song, which I'm visualizing using Audacity, reveals that the maximum frequency is just under 22 kHz, revealing that it was sampled at 44.1 kHz.

Even if someone were to resample the song at a higher sampling rate, it would have no frequencies above 22kHz, which would be a dead giveaway that it had not actually been recorded and mixed at that higher frequency.

Yes, the existence of actual dynamic and frequency content can indeed be checked.

• Bit depth: check if there is actual non-zero or changing content in all of the bits. For example the "stats" effect of the SoX audio processing tool can give you the apparent bit depth of a file.
• Frequency range: check if there is actual frequency content above the Nyquist rate of a 44.1kHz sampling rate. This can be seen using frequency plots or other statistics.

# Example: checking bit depth using SoX

``````\$ sox --i 0001\ 8\ GR4.aif

Input File     : '0001 8 GR4.aif'
Channels       : 1
Sample Rate    : 48000
Precision      : 24-bit
Duration       : 00:00:00.82 = 39424 samples ~ 61.6 CDDA sectors
File Size      : 118k
Bit Rate       : 1.15M
Sample Encoding: 24-bit Signed Integer PCM
\$ sox 0001\ 8\ GR4.aif -n stat stats
...
Bit-depth      12/24
...
``````

The documentation for the Bit-depth value says:

The right-hand Bit-depth figure is the standard definition of bit-depth i.e. bits less significant than the given number are fixed at zero. The left-hand figure is the number of most significant bits that are fixed at zero (or one for negative numbers) subtracted from the right-hand figure (the number subtracted is directly related to Pk lev dB).

As far I understand, "12/24" means that the file does contain non-zero bits in the lowest 12 bits of 24 samples, but the 12 highest bits of all samples are zero. The output of the first command "sox --i file.aif" says that the file "is" a 24-bit audio file so that it could contain data in all 24 bits of each sample. However the second command prints out statistics from analysis of actual audio content, and it says that only the lowest 12 bits are used anywhere in the file. To show the actually used bits as X and unused or zero bits as 0, it would look like this:

``````000000000000XXXXXXXXXXXX
``````

Let's take another example.

``````\$ sox --i 0001\ 3-Audio-1.aif

Input File     : '0001 3-Audio-1.aif'
Channels       : 1
Sample Rate    : 44100
Precision      : 24-bit
Duration       : 00:01:21.67 = 3601664 samples = 6125.28 CDDA sectors
File Size      : 10.8M
Bit Rate       : 1.06M
Sample Encoding: 24-bit Signed Integer PCM

\$ sox 0001\ 3-Audio-1.aif -n stat stats
...
Bit-depth      16/16
...
``````

This file "is" a 24-bit audio file as well, but this time only the 16 highest bits are used. Maybe the file was converted from a 16-bit file or recorded using an audio interface that only supported 16 bit audio, but the recording software had been told to store everything as 24-bit files anyway. It would look like this:

``````XXXXXXXXXXXXXXXX00000000
``````

If you take a 16-bit audio file and convert it to 24 bit keeping "full scale" as is and without adding dithering noise or anything, it looks like that. Theoretically a 24-bit file, but only 16 bits of resolution is used.

I used to have a Yamaha 01v digital mixer with a 24-bit ADAT optical output, but it only used 20 bits out of the 24 because of its A/D converters and/or some other limitations. In other words, the 4 lowest bits of every sample coming from the 01v's ADAT output was all zeroes. Like this:

``````XXXXXXXXXXXXXXXXXXXX0000
``````