COMPUTER HANOUTS
GCE O Levels
MEMORY & DATA STORAGE
Memory and Data Storage
6.1 File Format
“A file format is a standard way that information is encoded for storage in a computer file. It
specifies how bits are used to encode information in a digital storage medium.”
Types of File Formats
A number of different file formats are used in computer systems. We will look at the following
ones:
i. Musical Instrument Digital Interface (MIDI)
ii. MP3
iii. MP4
iv. Jpeg
v. Text and Number Formats
6.1.1 Musical Instrument Digital Interface (MIDI)
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.
6.1.1.1 MIDI File
“A MIDI file consists of a list of commands that instruct a device how to produce a particular sound
or musical note. It is recognised by the file extension .mid.”
a) MIDI Command
Each MIDI command has a specific sequence of bytes.
i) Status Byte
The first byte is the status byte – this informs the MIDI device what function to perform. Status
byte also includes the MIDI channel. MIDI operates on 16 different channels, which are numbered 0 to
15.
ii) Pitch Byte
PITCH BYTE tells the MIDI device which note to play
iii) Velocity Byte
VELOCITY BYTE tells the device how loud to play the note.
6.1.1.2 Playback
i) Through Digital Instruments
If this .mid file is played back through a digital instrument (e.g. 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. Advantages
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.
ii) Through Analog Instruments
To play back through an instrument such as a guitar would need the use of SEQUENCER
SOFTWARE, since the MIDI files wouldn’t be recognised in their ‘raw’ form.
6.1.1.3 MIDI Interface
MIDI interface provides a connection between electronic instruments and the computer. Both the
electronic instruments and the computer need a MIDI interface to allow them to communicate.
, MIDI operates on 16 channels. In fact the computer can send data out on all 16 MIDI channels at
the same time. Hence 16 MIDI devices could be connected to the computer. Each device could be
playing a separate line in a song from the sequencer software, effectively creating an electronic
orchestra. This implementation is being used more and more today in the recording studio, by major
orchestras and in musical scores use in films.
6.1.1.4 Advantages
i) Their size is considerably smaller. This makes them ideal for devices where memory is an issue;
for example, storing ring tones on mobile phones.
ii) 16 MIDI devices can be connected at a time through 16 different channels.
6.1.1.5 Disadvantage
MIDI file cannot support audio tracks.
6.1.1.6 Applications
i. Creating an electronic orchestra
ii. Creating ring tones on mobile.
iii. Instrument Control
iv. Background Music in films
6.1.2 MPEG-3 (MP3)
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.
6.1.2.1 Applications
i. MP3 files are used in MP3 players, computers or mobile phones.
ii. Files can be downloaded from the internet can be converted to MP3 format.
iii. The CD files are converted using FILE COMPRESSION software.
6.1.2.2 Conversion Method
Conversion 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.
6.1.2.3 Points to Remember
i. MP3 files use what is known as a LOSSY FORMAT since part of the original file is lost following
the compression algorithm.
ii. Original file can’t be put back together again.
iii. The quality of MP3 files can be different since it depends on the BIT RATE – this is the
number of bits per second used when creating the file.
iv. Bit rates are roughly between 80 and 320 kilobits per second
v. Usually 200 or higher gives a sound quality close to a normal CD.
6.1.3 MPEG-4 (MP4)
MPEG-4 (MP4) 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.
6.1.4 Joint Photographic Experts Group (jpeg) files
“JPEG is a commonly used method of lossy compression for digital images, particularly for those
images produced by digital photography.”
The degree of compression can be adjusted, allowing a selectable tradeoff between storage size
and image quality. JPEG typically achieves 10:1 compression with little perceptible loss in image quality.
6.1.4.1 Types of JPEG
JPEG compression is used in a number of image file formats.
i) JPEG/Exif is the most common image format used by digital cameras and other
photographic image capture devices
ii) JPEG/JFIF, it is the most common format for storing and transmitting photographic images on
the World Wide Web. JPEG/JFIF supports a maximum image size of 65,535×65,535 pixels,
hence up to 4 giga-pixels for an aspect ratio of 1:1.
These format variations are often not distinguished, and are simply called JPEG
JPEG files usually have a filename extension of .jpg or .jpeg.
GCE O Levels
MEMORY & DATA STORAGE
Memory and Data Storage
6.1 File Format
“A file format is a standard way that information is encoded for storage in a computer file. It
specifies how bits are used to encode information in a digital storage medium.”
Types of File Formats
A number of different file formats are used in computer systems. We will look at the following
ones:
i. Musical Instrument Digital Interface (MIDI)
ii. MP3
iii. MP4
iv. Jpeg
v. Text and Number Formats
6.1.1 Musical Instrument Digital Interface (MIDI)
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.
6.1.1.1 MIDI File
“A MIDI file consists of a list of commands that instruct a device how to produce a particular sound
or musical note. It is recognised by the file extension .mid.”
a) MIDI Command
Each MIDI command has a specific sequence of bytes.
i) Status Byte
The first byte is the status byte – this informs the MIDI device what function to perform. Status
byte also includes the MIDI channel. MIDI operates on 16 different channels, which are numbered 0 to
15.
ii) Pitch Byte
PITCH BYTE tells the MIDI device which note to play
iii) Velocity Byte
VELOCITY BYTE tells the device how loud to play the note.
6.1.1.2 Playback
i) Through Digital Instruments
If this .mid file is played back through a digital instrument (e.g. 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. Advantages
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.
ii) Through Analog Instruments
To play back through an instrument such as a guitar would need the use of SEQUENCER
SOFTWARE, since the MIDI files wouldn’t be recognised in their ‘raw’ form.
6.1.1.3 MIDI Interface
MIDI interface provides a connection between electronic instruments and the computer. Both the
electronic instruments and the computer need a MIDI interface to allow them to communicate.
, MIDI operates on 16 channels. In fact the computer can send data out on all 16 MIDI channels at
the same time. Hence 16 MIDI devices could be connected to the computer. Each device could be
playing a separate line in a song from the sequencer software, effectively creating an electronic
orchestra. This implementation is being used more and more today in the recording studio, by major
orchestras and in musical scores use in films.
6.1.1.4 Advantages
i) Their size is considerably smaller. This makes them ideal for devices where memory is an issue;
for example, storing ring tones on mobile phones.
ii) 16 MIDI devices can be connected at a time through 16 different channels.
6.1.1.5 Disadvantage
MIDI file cannot support audio tracks.
6.1.1.6 Applications
i. Creating an electronic orchestra
ii. Creating ring tones on mobile.
iii. Instrument Control
iv. Background Music in films
6.1.2 MPEG-3 (MP3)
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.
6.1.2.1 Applications
i. MP3 files are used in MP3 players, computers or mobile phones.
ii. Files can be downloaded from the internet can be converted to MP3 format.
iii. The CD files are converted using FILE COMPRESSION software.
6.1.2.2 Conversion Method
Conversion 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.
6.1.2.3 Points to Remember
i. MP3 files use what is known as a LOSSY FORMAT since part of the original file is lost following
the compression algorithm.
ii. Original file can’t be put back together again.
iii. The quality of MP3 files can be different since it depends on the BIT RATE – this is the
number of bits per second used when creating the file.
iv. Bit rates are roughly between 80 and 320 kilobits per second
v. Usually 200 or higher gives a sound quality close to a normal CD.
6.1.3 MPEG-4 (MP4)
MPEG-4 (MP4) 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.
6.1.4 Joint Photographic Experts Group (jpeg) files
“JPEG is a commonly used method of lossy compression for digital images, particularly for those
images produced by digital photography.”
The degree of compression can be adjusted, allowing a selectable tradeoff between storage size
and image quality. JPEG typically achieves 10:1 compression with little perceptible loss in image quality.
6.1.4.1 Types of JPEG
JPEG compression is used in a number of image file formats.
i) JPEG/Exif is the most common image format used by digital cameras and other
photographic image capture devices
ii) JPEG/JFIF, it is the most common format for storing and transmitting photographic images on
the World Wide Web. JPEG/JFIF supports a maximum image size of 65,535×65,535 pixels,
hence up to 4 giga-pixels for an aspect ratio of 1:1.
These format variations are often not distinguished, and are simply called JPEG
JPEG files usually have a filename extension of .jpg or .jpeg.