
Audio Format: Comparison and Implementation of MP3 and WAV Part 2

Sound is a mechanical wave, produced by the vibration of an object, and requires a medium to propagate. So, in essence, a sound is a waveform on an axis over time.

Sound has three elements: pitch, volume, and timbre:
Pitch is determined by the frequency of the sound wave, the higher the frequency, the higher the pitch.
The volume is determined by the amplitude of the sound wave, the larger the amplitude, the louder the sound.
The timbre is determined by the “shape” of the waveform (sounds like square, triangle, and sawtooth are called impulse waves and sound individual).
An audio file is a file obtained by converting an analog signal to a digital signal. In general, there are five important parameters: encoding method, number of channels, sampling rate, bit depth, and bit rate.
Encoding: how this format organizes binary data and how it is compressed.
Number of channels: mono, dual or 5.1 channels, etc.
Sampling rate: The number of samples per second.
Bit Depth: The number of binary bits used to store the y value of the sample point.
Bitrate – The desired number of bits per second for the file.
We know that there is no compression in the WAV format, so its encoding method is to directly write all the sampled points to the file in order.
WAV file size (B) = number of channels * sample rate (Hz) * bit depth (bit) / 8 + file header size (B, it’s 44B)
Implementation
When you open an mp3 or wav file with a text editor, you see numbers like this:
4944 3303 0000 0000 3D48 5459 4552 0000
0006 0000 0032 3031 3800 5444 4154 0000
0006 0000 0000 0000 0000 5449 0000 0000 0000 0000 0000 0000 58330 366
5052 4956 0000
368 50 0000 584d 5000 3c3f 7870 6163 6B65
7420 6266 6769 6E3D 22EP BBBF 2220 6964 3D22 5735 6964
3D22 5735 4D30 4D70 4365 6869 487A 7265
537A 4E54 637A 6B63 3964 223F 3E0A 3C78
3A78 6D70 6D65 7461 2078 6D6C 6E73 3A78
3D22 6164 2F6 62 1654
5249 4646 2E3D 0e05 5741 5645 666d 7420
1200 0000 0300 0200 44ac 0000 2062 0500
0800 2000 0000 6461 7461 A026 0e05 8089
00bc 00E8 f0bb c09e 8dbc 00C2 87bc 80F1
d3bc 8063 CCBC C030 FCBC 8012 f4bc 20BB
13bd E051 0fbd c0b0 2dbd 6079 28bd 4012
46bd 6032 40bd c0e3 5dbd 6040 57bd c015
7cbd e035 74bd b058 8dbd 50e2 88bd f0a7 9dbd e0dd 98bd 70d3 acbd e0a9 a7bd
d043 b8bd b0da b2bd
00e3 c4bd 605c bfbd
This one above is the mp3/wav format of the same song. What is the difference between them?






/CBR-vs-VBR-069b3b5e6d554d53841e7e525092d25b.jpg)

