Humdrum Extras

satb2gs manpage


    satb2gs -- Convert SATB staves into a grand-staff arrangement.


    [input satb2gs [input] > [output]


    The satb2gs program converts Humdrum scores with the first four (monophonic) **kern spines in the file into grand-staff (two-staff keyboard) style layout. There must be at least four **kern spines in the Humdrum score, with the order of the parts in the file presumed to be bass, tenor, alto, then soprano. The spines do not have to be contiguous in the file, and other spines (such as **text spines) can interleave any of the SATB parts. Any **kern spines after the first four will not be processed. If the parts are not contiguous, the tenor part will be moved next to the bass part and the alto will be moved next to the soprano part.

    The original clefs of the SATB parts will automatically be commented out in local comments, and the treble and bass clefs of a grand staff will be placed at the start of the soprano/alto and tenor/bass staves. Also, fermatas in the tenor and alto parts will automatically be hidden if they occur at the same time as fermatas in the bass and soprano parts, respectively, as long as the tenor/bass or alto/soprano note durations are the same.

    As an example consider the following Humdrum file containing four monophonic SATB parts:

    humcat h://371chorales/chor001.krn | less

    When this data is printed, it will be typeset with four staves -- one staff for each part:

    autostem h://371chorales/chor001.krn | hum2muse \
    | muse2ps '=z21js^[(....)]^v170,170,170,200' | ps2pdf - - > 4staves.pdf

    Also, here is the same music printed using abcm2ps:
    hum2abc h://371chorales/chor001.krn | abcm2ps - -O - | ps2pdf - - > 4partabc.pdf

    Using satb2gs, the music is placed onto two staves rather than four:

    satb2gs h://371chorales/chor001.krn > chor001gs.krn

    Notice that the exclusive interpretation line now contains two **kern spines rather than four, and that the fermatas in the inner voices are now marked as hidden.

    This data will now print using a grand staff:

    satb2gs h://371chorales/chor001.krn | autostem | hum2muse \
    | muse2ps '=z21jv250,250s^{(..)}^C^^T^^' | ps2pdf - - > chor001gs.pdf

    Here is an example of printing through abcm2ps rather than muse2ps (autostem is not needed to add stems for the input to hum2abc since abcm2ps determines all stem directions automatically):

    satb2gs h://371chorales/chor001.krn | hum2abc | abcm2ps - -O - \
    | ps2pdf - - > chor001gsabc.pdf



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

    The source code for the program was last modified on 6 Feb 2011. Click here to go to the full source-code download page.