hint [-a|-l|-v] [-cdu] [-s regexp] [inputfile ...] [> outputfile.hnt]
**pitchdiad C4-E4 (or E4-C4) -- to the interval token M3.
command determines harmonic intervals for pitch tokens spanning all
pitch-related spines in an input record;
this includes multiple-stops within spines.
In the default operation, a single output interpretation
is generated for any given input.
All pitches in a given sonority (sounding moment) are first sorted in
ascending pitch order.
option is selected, duplicate pitches (unisons) are treated as a single
pitch-instance when calculating the intervening intervals.
Intervals are then calculated between successive pairs of pitches --
ordered from low to high.
A single data token is output -- representing
all intervals in a given sonority.
If more than one interval is present, the interval tokens are assembled
as Humdrum multiple-stops within the output data token.
Input records containing no pitch tokens result in the outputting of a null token (.). Input records containing only rests result in the outputting of a rest token (r). Input records containing only a single pitch result in the outputting of a hyphen (-). Input records containing only a single duplicated pitch result in the outputting of the interval (P1) -- unless the -u option is selected, in which case the a hyphen is output (-).
The hint command recognizes and echoes "common-system" barlines (see barlines (2)). It is also able to handle multiple-stops.
By defining regular expression patterns, the user may select which data records should be ignored by hint. (See EXAMPLES below.)
Note that the output spine generated by hint preserves the same record-type structure as the input, and so may readily be pasted with the input file using the Humdrum assemble command.
The hint command is able to accept any of the pitch-related representations listed below. For descriptions of the various input representations refer to Section 2 (Representation Reference) of this reference manual.
It is recommended that output files produced using the hint command should be given names with the distinguishing `.hnt' extension.
core absolute pitch representation
German pitch system
American National Standards Institute pitch notation (e.g. "A#4")
French solfège system (fixed `doh')
The -a and -l options are mutually exclusive.
-a calculate all intervals by permuting all pitches present -c output compound intervals as non-compound intervals -d output diatonic interval size only, without the interval quality -h displays a help screen summarizing the command syntax -l calculate intervals with respect to the lowest pitch present -s regexp skip; completely ignore records matching regexp; (output null token) -u eliminate unisons from the output
Options are specified in the command line.
option causes all permuted intervals within a sonority to be output
rather than only those intervals between successive pitch-ordered pitches.
Hence, the sonority (E4 G4 C5) will produce the output m3 m6 P4
rather than m3 P4.
A tandem interpretation (
*all) is added to the output
in order to indicate that the interval content is exhaustive.
Note that the order of the intervals in the output token no longer
has any significance when the
option is invoked.
The -c option causes all compound intervals to be output as non-compound equivalents. Compound intervals are defined as those intervals greater than or equal to an octave in size. Hence, a major tenth interval will be output as a major third, and an octave will be output as a perfect unison.
option causes only the diatonic interval size to be output.
In this case, the interval quality signifiers (
will be suppressed.
For example, with the
option, the output token `3' signifies any interval of a third,
including major, minor, diminished, etc.
The -l option causes hint to calculate all intervals with respect to the lowest notated pitch present. Hence, the input sonority (G4 E4 C4) will produce the output M3 P5 rather than M3 m3.
The -s option allows the user to define a regular expression, that if matched, causes a null token to be output for the given record.
The -u option eliminates duplicate pitches in interval calculations. For example, rather than outputting P1 M3 P1 for the sonority (C4 C4 E4 E4), the -u option will result in the output M3. In the case of a sonority consisting of a repeated single pitch, the -u option will cause a hyphen (-) to be output.
Using the default invocation, the hint command transforms the above input as follows:
**kern **kern **pitch **commentary =1 =1 =1 barline 8c 8e G4 C major triad 8g 8c E4 reordered pitches 4r 4r r rest . . . null tokens 4C 4e G5 open position triad =2 =2 =2 barline 4C 4E 4G 4c C5 multiple-stops 4CC 4r 4e 4g r mixed notes & rest 8C 8C . unison 8C 8r . single pitch =3 =3 =3 barline *- *- *- *-
The hint command correctly echoes (and ignores) both rests and kern-like barlines -- as illustrated in the first and fourth output data records. The second output data record (M3 m3) indicates that two intervals are present: the first interval is a major third above the lowest pitch, and the second interval is a minor third above the other pitch. The third data record shows that rearranging the order of the input pitches has no effect on the output.
**hint =1 M3 m3 M3 m3 . M10 m10 =2 M3 m3 P4 P8 M17 m3 P1 - =3 *-
Notice that the null-token in the sixth record has been echoed. Null-tokens have no effect on interval calculations and are treated as though they are non-existent. Multiple-stops are treated the same as if each pitch was in a separate spine (eighth data record), and rests within a sonority containing pitches are ignored (ninth data record). The perfect unison signifier (P1) is output only if more than one pitch is present (tenth data record). If a single pitch is present in the input, a hyphen is output rather than the P1 token (eleventh data record).
option causes only the diatonic interval sizes to be output as follows:
**hint =1 3 3 3 3 . 10 10 =2 3 3 4 8 17 3 1 - =3 *-
will cause any data token containing the letter `r' to suspend the calculation of any harmonic intervals for the current record. The corresponding
hint -s r input > output.hnt
**hintoutput for data records matching the pattern will consist simply of a null token. Given the sample input, intervals will be calculated only when none of the pitch-related spines contain a rest.
Given the first three spines of the above sample input
(i.e. without the
**commentary spine), the command
hint -cu -s r input > output
will produce the following output:
**hint =1 M3 m3 M3 m3 . M3 m3 =2 M3 m3 P4 . - - =3 *-
to calculate intervals with respect to the lowest pitch present in the sonority.
For example, with the above sample input, the
option would produce the following output:
**hint * =1 M3 P5 M3 P5 . M10 P19 =2 M3 P5 P8 P15 M17 P19 P1 - =3 *- **kern **kern 4C 4E 4G 4c 4c 4r *- *- **hint *all M3 P5 P8 P8 m3 m6 m6 P4 P4 P1 *-
**deg (2), **degree (2), **hint (2), humsed (4), **kern (2), **mint (2), mint (4), recode (4), regexp (6), **semits (2), semits (4), solfg (2), **Tonh (2), xdelta (4), ydelta (4)