Input fileThe input file for pae2kern consists of one or more entries. Each entry describes one musical incipit (typically a RISM ID contains multiple musical incipits). Here is an example of an input musical entry to pae2kern:
Each entry starts with a line beginning with @start:, and ends with a line beginning with @end:. Each data field starts with an at (@) sign followed by the field name, then a colon character (:). Then, the value for the field is given. The meaning of each line:
Additional lines found in the input data starting with two or more exclamation marks (!) will be echoed to the output data. For example, to specify the title of the incipit, you could include the following line in the entry:
!!!OTL: This is a title
Using the -Q option will prevent any lines starting with !! from being echoed to the output data. Using the -q option will prevent the default input data fields from being echoed to the output as bibliographic records.
hum2abc interfacepae2kern Allows for parameter settings for hum2abc to be included in the output data. For example, if you use the command-line option -a, a reference record starting with !!!hum2abc: will be included in the output data. This reference record contains command-line parameter settings for hum2abc, and will be used by hum2abc when creating abc data to be used to produce graphical notation of the music.
pae2kern -a '-p "%%squarebreve 1" -Q "" -n none' example.paeTells the hum2abc program to not print tempo-markings (-Q ""), to not print measure numbers (-n none), and to graphically represent breves as square notes rather than whole notes bounded by two vertical lines (-p "%%squarebreve 1"). Note that if your formating parameters contains double quotes, you can use single-quotes to enclose the formatting string. And conversely, you can use double-quotes to enclose a string if it uses single-quotes. Otherwise, back-quoting may work for the internal quotes.
The example formatting string will be echoed to the output data in a bibliographic line such as this:
!!!hum2abc: -p "%%squarebreve" -Q "" -n none
Running the programIf the example data is stored in a file called file.pae, then to run the program in its simplest configuration, type:
pae2kern file.paeThe result will be a file called example1.krn which contains the converted musical data.
Output fileEach entry in the input file will be stored in a separate file according to the filename base found on the @start: line. Input fields are stored as bibliographic records (which start with !!!) before the converted data. The converted datafile is a Humdrum file, the data starting with **kern and ends with *- (star-minus).
This data can then be sent through hum2abc to generate ABC+ data which can be printed to PostScript or Encapsulated PostScript using abcm2ps which can then be converted to various image formats, such as this GIF file:
program file.krnIt can also read the data over the web:
program http://www.some-computer.com/some-directory/file.krnPiped data works in a somewhat similar manner:
cat file.krn | programis 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.krnwill download the URL:
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