Humdrum Extras

scaletype manpage


COMMAND

    scaletype -- Categorizes **kern data as pentatonic, hexatonic, or heptatonic.

SYNOPSIS

    scaletype [-D[-p[input(s)[> output]

OPTIONS

    -p Add pitch-class data to output analysis.
    -D Do not include directory path in the filename when analyzing multiple input files.

DESCRIPTION

    The scaletype command identifies the type of scale being used in simple music with no non-scalar notes. The primary scale categories identified are 5-tone (pentatonic), 6-tone (hexatonic), and 7-tone (heptatonic). Pitch classes which constitute less than 5 notes are labeled as toofew, and more than 7 notes are labeled as chromatic. The program is particularly useful for identifying simple pentatonic melodies in large sets of songs.

EXAMPLES

    Multiple 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 24 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
        nova013.krn:    heptatonic
        nova014.krn:    chromatic
        nova015.krn:    hexatonic
        nova016.krn:    heptatonic
        nova017.krn:    hexatonic
        nova018.krn:    hexatonic
        nova019.krn:    hexatonic
        nova020.krn:    heptatonic
        nova021.krn:    heptatonic
        nova022.krn:    toofew
        nova023.krn:    pentatonic
        nova024.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 -l
    For 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.

    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.

    More example usages of the scaletype program are avaliable on the scaletype examples page

DOWNLOAD

    The compiled scaletype program can be downloaded for the following platforms:
    • Linux (i386 processors) compiled on 12 Jan 2005.
    • Windows compiled on 1 Jun 2006.

    The source code for the program was last modified on 12 Jan 2005.