Humdrum Extras

pae2kern manpage


COMMAND

    pae2kern -- Convert Plaine & Easie code into **kern musical data.

SYNOPSIS

    pae2kern [-s][-e extension][-d directory][-a formatinput.txt [> output]

OPTIONS

-s Print converted data to standard output rather than to file(s).
-e string Use the given string as the filename extension. The extension will be appended to the input filename bases, with a "." added between the filename base and extension.
-a string Pass the given string as the !!!hum2abc: parameter setting line in the output file.
-d directory Save the generated files in the given directory location. The default value is the current working directory.
-q (Quiet mode). Suppress default bibliographic records generated with input data from being included in the output data.
-Q (Quiet mode #2). Suppress all bibliographic records from being included in the output data.

DESCRIPTION

    pae2kern converts Plaine & Easie data into Humdrum **kern data. Plaine & Easie is a data format used to encode incipts in the RISM A/II database of musical manuscripts written after 1600. A full specification for Plaine & Easie is found on the web at:

    Input file

    The 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:

    @start: This entry indicates the start of an entry which contains one incipit. The text string following @start: on the line indicates the filename base used to create a filename along with the -e option (if the -s option is not used to redirect the converted data to standard output).
    @end: Ends data for the current entry in the file.
    @clef: Specifies the Plaine & Easie clef for the start of the music.
    @keysig: Specifies the Plaine & Easie key signature for the start of the music.
    @key: Specifies the musical key of the music in Plaine & Easie format.
    @timesig: Specifies the Plaine & Easie time signature for the start of the music.
    @alttimesig: Specifies a Plaine & Easie time signature in the original notation before it was converted into common-practice notation (such as mensural time signatures).
    @data: Specifies the actual Plaine & Easie data for the music, excluding the initial clef, key signature, or time signature

    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 interface

    pae2kern 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.pae
     
    Tells 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 program

    If the example data is stored in a file called file.pae, then to run the program in its simplest configuration, type:
        pae2kern file.pae
     
    The result will be a file called example1.krn which contains the converted musical data.

    Output file

    Each 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:

    (Mention hum2mid with the initial rest removal option here)

EXAMPLES

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

DOWNLOAD

    The compiled pae2kern program can be downloaded for the following platforms:
    • Linux (i386 processors) (dynamically linked) compiled on 28 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 2 Dec 2008. Click here to go to the full source-code download page.