Musical Information (Mus 253/CS 275A)
Kern to Notation Lab

How to generate graphical music notation from **kern data

  • Humdrum Toolkit programs used in this lab: ms.
  • Humdrum Toolkit Extra programs used in this lab: hum2gmn, hum2xml, proll, keyscape2, mup.
  • Other unix programs: convert, ps2pdf.
  1. Here is example data used for demonstrating commands in this lab. Copy and paste this data into a file called test.krn, or choose your own **kern data file to convert into notataion.

  2. Converting to Guido Music Notation

    You can convert **kern files into Guido Music Notation with the following command:

       hum2gmn test.krn > test.gmn
    For the example data, the file test.gmn will contain the following data:

    Next, go to the website, and if the file is short, just copy and past the GMN file contents into the correct location on the noteserver webpage and press the convert button to get the graphical music:

    You can also download notation viewers for Guido Music Notation to view the converted GMN data.

  3. Converting to Finale via MusicXML

    You can convert **kern files into MusicXML files which can be imported into the Finale Music Typesetting program with the following command:

       hum2xml test.krn > test.xml

    For the example data, the file test.xml will contain the following data:

    To copy the file from the server computer to your local computer to use in Finale on your local computer, either copy the test.xml file into your ~/www directory and then save from a web browser, or you can use secure copy (or a graphical version). For secure copy, this is the basic command to type on your local computer terminal:

       scp .
    To open a cygwin terminal on the local computer, open the icon which looks like a black "C" with a green triangle inside of it. Then to save the MusicXML file into the C:\temp directory, type:
       cd c:
       cd temp
       scp .

    Then start Finale and create a blank default document. Then go the the Plugins menu and select "MusicXML Import...". Then select your MusicXML file that was just download from the server. You should end up with music in the Finale window like this:

    You may also use the translation from Humdrum into MusicXML to import the musical data into other programs listed on the website, such as LilyPond.

  4. Converting to MUP

    You can convert **kern files to PostScript files directly on unix computer which have the mup progam installed. To use the mup software, you have to copy the license file into your home directory:

       cp /home/dhuron/.mup ~/

    Then you can use the Humdrum Toolkit program: ms:

       ms file.krn >
       ps2pdf file.pdf
       cp file.pdf ~/www/

    If there is a bug in the conversion process from **kern data into mup data, you can save the intermediate .mup data to a file and edit it with the following command:

       ms -z file.krn > file.mup
       mup file.mup >

  5. Converting to Piano Roll Notation

    The command proll converts Humdrum **kern data into a graphical version of piano roll notation:

       proll test.krn > test.ppm
       convert test.ppm > test.png
       cp test.png ~/www
    An example of the piano roll notation of the example Humdrum file is shown on the right.

  6. Converting into Keyscape Plots

    You can convert the example Humdrum **kern data into a hierarchical picture of the harmony with the following commands:

       keyscape2 -d 300x300 -k test.krn > test.ppm
       convert test.ppm test.png
       cp test.png ~/www
    Which should generate a plot similar to the one on the right.


  1. Print the melody you encoded from the previous lab using each of the printing methods described above.

Revised: 27 Feb 2005