The original ABC files were sourced from the Nottingham Music Database, and are tracked here untouched.
Technical cleaning specifications
Here we list the manual and programmatic modifications we made to the ABC files to be able to convert them to MIDI.
diff command between a file in the original folder and its corresponding cleaned version will highlight all the changes we made to the plain text ABC.
We made the chord notation more consistent and easily parsable by:
- Removing uninterpretable symbols (e.g.
- Using one single format for diminished/augmented/over-note notation (
"Ca"for augmented and
"C/e"for a C chord over E)
We strived to make the repeat notation more machine-readable by:
- Adding beginning-of-repeat symbols (
|:) whenever their position might be programmatically ambiguous
- Uniforming the first and second time bar notation (some pieces were using only the numbers
2, others the symbols
[2; we opted for the second)
- Adding double bars
||at the end of all second time bars, to make it more transparent which notes are part of a repetition structure and which are not.
We expanded the usage of the part name notation, and used it to encode for other score notations that are not easily machine-interpretable:
- We modified slightly the usage of the
Pmetadata, allowing us to distinguish easily between a single part name (
P) and the piece part playing sequence (new piece metadata label
Y), which in the originals are both under the same tag
- Substituted all notations of "Da Capo al Segno" or "Dal Segno" with a corresponding part subdivision and playing repetition.
The chordal parts of a few pieces contain what can be considered a walking bass sequence of notes intermixed with the chords themselves. We decided to remove these extra notes from the cleaned ABC files for two reasons:
- The chords are significantly easier to interpret without them;
- There are only very few pieces that have this feature, making it of no interest for the purpose of learning algorithms.
We also removed the lyrics from the few pieces that contained them for the same reason.
Some pieces contained bars of the wrong duration because of an inconsistent number of notes or note lengths. In most cases we tried to fix these inconsistencies by filling the bar or reducing the duration of the notes in the way that we thought made the most musical sense, but in a couple of cases we opted for simply removing the offending pieces (e.g. the Pachelbel’s Canon renditions).
Some ABC pieces have two sequences of alternative chords in a repeat, so that when playing the melody the second time the chord sequence is different. This is valuable musical information, so we did not remove it from the ABC files, but we decided to ignore it in the MIDI conversion to simplify the parsing operation, so that all repeats always use the first chord of each two-chord alternate pair.
This repository is released under the GNU GPLv3 license.