Sound (music), pictures, video, text and numbers are all stored in different file formats.
The file extension identifies the file’s format and its characteristics.
There are many different file formats such as:
MIDI (Musical Instrument Digital Interface)
MP3
MP4
JPEG
TEXT
Stands for musical instrument digital interface
Associated with music files (not music files but stores sounds)
Communication protocol between electronic musical instruments to interact with each other and with computer too.
Uses a 8-bit serial transmission protocol (asynchronous and has one start and one stop bit)
Consists of lists of commands instructing device to produce particular sounds (mouth organ)
Pitch byte is used to work out what key/note/string has been pressed/strung. For example an electronic piano, the note that you pressed is pre stored by a pitch byte.
Velocity byte identifies pressure/how loud a keynote/string should be played.
MIDI files are saved as .mid
Major commands are:
Note on/off (pressing/releasing a key)
Key pressure (loudness of the music note/vibrations)
Size is smaller as it contains no audio tracks.
MP3 uses a technology known as AUDIO COMPRESSION to convert music and other sounds into an MP3 file format.
Using compression technology, it reduces a size of a normal music file by 90%. For example:
If there is 80-megabyte file, it can be reduced to 8 megabytes using MP3 technology.
However, the quality of the sound by the human ear can’t detect much difference because of the method of PERCEPTUAL MUSIC SHAPING, which essentially removes sounds that the human ear can’t hear properly.
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 file can’t be converted back to the original again.
MP3 audio compression reduces a file size through:
Perceptual music shaping (removing inaudible sounds(noise and quiet sounds)
Reducing the audio bitrate (the bitrate is the number of bits that need to be processed every second. This is measured in kilobits per second.)
Mp4 files are essentially the same as mp3, except that this format allows storage of multimedia files like music, videos, photos
MP4s are video files (with audio) compressed using compression. The lossy compression gives huge savings in file size, needed to:
Make video streaming services practical (e.g. YouTube, Vimeo, NowTV, on demand TV)
Let us record and store lots of video files on devices with only modest capacities
Explain the difference between a Musical Instrument Digital Interface (MIDI) file and a MP3 file? [2018]
MP3
Digital recording of sound
Produced by recording software / microphone
Used when distributing sound files
Compressed file format
MIDI
Instructions on how to make sound
Non-audio recording
File created using digital musical instruments
Produced by synthesizer
Used when composing music
Individual notes/instruments can be changed
JPEG is a file type that stores images, images are made out of little pixels, the amount of pixels per centimetre is called resolution. The higher the resolution, the sharper the image looks.
JPEG relies on certain properties of the human eye, when file compression takes place, there is no real loss of quality. The human eye is limited to its ability to see the difference in brightness and colour hues.
PIXELS
The more pixels a picture has, the higher resolution it has which means it is clearer. An image that is 2048 pixels wide and 1536 pixels high is equal to 345,728 pixels. (2048*1536).
A raw bitmap can often be referred to TIFF or BMP image, the size of the image is determined by the number of pixels.
LOSSY [2019]
The file compression method eliminates unnecessary bits of data as seen in MP3 and JPEG formats.
The original file cannot be recovered after uncompressing from the lossy compression.
File formats that use lossy compression include MP3, MP4 and JPG.
File after getting uncompressed, this is necessary in conditions where loss of data could be disastrous, like in spreadsheets.
To get low file sizes, lossy compression permanently removes data from the file that the computer believes you can do without (redundant data).
Often we can hardly notice the difference, but if you get too greedy (aggressive) with lossy compression you will notice the file quality deteriorates significantly.
It is impossible to get the file back to its original state and quality.
Lossy compression is best at creating really small file sizes – ideal for downloads or streaming.
LOSSLESS [2020]: All the data bits are reconstructed from the original
Lossless compression is ideal for compressing text or numeric files where a loss of data is unacceptable. It is also used in PNG, GIF and ZIP files.
Lossless compression takes advantage of repetition and patterns.
A compression algorithm is used to find and index repeated words or patterns (or sections of words) within the data.
Wherever they occur in the data, the indexed words/patterns are replaced with numerical values.
The index will need to be stored with the data to allow decompression with no loss of data.
Run length encoding (RLE)
form of lossless/reversible compression
reduces the size of adjacent, identical data (or repeated colours in an image)
Only applicable with a long run of repeated units/bits
A (compression) algorithm is used
No data is removed in the process // original file can be restored
Repeated words (are identified) // Patterns in the data (are identified)
and are indexed/put into a table // by example
and are replaced with their index // by example
and their positions are stored (in the table) // by example
and the number of times the word/pattern appears is stored (in the table) // by example
Best compression would be lossy
Use compression algorithm
This would remove all the unnecessary data from the file // removes detail/sound that the human eye/ear may not see/hear
Reduce colour palette
so each pixel requires fewer bits
Reduce resolution
Only store what changes between frames // temporal redundancy
Describe how lossless compression reduces the size of a sound file? [2020, 2021]
Uses a compression algorithm
Does not permanently remove any data
Repeated patterns of music notes are identified and are grouped, with an index
Example of the type of algorithm that would be used e.g. RLE
Advantages:[2021]
Allow for quicker streaming speed
Would not require as much bandwidth (to stream)
Does not need as much RAM
Smoother listening experience // less lag
Will not use as much of data allowance
Disadvantages:[2021]
Streaming speed may be slower (may affect the listening experience and buffering may occur)
Users may need more bandwidth to stream (that could be more expensive)
It would be a larger file size (so may take longer to upload)
It will take up more storage space on the webserver