0% found this document useful (0 votes)
6 views

Grade 10 Notes Printed - 12 - 2010 - Compression Technology

The document discusses different file formats including MIDI, MP3, MP4, and JPEG. MIDI files contain musical instrument commands but no sounds. MP3 uses audio compression to reduce file sizes while retaining most music quality. MP4 allows storage of multimedia and can stream video without losing quality. JPEG reduces photo file sizes through lossy compression, resulting in some loss of image quality.

Uploaded by

hlt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Grade 10 Notes Printed - 12 - 2010 - Compression Technology

The document discusses different file formats including MIDI, MP3, MP4, and JPEG. MIDI files contain musical instrument commands but no sounds. MP3 uses audio compression to reduce file sizes while retaining most music quality. MP4 allows storage of multimedia and can stream video without losing quality. JPEG reduces photo file sizes through lossy compression, resulting in some loss of image quality.

Uploaded by

hlt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

File Formats

Musical Instrument Digital Interface (MIDI)


Musical Instrument Digital Interface (MIDI) is always associated with the storage of music files.
However, MIDI files are not music and don't contain any sounds; they are very different to, for
example, MP3 files. MIDI is essentially a communications protocol that allows electronic musical
instruments to interact with each other. The MIDI protocol uses 8-bit serial transmission with one
start bit and one stop bit, and is therefore asynchronous.
A MIDI file consists of a list of commands that instruct a device (for example, an electronic organ,
sound card in a computer or in a mobile phone) how to produce a particular sound or musical
note. Each MIDI command has a specific sequence of bytes. The first byte is the status byte - this
informs the MIDI device what function to perform. Encoded in the status byte is the MIDI channel.
Two additional bytes are required, a PITCH BYTE, which tells the MIDI device which note to play,
and a VELOCITY BYTE, which tells the device how loud to play the note. When music or sound is
recorded on a computer system, these MIDI messages are saved in a file which is recognised by
the file extension .mid. If this .mid file is played back through a musical instrument, such as an
electronic keyboard, the music will be played back in an identical way to the original. The whole
piece of music will have been stored as a series of commands but no actual musical notes. This
makes it a very versatile file structure, since the same file could be fed back through a different
electronic instrument, such as an electric guitar, with different effects to the original.

MPEG-3 (MP3) and MPEG-4 (MP4)


MPEG-3 (MP3) uses technology known as AUDIO COMPRESSION to convert music and other
sounds into an MP3 file format. Essentially, this compression technology will reduce the size of a
normal music file by about 90 per cent. For example, an 80 megabyte music CD can be reduced to
8 megabytes using MP3 technology. MP3 files are used in MP3 players, computers or mobile
phones.
But how can the original music file be reduced by 90 per cent whilst still retaining most of the
music quality? This is done using file compression algorithms which use PERCEPTUAL MUSIC
SHAPING; this essentially removes sounds that the human ear can’t hear properly. For example, if
two sounds are played at the same time, only the louder one can be heard by the ear, so the
softer sound is eliminated. This means that certain parts of the music can be removed without
affecting the quality too much. Sound less than 20 Hz and above 20000 Hz are inaudible to human
ear. These sounds if exist are of no use as the human ear cannot perceive. Such sound is removed.
Hence file size decreases.
MP3 files use what is known as a LOSSY FORMAT since part of the original file is lost following the
compression algorithm. This means that the original file can't be put back together again.

MPEG-4 (MP4) files are slightly different to MP3 files. This format allows the storage of multimedia
files rather than just sound. Music, videos, photos and animation can all be stored in the MP4
format. Videos, for example, could be streamed over the internet using the MP4 format without
losing any real discernable quality. MP4 is also lossy compressed file. It used both audio and image
compression to compress.

©AIS File Formats COMPUTER SCIENCE Page 1 of 2


Joint Photographic Experts Group (JPEG)
When a photographic file undergoes file compression, the size of the file is reduced. The trade-off
for this reduced file size is reduced quality of the image. One of the file formats used to reduce
photographic file sizes is known as JPEG. This is another example of lossy file compression. Once
the image is subjected to the jpeg compression algorithm, a new file is formed and the original file
can no longer be constructed. Jpeg will reduce the RAW BITMAP image by a factor of between 5
and 15 depending on the quality of the original.
An image that is 2048 pixels wide and 1536 pixels high is equal to 2048 x 1536 pixels; in other
words, 3145 728 pixels. This is often referred to as a 3-megapixel image (although it is obviously
slightly larger). A raw bitmap can often be referred to as a TIFF or BMP image. The file size of this
image is determined by the number of pixels. In the previous example, a 3-megapixel image would
be 3 megapixels x 3 colours. In other words, 9 megabytes (each pixel occupies 3 bytes because it is
made up of the three main colours: Red, green and blue).

The same image stored in jpeg format would probably occupy between 0.6 megabytes and 1.8
megabytes. Jpeg relies on certain properties of the human eye and, up to a point, a certain
amount of file compression can take place without any real loss of quality. The human eye is
limited in its ability to detect very slight differences in brightness and in colour hues. For example,
some computer imaging software boasts that it can produce over 40 million different colours —
the human eye is only able to differentiate about 10 million colours.

Lossless and lossy file compression


Lossless file compression
With LOSSLESS FILE COMPRESSION, all the data bits from the original file are reconstructed when
the file is again uncompressed. This is particularly important for files where loss of any data would
be disastrous — for example, a spreadsheet file.

Example of Lossless Compression:


The phrase 'THIS SECTION SHOWS YOU HOW THIS WOULD WORK' consists of 35 memory units
(ignoring spaces). Repeated words, such as 'THIS' could be put into a data dictionary and be
replaced by Repeated word sections, such as 'HOW and 'OU' could be replaced by the numbers '2'
and '3'. Our phrase then becomes '1 SECTION S2S Y3 2 1 W3LD WORK'. Again, ignoring spaces, this
compressed form now uses only 23 memory units. This is about a 33% saving in file size. Obviously
if whole pages are to be stored, then repeated words and word sections become even more
numerous. This is clearly an example of lossless compression since the original phrase can be
reformed if necessary using the data dictionary and compressed file.

Lossy file compression


Lossy FILE COMPRESSION is very different to lossless file compression. With this technique, the file
compression algorithm eliminates unnecessary bits of data as seen in MP3 and jpeg formats. It is
impossible to get the original file back once it is compressed. This is why it is chosen for files where
removing certain bits doesn't detract from the quality.

©AIS File Formats COMPUTER SCIENCE Page 2 of 2

You might also like