SYNOPSIS
OPTIONS
DESCRIPTION
EXAMPLESMultiple File Input If more than one input file is given, a list of the filenames will be given with the identified scale type. For example, here are the analyses of the first few songs collected by Helen Creighton in Nova Scotia: scaletyle *.krn
nova001.krn: hexatonic
nova002.krn: hexatonic
nova003.krn: heptatonic
nova004.krn: heptatonic
nova005.krn: pentatonic
nova006.krn: hexatonic
nova007.krn: heptatonic
nova008.krn: pentatonic
nova009.krn: pentatonic
nova010.krn: heptatonic
nova011.krn: heptatonic
nova012.krn: hexatonic
...
If you want to count the number of songs in a set with a particular
scale-type quality, you can pipe the output to the unix commands
grep and wc -l:
scaletype *.krn | grep pentatonic | wc -lFor the set of Nova Scotia songs, the resulting count is 66, with hexatonic being 62, and pentatonic being 13. By default, multiple files will be listed with their full pathnames according to the input. If you do not want to see the directory in which a file is located, you can add the -D option. Also, filenames can be suppressed with the -F option scaletype -F *.krn
hexatonic
hexatonic
heptatonic
heptatonic
pentatonic
hexatonic
heptatonic
pentatonic
pentatonic
heptatonic
heptatonic
...
The -F option is useful for counting the number of
songs in each category:
scaletype -F *.krn | sort | uniq -c | sort -nr
66 heptatonic
62 hexatonic
13 pentatonic
8 chromatic
3 toofew
Pitch-Class Sets Adding the -p option will add additional pitch-class information after the scale-type designation. scaletype -p nova001.krn
hexatonic C D E F G A
The scaletype program cannot be used to identify the
tonic of the scale, so the first pitch-class note in the list
is not necessarily the tonic note.
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: 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 source code for the program was last modified on 7 Apr 2009. Click here to go to the full source-code download page. |