Skip to topic
    ← Back to course topics

    Musical Instrument Digital Interface (MIDI) — AQA A-Level Computer Science

    Musical Instrument Digital Interface (MIDI) is an industry-standard serial communications protocol and file format that allows electronic musical instruments, computers, and audio devices to communicate. Rather than storing digitized audio waveforms, MIDI transmits event messages specifying pitch, duration, velocity, and instrument channel, resulting in significantly smaller file sizes and editable performance data.

    Musical Instrument Digital Interface (MIDI) explained

    MIDI (Musical Instrument Digital Interface) is a standard that allows electronic musical instruments, computers and other devices to communicate musical performance data with one another.

    Read the full explanation

    Rather than carrying recorded audio, MIDI carries instructions describing what should happen, such as which note to play, how hard it is struck, and when it starts and stops. A receiving device then generates the sound itself using its own synthesiser or sound module. Communication takes place as a stream of event messages. Each event message is a short packet of data that describes one action, for example a Note On event giving a note number and velocity, or a Note Off event that ends the note. Other event types include control change messages that adjust parameters such as volume or modulation, and program change messages that select an instrument sound.

    Your focus

    1. Describe the purpose of MIDI and the use of event messages in MIDI.

    Which command word is this?

    Identify both similarities and differences between MIDI and sampled audio, linking specific technical features to outcomes like file size, fidelity, or processing overhead.

    Musical Instrument Digital Interface (MIDI) exam tips

    Topic Overview

    Musical Instrument Digital Interface (MIDI) is a standardised hardware specification and communications protocol developed in the 1980s to interconnect electronic instruments, synthesizers, and computers. It operates by exchanging event-based control messages rather than capturing continuous acoustic pressure waves.

    Understanding MIDI within AQA A-Level Computer Science is vital for appreciating the distinction between analogue-to-digital sampled data and symbolic, instruction-based representations. It bridges hardware interfaces, asynchronous serial communication, and digital audio representation.

    Key Concepts
    • →Event-Based Protocol: MIDI records actions (Note On, Note Off, pitch, key pressure/velocity, channel) rather than capturing audio waveforms.
    • →Compact File Size: Because MIDI files contain compact alphanumeric instructions rather than sampled sound waves, they require a fraction of the storage space of WAV or MP3 files.
    • →Hardware & Interface Standard: Uses a 5-pin DIN connector (historically) or USB, communicating via asynchronous serial transmission at a standard rate of 31.25 kbaud.
    • →Device Independence & Synthesis: MIDI files describe how music should be played; the actual sound heard is generated by the receiving device's synthesizer or sample bank.
    Marking Points
    • Explains that MIDI is a standard protocol for communicating musical performance data between devices
    • States that MIDI transmits instructions rather than audio samples
    • Describes an event message as a short packet of data representing one musical action
    • Gives at least one example of an event type such as Note On, Note Off or control change, with its purpose
    Examiner Tips
    • 💡Lead with the purpose: MIDI is a communication standard for musical performance data
    • 💡Use the term event message and explain its content, such as note number and velocity
    • 💡Contrast MIDI with recorded audio to show you understand that instructions, not sound, are transmitted
    • 💡Always contrast MIDI with sampled audio (PCM/WAV) using specific technical vocabulary such as 'event data', 'synthesizer', 'sample rate', and 'bit depth'.
    • 💡Remember the standard MIDI message structure: 1 status byte (command + channel) followed by up to 2 data bytes (e.g., pitch, velocity).
    • 💡When asked for benefits, emphasise storage efficiency and ease of editing individual musical parameters (such as pitch, instrument, or tempo).
    Common Mistakes
    • Describes MIDI as an audio file format; correct by stating that MIDI carries performance instructions, not recorded sound
    • Says event messages store the whole sound wave; correct by explaining that each event describes one action such as a note starting
    • Lists event names without explaining what each one does; correct by stating the purpose of each event
    • Believing MIDI is an audio file format: MIDI contains symbolic control codes, not acoustic sound samples, decibels, or waveform frequencies.
    • Assuming MIDI files sound identical everywhere: Because the playback is rendered by the receiving device's local synthesizer, timbre and realism vary across different platforms.
    • Thinking MIDI can encode lyrics or singing: Standard MIDI protocol lacks the capacity to store arbitrary acoustic audio like speech or vocals, as it only transmits musical instrument parameters.
    Revision Plan
    1. 1Day 1: Learn the core definition of MIDI and the difference between instruction-based data and sampled audio data.
    2. 2Day 2: Study the structure of MIDI messages (status byte vs data bytes, Note On/Off, pitch, and velocity).
    3. 3Day 3: Practice exam questions comparing MIDI and sampled audio for storage, editing, and transmission trade-offs.
    4. 4Day 4: Review active recall flashcards on serial transfer rates, hex conversions of MIDI commands, and synthesis dependencies.
    Exam Question Types
    • 📋Comparison Questions: Comparing MIDI with sampled sound formats (e.g., WAV/MP3) in terms of file size, quality, and editing flexibility.
    • 📋Technical Protocol Questions: Explaining the format of MIDI messages, including status bytes and data bytes.
    • 📋Scenario-Based Evaluations: Assessing whether MIDI or sampled audio is appropriate for a given real-world application, such as game audio or speech recording.
    Command Word Expectations (AQA)
    Compare

    Identify both similarities and differences between MIDI and sampled audio, linking specific technical features to outcomes like file size, fidelity, or processing overhead.

    Explain

    Provide clear reasoning detailing how MIDI operates (e.g., how an event byte sequence translates to synthesized sound) rather than merely listing features.

    Discuss

    Present a balanced evaluation of adopting MIDI versus digitized audio in a specific computing context, weighing factors like storage, realism, and hardware support.

    How Students Lose Marks (Examiner Pitfalls)
    Pitfall: Stating that MIDI files store compressed audio or sampled sound waveforms.
    ❌ Weak Answer (Loses Marks):MIDI is a compressed sound format like MP3 that records what the instrument plays.
    Example improved answer:MIDI does not store audio signals or analogue waveforms; instead, it stores digital event messages and instructions (such as Note On/Off, pitch value, velocity, and controller changes) that instruct a synthesizer or sound card on how to synthesize the performance.
    Examiner Tip: Explicitly state that MIDI represents performance instructions or event data, not audio waveforms or sampled sound.
    Pitfall: Failing to explain why MIDI playback can sound different on different computing devices.
    ❌ Weak Answer (Loses Marks):The sound quality changes because different computers have different speakers.
    Example improved answer:MIDI data only contains musical event instructions, not the actual audio samples. The synthesized output depends entirely on the sound library, wavetable, or hardware synthesizer installed on the playback device, leading to inconsistent timbre across systems.
    Examiner Tip: Distinguish between the MIDI instruction data (which is identical across systems) and the playback hardware/software synthesis engine (which produces the audible sound).
    Step-by-Step Worked Solutions

    Question: Explain two advantages and two disadvantages of using MIDI compared to sampled digital audio (such as uncompressed WAV) for background music in a video game.

    1. 1.Step 1: Identify advantages related to storage and manipulation. MIDI files contain only event messages (e.g., Note On, Note Off, pitch, velocity), so file sizes are vastly smaller than sampled audio, requiring far less secondary storage and memory bandwidth. Additionally, individual notes, tempo, and instrument timbres can be edited independently in real-time without re-recording.
    2. 2.Step 2: Identify disadvantages related to realism and hardware dependence. MIDI cannot easily reproduce spoken vocals, non-instrumental sound effects, or natural acoustic nuances without massive complexity. Furthermore, playback fidelity and timbre depend on the user's local synthesizer or sound card, meaning audio may sound inconsistent across different gaming hardware.
    3. 3.Step 3: Combine points into a structured answer addressing both sides fully.
    Final Answer: Advantages: 1) Significantly smaller file size compared to sampled audio, reducing memory footprint and download times. 2) Highly editable, allowing dynamic modification of pitch, tempo, and instrument channels without re-recording. Disadvantages: 1) Cannot naturally record human speech or ambient acoustic sounds. 2) Playback quality and timbre vary between devices depending on the synthesizer hardware or soundfonts installed.

    Question: A MIDI event consists of a 3-byte message: a status byte followed by two data bytes. A key is pressed on MIDI channel 1 with Note On (status nibble 9 hex), playing middle C (MIDI note 60 decimal), with a velocity of 100 decimal. State the hex values of the 3 bytes transmitted.

    1. 1.Step 1: Determine the status byte. A 'Note On' command on channel 1 has the high nibble 9 (hex). Channel 1 is represented in zero-indexed binary as 0000 (hex 0). Thus, the status byte is 90 hex.
    2. 2.Step 2: Convert the first data byte (pitch). Middle C is decimal 60. Divide 60 by 16: 60 = 3 * 16 + 12. 12 in hexadecimal is C. Therefore, the first data byte is 3C hex.
    3. 3.Step 3: Convert the second data byte (velocity). Velocity is decimal 100. Divide 100 by 16: 100 = 6 * 16 + 4. Therefore, the second data byte is 64 hex.
    Final Answer: The 3-byte hexadecimal sequence is: 90 3C 64.
    Active Recall Memory Test
    What type of data does a MIDI message store instead of audio waveforms?
    Key Fact: Event data or performance instructions, including Note On/Off, note pitch, velocity, and channel numbers.
    Why are MIDI files considerably smaller than uncompressed WAV files of the same duration?
    Key Fact: MIDI files only store lightweight numeric commands describing notes, whereas WAV files store thousands of sampled amplitude measurements per second.
    What determines the acoustic timbre and fidelity when a MIDI file is played back?
    Key Fact: The receiving device's internal synthesizer, sound card, or soundfont library.
    What is the typical composition of a standard short MIDI event message?
    Key Fact: A 1-byte status byte (command and channel) followed by 1 or 2 data bytes (such as pitch and velocity).
    Frequently Asked Questions
    Does MIDI record actual sound or vocals?
    No, MIDI cannot record actual sound or human vocals. It only records performance instructions such as which key was pressed, how hard it was struck, and how long it was held. To store vocals or ambient environmental noise, an analogue-to-digital conversion format like WAV, FLAC, or MP3 must be used instead.
    Why does the same MIDI file sound different on my computer compared to my synthesizer?
    A MIDI file contains only symbolic performance commands, not the actual audio waveforms. When your computer or synthesizer receives these commands, it renders them using its own onboard sound generation hardware, sample libraries, or software synthesizers. If the sound sources differ in quality or timbre, the resulting audio output will sound distinct.
    What is the structure of a standard MIDI message?
    A standard MIDI channel message is typically 2 or 3 bytes long. The first byte is the status byte, which specifies the command type (such as Note On or Note Off) and the target channel (1 to 16). The subsequent one or two bytes are data bytes, which indicate specific parameters such as pitch (0 to 127) and velocity (0 to 127).
    Why is MIDI still widely used if we have MP3 and FLAC?
    MIDI remains an essential standard because it offers unparalleled flexibility for musicians, composers, and developers. Unlike pre-recorded audio, MIDI data can be manipulated note-by-note, transposed, quantized, and changed to different instruments in real time without degrading audio quality. Its minute file size also makes it ideal for embedded systems, interactive video game scoring, and web applications.
    How are MIDI channels used?
    MIDI supports 16 independent logical channels transmitted down a single cable or connection. Each channel can be assigned to a separate instrument or synthesized voice, such as drums on channel 10, bass on channel 1, and piano on channel 2. This allows a single MIDI file or master controller to control an entire ensemble of instruments simultaneously.