Unlock the World of MIDI Files: Understand the Difference between MIDI Scores and MIDI Performances
Before diving into any deep learning project involving MIDI files, it is crucial to grasp the distinction between MIDI scores and MIDI performances. This article is a must-read for those embarking on their journey with MIDI files. Widely embraced in the music sphere, MIDI files have piqued the interest of computer music researchers owing to the abundance of datasets available.
The crux lies in the fact that different types of information can be encoded in MIDI files. Particularly, the disparity between MIDI scores and MIDI performances is paramount. A lack of awareness regarding this can result in wasted time on futile tasks or an incorrect choice of training data and approaches.
Let’s explore the fundamentals of both formats and delve into practical examples of how to start working with them using Python.
Understanding MIDI:
Initially introduced as a real-time communication protocol between synthesizers, MIDI entails sending a message each time a note is struck (note on) on a MIDI keyboard and another message when the note is released (note off). This allows the receiving synthesizer to determine the sound to produce.
Delving into MIDI Files:
By aggregating and storing these messages along with their time positions, a MIDI file is created, enabling the reproduction of a musical piece. Apart from note-on and note-off messages, there are various other types of messages such as pedal information or other controllers encoded in MIDI files. One can visualize this information on a piano roll, albeit simply a representation and not the MIDI file itself.
Crafting MIDI Files:
A MIDI file can be crafted through two primary methods: playing on a MIDI instrument or manually entering notes into a sequencer or musical score editor. Each approach results in a different type of file:
- Playing on a MIDI Instrument: MIDI Performance
- Manually Writing into a Sequencer or Score Editor: MIDI Score
Let’s now dissect each type and delineate their differences.
MIDI Performances:
- Onset Time
- Offset Time (or Note Duration)
- Note Pitch
- Key Press Velocity
MIDI performances typically capture piano performances due to the prevalence of MIDI keyboards. The Maestro dataset stands as a prominent collection of human MIDI performances, chiefly focusing on classical piano music. A pivotal trait of MIDI performances is the absence of notes with identical onset or duration, reflecting human imprecision and expressive tendencies.
Hands-on Example with MIDI Performance:
Venture into the ASAP dataset on GitHub and utilize the Partitura Python library to explore a MIDI performance. Uncover the distinct attributes of onset and duration in seconds, pitch, and velocity within the performance data.
MIDI Scores:
Enriched with a more extensive set of MIDI messages encompassing time signatures, key signatures, bar positions, and beat placements, MIDI scores mirror musical scores to a certain extent. However, they lack essential elements like pitch spelling, ties, rests, beams, etc. The temporal information in MIDI scores is denoted in abstract musical units such as quarter notes.
Hands-on Example with MIDI Score:
Examine the score for Bach Prelude BWV 848 in C# using Partitura functions in Python. Observe the aligned note onsets on a quantized grid and the rhythmic structure encoded in quarter note segments.
Bridging the Gap:
For optimal outcomes in deep learning systems:
- Prefer MIDI Scores for music generation applications, leveraging quantized note positions for simplified representation.
- Utilize MIDI Performances in systems targeting human music interaction, such as beat tracking and expressive performance modeling.
- Combine both datasets for tasks like score-following and expressive performance generation.
Straddling Complexity:
While MIDI scores and MIDI performances present distinct characteristics, nuances and challenges may arise from certain datasets and software intricacies. Grace notes, tempo variations, and embellishments pose additional complexities that warrant careful consideration when working with MIDI data.
Unlock the potential of MIDI files in fueling your deep learning aspirations, wielding invaluable insights into pitch, onset, and duration of musical notes. Acclimatize yourself with the wealth of information encoded in MIDI files to embark on a captivating journey through the realm of computer music research.
Are you ready to decode the melody within MIDI files and pioneer groundbreaking innovations in music technology? Dive deeper into the world of MIDI and unravel the symphony of possibilities that await!
[All figures are from the author.]
Embark on a journey into the realm of music and technology, fueled by the power of MIDI files!