<<

Converting Audio – Audio File

By the end of this worksheet you should:

• know how to calculate the possible file size of an audio recording

You should now be very familiar with the following concepts:

: a single zero (0) or (1), short for Binary digIT • : 8 • Analogue: a continuously varying signal • Digital: a pulse that alternates between OFF (0) and ON (1) • ADC: Analogue to Digital Converter • Sample Rate: how many times per second the ADC tests the incoming analogue signal • Sample Resolution: the number of bits allocate to each sample taken

We only need to add 1 more snippet of knowledge to calculate the possible file size of an audio recording, and that is the duration of the recording.

Imagine that you record 10 seconds of audio, setting the sample rate to 44.1kHz and using 16 bits per sample. What does this all mean?

Page 1 of 5 Converting Audio – Audio File Size

Well, we know that…

• each sample uses 16 bits

• there are 44 100 samples per second

• this means that we are using 44 100 samples per second x 16 bits = 705 600 bits per second

• Since we recorded for 10 seconds we have 705 600 bits per second x 10 seconds = 7 056 000 bits in total

• There are 8 bits to a byte so 7 056 000 ÷ 8 = 882 000

• 1 000 is a kilo so 882 000 bytes = 882 or 882KB

So, a 10 second recording that is set at 16 bits/44.1kHz might result in a file of 882KB.

How did we do that?

Sample Rate x Sample Resolution x Time = Potential File Size

There are two remain items we need to deal with:

• Why do we keep referring to Potential File Size?

• What is Bit Depth?

When a computer saves a file it might store only the essential needed.

If this happens then the potential file size and the actual file size should be the same.

However, there are times when what you get is different to what we estimate the file should be…

Page 2 of 5 Converting Audio – Audio File Size

Compression

If the audio file is compressed in any way some data might be removed from the file, which would make the file smaller.

There are two different ways to compress a file:

• lossless, which means we might remove data but we do not lose any of the sound quality at all.

• lossy, which means that the compression method will affect the quality of the recording by losing some of the data.

One file type that records raw data is a WAV file; WAV files can be very large indeed.

File formats such as MP3, AAC and OGG are all compression types.

MP3 has two potential compression types: lossy MP3 and lossless MP3.

Meta Data

When we save a file we might like to record details alongside the sound itself.

Maybe the file is a song and we want to record the name of the artist, the song title, the length of the song, when it was recorded, what album it comes from, its track number.

All of this data is added to the file itself but does not have any impact upon the actual file data, the quality of the sound.

This is known as meta data and is used by different music players to display all kinds of details about your favourite songs, including the album artwork.

Page 3 of 5 Converting Audio – Audio File Size

Different Data Size

Most modern computers restrict the smallest amount of space addressable to a byte.

So, if the calculated file size in bits is not exactly divisible by 8 then the file size will be slightly bigger, since any fractional bits will be placed in their own byte-sized block.

Some systems, including USB memory sticks, store data in blocks that can be larger than a byte.

So, the file size is likely to be significantly larger than calculated.

In terms of bit depth, you might see this term used when it comes to audio recording.

The term sample resolution is used by many different types of analogue to digital recordings, not simply audio.

It is correct to use the term sample resolution in relation to audio recording but many in the field prefer to use the term bit depth.

All you need to remember is that bit depth and sample resolution are the same thing.

Page 4 of 5 Converting Audio – Audio File Size

Things for you to try

You record some audio at 44.1KHz at a sample resolution of 16 bits.

You record for 1 minute 30 seconds.

Your friend records for the same time but uses HRA. HRA uses 192KHz and 24 bit.

1. How large is your resultant file size likely to be, in bytes?

2. How large is your friend’s file size likely to be, in bytes?

3. You decide to reduce the space the file uses and have the choice to compress the file in either a lossy or a lossless format.

a. What is file compression?

b. What is lossy compression?

c. What is lossless compression?

4. Your friend uses editing software to trim 20 seconds of recording from their original recording.

a. How much space has your friend saved?

b. What is the new file size likely to be?

Page 5 of 5