Humdrum Extras

tsroot manpage


    tsroot -- Analyze the harmony of **kern data using the Melisma Music Analyzer.


    tsroot [-r[-a | -p[--tempdir dir[--meldir dir[--midir dir[input[> output]


-r Also do a roman-numeral analysis of the Music.
-a Append analysis to the end of the input Humdrum data lines.
-p Prepend analysis to the start of the input Humdrum data lines.
--tempdir dir Set the temporary directory for intermediates files to the directory dir. Default value is set to /tmp.
--meldir dir Specify the directory dir in which the Melisma Music Analyzer programs are located. Default value is set to /usr/ccarh/melisma/bin.
--midir dir Specify the directory dir in which the museinfo support programs are located. Default value is set to /var/www/websites/museinfo/bin.


    The Melisma Music Analyzer is a set of programs for music harmony analysis written by Daniel Sleator and Davy Temperley. The tsroot program is used to coordinate the input and output of the melisma analysis programs with a Humdrum **kern musical score.

    Support Programs and Installation Instructions

    Requires the following ancillary programs:

    1. meter -- Melisma meter program which adds Beat information to note data.
    2. harmony -- Melisma root analysis program which adds chord analysis data to meter program output.
    3. kern2melisma -- program which converts **kern data into melisma Note data.
    4. harmony2humdrum -- PERL program which converts the Melisma harmony program output into a temporary Humdrum data file.

    For roman-numeral analysis, two more programs are required:

    1. key -- Melisma key analysis program.
    2. key2humdrum -- PERL program which converts Melisma Roman Numeral analysis into a temprary Humdrum data file.

    The support programs are expected to be in two directories:

    • meldir = set with --meldir option. This is the location of the melisma music analyzer command-line programs (meter, harmony, key).
    • midir = set with --midir option. This is the location of the other necessary programs.

    Automatically generated key parameter file contents for roman numeral analysis:

        verbosity=2                      <-- required for segment times
        default_profile_value = 1.5
        scoring_mode = 1
        romnums=1                        <-- required for roman numeral analysis



    Input arguments or piped data which are expected to be Humdrum files can also be web addresses. For example, if a program can process files like this:
           program file.krn
    It can also read the data over the web:
    Piped data works in a somewhat similar manner:
           cat file.krn | program
    is equivalent to a web file using ths form:
           echo | program

    Besides the http:// protocol, there is another special resource indicator prefix called humdrum:// which downloads data from the kernscores website. For example, using the URI humdrum://brandenburg/bwv1046a.krn:

          program humdrum://brandenburg/bwv1046a.krn
    will download the URL:
    Which is found in the Musedata Bach Brandenburg Concerto collection.

    This online-access of Humdrum data can also interface with the classical Humdrum Toolkit commands by using humcat to download the data from the kernscores website. For example, try the command pipeline:

          humcat humdrum://brandenburg/bwv1046a.krn | census -k


    The compiled tsroot program can be downloaded for the following platforms:
    • Linux (i386 processors) (dynamically linked) compiled on 28 Jun 2012.
    • Windows compiled on 29 Jun 2012.
    • Mac OS X/i386 compiled on 13 Nov 2013.
    • Mac OS X/PowerPC (version 10.2 and higher) compiled on 13 May 2009.

    The source code for the program was last modified on 24 Jun 2009. Click here to go to the full source-code download page.