AQA A-Level Computer Science 7517
Fundamentals of Programming
Fundamentals of Data Structures
Fundamentals of Algorithms
Theory of Computation
Fundamentals of Data Representation
Fundamentals of Computer Systems
Fundamentals of Computer Organisation and Architecture
Fundamentals of Communication and Networking
Consequences of Uses of Computing
Systematic Approach to Problem Solving
Fundamentals of Databases
Big Data
Fundamentals of Data Representation
MIDI and Data Compression
- 4 things to know
- Paper 2
Overview
Recall questions on the purpose of MIDI, its event messages and files, and on lossy and lossless compression and run length encoding.
What you need to know
Answer each one before you reveal it.
State the disadvantages of MIDI.
Apply run length encoding to the string AAAAABBBCCCCCCCD.
Explain the principle behind dictionary-based compression.
Questions from this subtopic
Each one with the model answer underneath.
- 1
What is the purpose of MIDI?
Model answer
MIDI is a standard protocol that lets electronic musical instruments, synthesisers, sequencers and computers communicate with one another. Crucially it does not carry any recorded sound: it carries instructions describing how music should be performed, which the receiving device then plays using its own sounds.
- 2
What are event messages in MIDI, and what do they contain?
Model answer
Event messages are the instructions MIDI sends whenever something happens in a performance. Each carries the type of event, the channel it applies to and the data it needs. A note-on message identifies which note has been pressed and with what velocity — how hard, which sets the volume. A note-off message says that note has been released. Other messages change the instrument voice, adjust volume or modulation, or bend the pitch, and each event is stamped with its timing so the sequence can be replayed exactly.
- 3
Describe what a MIDI file stores, and contrast it with a sampled sound file.
Model answer
A MIDI file stores a timed list of event messages — effectively a set of instructions saying which note to sound, on which instrument, at what moment, how loudly and for how long. A sampled file stores the measured amplitude of the actual sound thousands of times a second. A MIDI file is therefore closer to a musical score than to a recording, and produces sound only when a device interprets it.
- 4
Describe the advantages of using MIDI files to represent music.
Model answer
They are very much smaller than sampled audio, because a few bytes of instruction replace tens of thousands of samples per second, so they need less storage and transmit faster. They are easily edited: a single wrong note can be corrected, the tempo altered, the key transposed or the whole piece reassigned to a different instrument, all without touching anything else and with no loss of quality, since editing instructions degrades nothing. The data can also be displayed and printed as conventional musical notation, and it can drive real instruments and lighting rigs.
- 5
State the disadvantages of MIDI.
Model answer
It cannot represent sounds that are not made by an instrument it can instruct — most obviously vocals, speech and real-world sound effects, which need a sampled recording. And the result is not fixed: the same file played on two devices sounds different, because each supplies its own instrument sounds, so the composer cannot guarantee what the listener hears.
- 6
Why is a MIDI file so much smaller than a sampled recording of the same piece?
Model answer
A sampled recording stores an amplitude value for every sample, tens of thousands of times per second, regardless of how much is happening musically. A MIDI file stores data only when an event occurs — a note starting, a note ending, an instrument changing — so a piece with a few thousand notes needs only a few thousand short messages, however long it lasts.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Fundamentals of Data Representation, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.