Image Processing Reference
a measure and a quarter note gets one beat. FPC only considers music in 3/4 or 4/4 time, so a
quarter note always gets one beat.
Finally, harmonic rhythm describes the shortest regular chord duration between chord
changes. For example, in 4/4 a quarter-note-level harmonic rhythm means that chords change
at most every beat. Harmonic rhythm is one of the most important components of traditional
four-part analysis, its reliability crucial to correctly identifying chords and chord changes. For
this project, only music with quarter-note-level harmonic rhythms was chosen, removing the
need to detect harmonic rhythms programmatically.
2 Collecting the pieces — training and test pieces
A collection of four-part MusicXML files was created for use as training and test data by the
FPC system. Four-part pieces were collected from Web sites in two different formats: PDF and
MusicXML—with the PDFs later converted to MusicXML. A few hymns were entered by hand
in Finale 2011, a music notation program capable of exporting to MusicXML.
2.1 Downloading and Converting Files
able database of hymns, many of which are offered for download in PDF and MusicXML
formats. For the purposes of this project, Hymnary's PDF files were found to be preferable
to its MusicXML iles, which were compressed, heavily formated, and diicult to touch up.
A few of the PDFs on Hymnary were simply scans and not native PDFs (ones containing
font and character data), so they were entered by hand into Finale 2011 and exported to
MusicXML format. These MusicXML files were found to be suitable.
XML and PDF files were downloaded from these sites and renamed using the format
“title — classiier.pdf” or “title — classiier.xml” where “title” is the hymntune or other unique,
harmonization-speciic name of the composition and “classifier” is the composer. This naming
convention was maintained throughout the project. Individually, the PDF files from Hymnary
were converted to MusicXML using a software program called PDFtoMusic Pro. PDFtoMusic
Pro is not a text-recognition program, so it can only extract data from PDFs created by music
notation software, which all of them were. The free trial version of PDFtoMusic Pro converts
only the first page of PDF files, which fortunately created no issue since all but a few of the
downloaded hymns were single-page documents. The XML files PDFtoMusic Pro produced
carried the xml file extension and were compressed.
2.2 Formatting the MusicXML
Before the XML iles could be used, it was necessary to adjust their formating and, in the
case of the XML variety, remove their compression. This was done with Finale. Once open in
Finale, lyrics, chord charts, and any extraneous or visually interfering markings were removed
manually. If the piece was writen in open staf, as was the case with every Bach chorale, a pi-
ano reduction (two staves) was created in its place. Measures with pick-up notes were deleted
and if beats had been borrowed from the last measure, they were added back. For these rein-
stated beats, the last chord of the piece was extended.
Any time two layers exist in the same staff of the same measure, FPC expects them to start
and inish out the measure together. However, publishers and editors do not like spliting note