Blog

All News | All Blogs

PCM Format

PCM is one of the formats of audio file. I did not know until I checked Wikipedia, but PCM stands for Pulse Code Modulation. It usually stores wave information straightly so it is easy to guess the approximate file size when you know the spec.

The factors you need to focus are:
- Frequency
- Bit
- Stereo/mono/multi (Number of channels)
- Length

Frequency is frequency of pulse per second. When you see 44.1KHz, it means 44,100 pulses in second. Lower frequency sounds rough like radio while high frequency sounds very clear. In other words, it defines quality of the sound.
Bit is to express value of pulse. 8 bits (1 BYTE) can express 0-255 and 16 bits (2 BYTES) can express 0-65535. This also defines quality. It is like you have $20 in 20 $1 bills versus you have $20 in 2000 pennies. The former can express by every dollar like $1, $2, $3..., but the latter can express any price like 1.56, 3.87, etc.
When it is stereo, the file has two different audio streams (channels) so stereo is twice as big as mono, 5.1(6) is six times as big as mono in file size.
Length in second is the base of file size.

Equation to get file is like this: Frequency x Bit x Channels x Second

For example, if you have 44.1KHz, 16 bits, Stereo, 30 sec., it should be given by this:
44100 x 2 x 2 x 30 = 5292000 BYTES = 5168 KB (1KB = 1024 BYTES)

You need to take the header size into consideration. Header is the data chunk to store info. You don't know that the file is in 44.1KHz, 16 bits and stereo without this data chunk. Usually Header is very small so it can be ignored until you need very accurate number.

Anyway, using this principle, you can easily calculate seconds you can store in limited storage.
You can store 6087 seconds of 44.1KHz, 16 bits, stereo PCM in 1GB.

Compared to PCM, Mp3 format is compressed format so you need much less space to store audio files, but it is lower quality. It is popular because you can keep quality for the file size.

In our DDR, all songs are in the best quality. =)

Hiro@LA

Published Wednesday Jul 23, 2008