Jump to content
IGNORED

Worlds Greatest DAC and what it does differently


Recommended Posts

18 hours ago, beerandmusic said:

And just for reference purposes, does anyone know what a 1khz signal would look like digitally?

 

When 1 second of 1kHz signal is sampled by 44100Hz, 44100 sampled values is produced. (This is obvious🙂 )

 

When we look closer to those 44100 samples, first 441 sample values are repeated 100 times. This is caused by periodicity of sine function : sin(x + 2π) = sin(x). This 441 samples contain exact 10 cycles of sine wave.

 

Most of sampled values are irrational numbers.

Math_a.thumb.png.48a44818dd6392130e7ca779bc191b11.png

When those values are quantized to 16bit or 24bit integer PCM, sample values becomes something like the following table.

 

In digital domain, PCM signal is stored/transferred as a list of those integer values. One second of PCM consists of 44100 integer values.

16bitPCM_and_24bitPCM_a.thumb.PNG.c990d9cd2f951257fc9e2cbaf7d333e3.PNG

 

First part of the sampled values plotted using Audacity:

1kHzSine_PCM_samples_Audacity.thumb.png.9da36b0d53d52773c97743a4bf365955.png

 

DAC output analog waveform simulated by Adobe Audition:

1kHzSine_PCM_samples_and_reconstructed_waveform_Adobe_Audition.thumb.png.2bf2a5fa85394b5794fb1c9accd0d012.png

 

 

Sunday programmer since 1985

Developer of PlayPcmWin

Link to comment
5 hours ago, beerandmusic said:

The reason, i wanted to know about a "simple" 1K signal is because in the audio world it is simple, finite, and predictable.

 

There is actually infinite there in the discrete-time sampled 1kHz sine signal:

  • Most of sample values are irrational numbers. This means, to represent one sample value exactly (for example sample#148 = sqrt(3)/2 ), infinite number of digits are needed. 16bit quantization truncates the value of first 16bit of the number to create finite digit rational number and quantization noise is generated by the truncation.
  • Pure 1kHz signal is, by definition, has infinite length. If it is truncated to finite length (1 second), other frequency components appear on the truncated edge and signal is contaminated. You may hear click noise at the truncated edge.

Sunday programmer since 1985

Developer of PlayPcmWin

Link to comment
3 hours ago, beerandmusic said:

amazing that much data is used in a 1 second sampling of a simple 1k sine wave.

I am confused as how does this data look digitally in a flat file?

 

I choose WAV file as an example to explain it.

 

WAV file stored 1 second (truncated) 1kHz sine can be created using WaveGene.
Generated WAV file can be read using any Hex editor. I'm using HxD.

 

WaveGene_a.PNG.174d3e3f6c19a19f9036f5596d24cbc0.PNG

 

Click the following images to magnify

 

WAV1.thumb.png.8b4f2b76e7a724ba15e9ab0c402622d9.png

 

WAV2.thumb.png.0f51e305af816853ab4e133b6875034d.png

 

WAV3.thumb.png.e5d3e459c4b0ff9623b9c7cb54fbfcc2.png

Sunday programmer since 1985

Developer of PlayPcmWin

Link to comment
10 hours ago, beerandmusic said:

it appears what is actually recorded is the offset rather than a value, and it does appear linear. 

 

WAV file has the start and the end (Unlike digital radio broadcast stream where there is no start and no end) and WAV file format use it as the means to organize data.

 

Offset is the count of bytes from start of the file and it usually counts from zero.

 

On the HxD Editor screenshot of my previous post, 8-digit hexadecimal offset number is added by HxD Editor for human reading convenience.

 

Actual WAV files do not contain offset values in the file, but it can be calculated by counting data bytes from the file start. On the accompanying
table of the slides has also offset columns and I added it for readers to compare easily the table rows with HxD screenshot hexadecimal dump.

 

Actual WAV file data is something like this (expressed as hexadecimal number sequences, which is shown in HxD Editor screen) :
 52494646AC580100574156...

 

One 1-digit hexadecimal number is actually 4-bit data and it can be expressed as a 4-digit binary number:
    hex 0 ⇔ bin 0000, hex 1 ⇔ bin 0001, hex 2 ⇔ bin 0010, hex 3 ⇔ bin 0011
    hex 4 ⇔ bin 0100, hex 5 ⇔ bin 0101, hex 6 ⇔ bin 0110, hex 7 ⇔ bin 0111
    hex 8 ⇔ bin 1000, hex 9 ⇔ bin 1001, hex A ⇔ bin 1010, hex B ⇔ bin 1011
    hex C ⇔ bin 1100, hex D ⇔ bin 1101, hex E ⇔ bin 1110, hex F ⇔ bin 1111

 

Therefore this WAV file data also can be expressed as a binary digits sequence:
 0101001001001001010001100100011010101100010110000000000100000000010101110100000101010110...

 

On storage media,  value 1 may expressed as the hole (of the punched card), magnetized, charged, high resistance values, etc.

 

10 hours ago, beerandmusic said:

What does the first negative number represent, and will it eventually repeat?

 

As you said, on the "Looking into 16bit PCM data part of the WAV file" slide, last PCM data ends with minus number, this is because I tried to explain 16bit integer value can express minus number as well. Actual WAV file goes on.

 

1kHz 1 second 44100Hz PCM starts from 441 unique sample values and it is repeated 100 times. Please refer my first post of this thread what it is like this 441 sample values are.

Sunday programmer since 1985

Developer of PlayPcmWin

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...