This article explains the WAV file that contains 1 second 1kHz sine wave:
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 I think.
Fig.1
There is actually infinity there in the discrete-time sampled 1kHz sine signal:
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.
Fig.2
First part of the sampled values plotted using Audacity. This is proper expression to depict discrete-time sampled signal.
Fig.3
Following graph is typical audio DAC output analog waveform simulated by Adobe Audition:
Fig.4
You may notice from the graph above, reconstructed analog wave form does not exhibit staircase shape. It is not obvious on Fig.4 but please look closely near the peak of the hill, it is curved and is not straight line! Typical audio DAC uses Whittaker-Shannon interpolation formula to fill gaps between two adjacent sample values to create continuous curve. If DAC uses zero order hold interpolation to fill intervals between two adjacent points, reconstructed analog waveform looks like a staircase.
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.
Fig.5
Fig.6
Fig.7
Fig.8
WAV file has the start and the end (Unlike S/PDIF or 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) :
52 49 46 46 AC 58 01 00 ...
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:
01010010 01001001 01000110 01000110 10101100 01011000 00000001 00000000 ...
On storage media, value 1 may expressed as the hole (of the punched card), magnetized, charged, high resistance values, etc.
There is a small difference between Fig.2 and Fig.8 values. Max difference is 1. I think this difference is caused by sine function evaluation algorithm difference of Excel and WaveGene.