 # time2tempo manpage

### COMMAND

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

### SYNOPSIS

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

### OPTIONS

 -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.

### DESCRIPTION

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.
 **kern **time * *u=msec *M4/4 *M4/4 =1- =1- 2dd 0 4ee 2000 4dd 3000 =2 =2 2dd 4000 2dd 5500 =3 =3 2cc# 7000 4dd 9000 4dd 10000 =4 =4 4dd 11000 4cc 12000 4cc 13000 4b- 14000 =5 =5 2b- 15000 2a 18000 == == *- *- **tempo * * =1- 60 . . =2 80 . =3 60 . . =4 . . . . =5 40 . == *-

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.

 **kern **time * *u=sec *M4/4 *M4/4 =1- =1- 2dd 0 4ee 2 4dd 3 =2 =2 2dd 4 2dd 5.5 =3 =3 2cc# 7 4dd 9 4dd 10 =4 =4 4dd 11 4cc 12 4cc 13 4b- 14 =5 =5 2b- 15 2a 18 == == *- *- **tempo * * =1- 60 . . =2 80 . =3 60 . . =4 . . . . =5 40 . == *-

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

 **kern **time * *u=msec *M4/4 *M4/4 =1- =1- 2dd 0 4ee 2000 4dd 3000 =2 =2 2dd 4000 2dd 5500 =3 =3 2cc# 7000 4dd 9000 4dd 10000 =4 =4 4dd 11000 4cc 12000 4cc 13000 4b- 14000 =5 =5 2b- 15000 2a 18000 == == *- *- **tempo * * =1- 60 60 60 =2 80 80 =3 60 60 60 =4 60 60 60 60 =5 40 40 == *-

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.

 **kern **time * *u=msec *M4/4 *M4/4 =1- =1- 2dd 0 4ee 1990 4dd 3208 =2 =2 2dd 4506 2dd 5500 =3 =3 2cc# 7603 4dd 8954 4dd 1040 =4 =4 4dd 11104 4cc 12360 4cc 12741 4b- 14112 =5 =5 2b- 14885 2a 18901 == == *- *- **tempo * * =1- 60.3015 49.2611 46.225 =2 120.724 57.0613 =3 88.8231 . 5.96184 =4 47.7707 157.48 43.7637 77.6197 =5 29.8805 . == *- **tempo * * =1- 60 49 46 =2 121 57 =3 89 . 6 =4 48 157 44 78 =5 30 . == *-

### ONLINE DATA

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:
`       program http://www.some-computer.com/some-directory/file.krn`
Piped data works in a somewhat similar manner:
`       cat file.krn | program`
is equivalent to a web file using ths form:
`       echo http://www.some-computer.com/some-directory/file.krn | 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`
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`

```