"**Symbolic music representations** comprise any kind of score representation with an explicit encoding of notes or other musical events. These include machine-readable data formats such as MIDI. Any kind of digital data format may be regarded as symbolic since it is based on a finite alphabet of letters or symbols."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Piano-Roll Representations"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Around the late 19th and early 20th centuries, self-playing pianos called **player pianos** became popular. The input for these pianos is a continuous roll of paper with holes punched into it. This paper roll is called a **piano roll**. Performances by famous musicians such as Gustav Mahler, Edvard Grieg, Scott Joplin and George Gershwin have been recorded onto piano rolls. Here is a player piano in action:"
"Today, a **piano-roll representation** generically refers to any visualization of note information resembling a piano roll. See below for examples of piano-roll representations by Stephen Malinowski. Here, the horizontal axis represents time, and the vertical axis represents pitch."
"Another symbolic representation is based on the **MIDI** standard ([Wikipedia](https://en.wikipedia.org/wiki/MIDI)), or Musical Instrument Digital Interface. The advent of MIDI in 1981-83 caused a rapid growth in the electronic musical instrument market."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"MIDI messages encode information for each note event such as the note onset, note offset, and intensity (represented as \"velocity\" in MIDI terminology). On computers, MIDI files contain a list of MIDI messages and other metadata."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The **MIDI note number** is an integer between 0 and 127 that encodes the note's pitch. Most importantly, C4 (middle C) has MIDI note number 60, and A4 (concert A440) has MIDI note number 69. MIDI note numbers separated by 12 are separated by one octave, e.g. 72 = C5, 84 = C6, etc."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The **key velocity** is an integer between 0 and 127 which controls the intensity of the sound."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The **MIDI channel** is an integer between 0 and 15 which prompts the synthesizer to use a specific instrument."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"MIDI subdivides a quarter note into **clock pulses** or **ticks**. For example, if the number of pulses per quarter note (PPQN) is defined to be 120, then 60 ticks would represent the length of an eighth note."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"MIDI can also encode tempo in terms of **beats per minute** (BPM) thus allowing for absolute timing information."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Score Representations"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Score representations** encode explicit information about musical symbols such as clefs, time signatures, key signatures, notes, rests, dynamics, etc. However, score representations, the way we define it here, does not include any description of the final visual layout and positioning of these symbols on the page."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For better or for worse, **MusicXML** has emerged as a universal format for storing music files for use among different music notation applications. Here is an excerpt of a MusicXML file:"