levo

Fundamentals of Data Representation

MIDI and Data Compression

  • 4 things to know
  • Paper 2
Start revising · £5/month

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.

Your recallNot started
Key term

Describe what a MIDI file stores, and contrast it with a sampled sound file.

Evaluation

State the disadvantages of MIDI.

Numbers

Apply run length encoding to the string AAAAABBBCCCCCCCD.

Process

Explain the principle behind dictionary-based compression.

Questions from this subtopic

Each one with the model answer underneath.

  1. 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. 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. 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. 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. 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. 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.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

Fundamentals of Programming
Fundamentals of Data Structures
Fundamentals of Algorithms
Theory of Computation

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

A driver is .
softwarehardwarestorage

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

Head means the first single element of a non-empty list.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Fundamentals of Data Representation, on a schedule.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.