{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "\n", "\n", "Following Section 1.2.2 of [Müller, FMP, Springer 2015], we have in this a notebook a look at the MIDI standard, which is often used to encode symbolic music. \n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## MIDI Standard\n", "\n", "**MIDI** (Musical Instrument Digital Interface) was originally developed as an industry standard to get digital electronic musical instruments from different manufacturers to work and play together. It was the advent of MIDI in 1981–1983 that caused a rapid growth of the electronic musical instrument market. MIDI allows a musician to remotely and automatically control an electronic instrument or a digital synthesizer in real time. As an example, let us consider a digital piano, where a musician pushes down a key of the piano keyboard to start a sound. The intensity of the sound is controlled by the velocity of the keystroke. Releasing the key stops the sound. Instead of physically pushing and releasing the piano key, the musician may also trigger the instrument to produce the same sound by transmitting suitable MIDI messages, which encode the note-on, the velocity, the note-off, and other information. These MIDI messages may be automatically generated by some other electronic instrument or may be provided by a computer. It is an important fact that MIDI does not represent musical sound directly, but only represents performance information encoding the instructions about how an instrument has been played or how music is to be produced." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## MIDI Representation\n", "\n", "The original MIDI standard was later augmented to include the **Standard MIDI File (SMF)** specification, which describes how MIDI data should be stored on a computer. In the following, we denote SMF files simply as **MIDI files**\n", "or **MIDI representations**. The SMF file format allows users to exchange MIDI data regardless of the computer operating system and has provided a basis for an efficient internet-wide distribution of music data, including numerous websites devoted to the sale and exchange of music. A MIDI file contains a list of MIDI messages together with timestamps, which are required to determine the timing of the messages. Further information (called meta messages) is relevant to software that processes MIDI files.\n", "\n", "The most important MIDI messages are the note-on and the note-off commands, which correspond to the start and the end of a note, respectively. Each note-on and note-off message is, among others, equipped with a MIDI note number, a value for the key velocity, a channel specification, as well as a timestamp. The **MIDI note number** is an integer between $0$ and $127$ and encodes a note's pitch, where MIDI pitches are based on the equal-tempered scale. Similarly to an acoustic piano, where the $88$ keys of the keyboard correspond to the musical pitches A0 to C8, the MIDI note numbers encode, in increasing order, the musical pitches C0 to G$^\\sharp$9. For example, the concert pitch A4 has the MIDI note number $69$.\n", "\n", "Start | \n", "End | \n", "Pitch | \n", "Velocity | \n", "Instrument | \n", "
---|---|---|---|---|
0.25 | \n", "0.50 | \n", "43 | \n", "113 | \n", "Piano | \n", "
0.25 | \n", "0.50 | \n", "55 | \n", "76 | \n", "Piano | \n", "
0.25 | \n", "0.50 | \n", "67 | \n", "76 | \n", "Piano | \n", "
0.50 | \n", "0.75 | \n", "43 | \n", "113 | \n", "Piano | \n", "
0.50 | \n", "0.75 | \n", "55 | \n", "76 | \n", "Piano | \n", "
0.50 | \n", "0.75 | \n", "67 | \n", "76 | \n", "Piano | \n", "
0.75 | \n", "1.00 | \n", "43 | \n", "113 | \n", "Piano | \n", "
0.75 | \n", "1.00 | \n", "55 | \n", "76 | \n", "Piano | \n", "
0.75 | \n", "1.00 | \n", "67 | \n", "76 | \n", "Piano | \n", "
1.00 | \n", "2.00 | \n", "39 | \n", "126 | \n", "Piano | \n", "
1.00 | \n", "2.00 | \n", "51 | \n", "126 | \n", "Piano | \n", "
1.00 | \n", "2.00 | \n", "63 | \n", "70 | \n", "Piano | \n", "
![]() | \n",
" ![]() | \n",
" ![]() | \n",
" ![]() | \n",
" ![]() | \n",
" ![]() | \n",
" ![]() | \n",
" ![]() | \n",
" ![]() | \n",
"