| themebuilderx manpage |
COMMAND
themebuilderx -- Create search entries for use with themax
OPTIONS
| --poly | |
Extract multiple monophonic entries from a polyphonic data file.
|
| -E | |
Suppress extra fields (key and meter descriptions)
|
| -r | |
Include rhythmic fields in output
|
| -p | |
Include pitch fields in output (default behavior)
|
| -P | |
Suppress pitch fields in output (used in conjuction with -r to output only rhythmic entries)
|
| -a | |
Output all data fields (equivalent to -pr.
#H|humdrum=b
|
| -f string | |
Extract particular features which is a string containing any of the following feature types (case sensitive):
PGC, RC, PRC, 12I, 12P, SD, P, MI, RGC, RRC, IOI, DUR, BLV, MLV, MLI, MGC.
|
| -t file | |
Subsitute the filename in the first column of output data with a different string (typically a control number for database management).
|
| -l # | |
Limit the number of notes processed for the entry to first # of the file.
|
DESCRIPTION
Themebuilderx is used to generate a search index which is
used as input into the themax command. Themebuilderx is used
to generate search indexes for
ThemeFinder but can also be used
for other applications, or interfacing with directly on the command line.
The original themebuilder command was written
in AWK by David Huron, utilizing other Humdrum tools. The "x"
version is a backwards compatible implementation in C++ which is stand-alone
(extracts search features without dependencies on other command-line tools), and
adds rhythmic and polyphonic feature extensions.
As an example, consider the following 6 Humdrum files:
Passing these files to themebuilderx will generate a search entry
line for each file:
Each line contains multiple fields separated by a tab character, and each
line starts with a unique tag character to facilitate searches in the
thema command. The default entries on each line are:
- filename
- key -- starting with uppercase Z for major modes or
lowercase z for minor
modes, then the tonic note of the key (in uppercase),
terminated by an equals sign (=).
Example: ZG= which represents G major.
Note that there must be a key designation record in the file
in order for the key to be extracted into the index.
- twelve-tone interval -- starting with an open curlybrace ({), then a
string of intervals without spaces, using m (minus) for falling melodic intervals,
p (positive) for rising intervals (p is also used before
repeated notes). Example: {m2m1m4m1p3m2p4m2p3m1p3m12p4p1p0
- pitch refined contour -- starting with # and followed by
five possible charcters: d = down a diatonic step, D = down a diatonic leap (greater than
an interval of a 2nd), s = same pitch (repeated note), u = up a step, U = up a leap.
Example: #ddDdUdUdUdUDUus
- pitch gross contour -- a three-level description of the melodic contour
(as opposed to 5 for refined contour). The data field starts with
a colon (:), and then has three possible characters: U = up (next note is a higher pitch
than the current note), S = same or repeated note, D = down.
Example: :DDDDUDUDUDUDUUS
- scale degree -- starts with a percent sign (%) followed
by the numbers 1 through 7 to indicate the seven diatonic steps
of a major or minor scale. Accidentals are ignored, so both
C and C# in C major are labeled as 1.
Example: %5431721324355711
Note that there must be a key designation record in the file
in order for the scale degrees to be extracted from the data.
- musical interval -- abbreviations of the standard names
for musical intervals. This field stats with a right curlybrace
(}), followed by a sequence of intervals without
spaces which consist of three parts: (1) the interval direction
(x for down, X for up), (2) the quality of the
diatonic interval (M=major, m=minor,
P=perfect, A=augmented, d=diminished,
and (3) the diatonic distance as a number, such as 3 for a third.
Example:
}xM2xm2xM3xm2Xm3xM2XM3xM2Xm3xm2Xm3xP8XM3Xm2P1
- twelve-tone pitch class. Starting with a j, then
followed by the absolute pitch classes, starting with
C = 0, C-sharp/D-flat = 1, D = 2. For two digit pitch classes,
letters of the alphabet are substituted: A-sharp/B-flat = 10 -> A,
and B/C-flat = 11 -> B.
Example: j20B7697B90B22677
- diatonic pitch class -- Starting with J and followed
by the pitch class names. This field is the only one which
separates individual notes by spaces.
Diatonic pitch names are in upper case (A through G)
followed by an accidentals: # for sharps/double sharps,
and - for flats/double flats.
Example: JD C B G F# A G B A C B D D F# G G
- metric description: starting with an M, followed by
the numberic values for the time signature, and then followed
by quadruple, triple, etc/ which
describes the type of metric cycle, followed by simple
or compound depending on if the top number in the
time signature is divisible by 3.
Example: M4/4quadruplesimple
Rhythmic analysis option
Adding the -r adds rhythmic analysis entries to the output data:
- duration gross contour (~)
- duration refined contour (^)
- duration (as an inter-onset-interval) (!)
- beat level (&)
- metric level (`)
- metric refined contour (')
- metric gross contour (@)
Polyphonic option
Polyphonic data extraction can be done by using the --poly
option. This option extracts multiple entries for a file, with one
line for each **kern spine in the file.
Currently, only
the primary track of a spine is used for building an index.
For example, here is a file with two spines of **kern
data:
Running the command "themebuilderx --poly poly.krn"
will generate two entries:
Each entry adds a double colon (::) after the filename
(or text string substitution when using the -t option), followed
by the spine number from which the indexing data was extracted.
Note that the second column of data in the second spine is currently ignored.
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
SEE ALSO
DOWNLOAD
The compiled themebuilderx program can
be downloaded for the following platforms:
- Linux (i386 processors)
statically compiled on 5 Jul 2009.
- Mac OS X/i386 compiled on 10 Sep 2009.
The source code for the program was last modified on 1 Jul 2009. Click here to go to the full source-code download page.
|