Humdrum Extras

time2tempo manpage


    time2tempo -- Convert a **time spine into a **tempo spine.


    time2tempo [-rf][-a|-p[input[> output]


-a Append the **tempo spine to the input data.
-p Prepend the **tempo spine to the input data.
-r Round tempo markings to nearest integer values.
-f Fill null tokens with previous tempo marking.


    The time2tempo command takes one or more **kern spines of a musical score and a **time spine which indicates the time at which each line in the score is to be played. The time2tempo command then calculates the tempo markings necessary to generate the performance at the given times.

    The time values can be expressed in terms of milliseconds by using the flag *u=msec. Seconds are indicated by using the flag *u=sec as demonstrated in the following example.

    The -f option will fill in the tempo markings for all lines, whether or not there has been a tempo change in the performace.

    The -r option can be used to round the tempo values to the nearset whole number if readability is more important than accuracy. In the following example the middle column displays the default output of the time2tempo command, while the last column displays the same data rounded to the nearest whole number.



    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 time2tempo 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 3 Jun 2006. Click here to go to the full source-code download page.