kern [-x] [inputfile ...] [> outputfile.krn]
**kernrepresentations. For example, the
Ab2' will be output as the
AA-'. Continuous pitch-related representations, such as frequency (
**freq) and cents (
**cents) are rounded-off to the nearest equally-tempered pitch. Hence,
**freqvalues between 254.178 and 269.291 will be output as the
**kerntoken for middle C -- `c'.
are encoded as equally-tempered values at concert pitch.
Kern is not able to represent pitch deviations from equal temperament.
Diatonic pitch names are encoded using the letters A to G.
Octaves are indicated by a system of upper- and lower-case
letters, and by letter repetition.
Middle C is represented by the single lower-case letter `c'.
The C an octave above is represented by two lower-case letters: `cc' --
with each successive octave adding another letter.
The C an octave below middle C is represented by a single upper-case `C'.
The C an octave lower yet is represented by two upper-case letters: `CC' --
and so forth.
Changes of octave are deemed to occur between the pitches B and C.
Thus the B below middle `c' is rendered as a single upper-case `B';
the B below `cc' is `b' and so forth.
Sharps are indicated by the octothorpe sign (
whereas flats are indicated by the minus sign (
command is able to translate any of the pitch-related
representations listed below.
In each case, a tuning standard of A4 equals 440 hertz is assumed.
For descriptions of the various input representations
**kern) refer to Section 2
of this reference manual.
hundredths of a semitone with respect to middle C=0
scale degree including octave designation
frequency in hertz (abbreviated Hz.)
fretted-instrument pitch tablature
Music Instrument Digital Interface key-press tablature
American National Standards Institute pitch notation (e.g. "A#4")
equal-tempered semitones with respect to middle C=0
French solfège system (fixed `doh')
spectral centroid (in hertz)
German pitch system
For numerically-oriented inputs, such as
**cents, **freq, **MIDI, **semits, and
variant enharmonic spellings are selected for output according to the
prevailing key signature or explicit key indication.
(Refer to key and key signatures in Section 3
(Humdrum Tandem Interpretations).
Hence, in the key of G minor, F-sharp and E-flat spellings will be
output rather than G-flat and D-sharp.
Kern recognizes the presence of key, or key signature
If no key or key signature is encountered in the input, a default
key of C major is assumed.
Kern is sensitive to both
In the case of pitch-height key signatures, the user can specify
complex spelling preferences, such as F#2 rather than Gb2, but Gb3
rather than F#3, etc.
SAMPLE OUTPUT below.
It is recommended that output files produced using the kern command should be given names with the distinguishing `.krn' extension.
Options are specified in the command line.
-h displays a help screen summarizing the command syntax -x suppresses printing of non-pitch-related signifiers
In the default operation,
outputs any non-pitch-related signifiers in addition to the kern value.
For example, the
token "A6zzz" will result in the output
"aaazzz" -- that is, after translating A6 to "aaa",
the "zzz" signifiers are retained in the output.
For some applications, echoing non-pitch-related signifiers in the output
However, in other situations, the result can prove confusing --
especially, when the non-pitch-related signifiers are upper- or
lower-case letters from A-G.
Consider the case of the
**freq token "aA#5";
after translating "A#5" to "aa", the leading non-pitch-related
signifier "a" will be prepended to the output, hence the value
"aaa" -- which will undoubtedly cause confusion.
option is useful for eliminating non-pitch-related signifiers from the output.
For most inputs, the
option is recommended.
**cocho) cannot be processed by kern. In addition, there are two non-pitch-related spines (
Executing the command
!! `kern' example #1 **specC **pitch **MIDI **deg **metpos **cocho **Tonh **embell *M2/4 *M2/4 *M2/4 *M2/4 *M2/4 *M2/4 *M2/4 *M2/4 * * * * *tb8 * * * =1 =1 =1 =1 =1 =1 =1 =1 foo2000 G#4foo /60/bar 1foo 1 r Gis2 ct . . /-60/ . . . . . 2321 A3+20 /62/ 2 3 9.89 H2 upt . . 48/-62/ . . . . . 1807 Ab3 0/70/64 1 2 7.07 B2 ct . . 48/-70/ . . . . . 2487 C#4 /61/ 6 3 7.135 Cis4 sus . . /-61/ . . . . . =2 =2 =2 =2 =2 =2 =2 =2 3323 r . 5 1 r r . . . . 7 3 5.5 Heses2 ct 3471 D4-8 /48/ /52/ 1 2 8.11 C3 ct . . /-48/ . . . . . . D4 F4 /-52/ 2 3 7.33 6.4 C3 Es3 ct =3 =3 =3 =3 =3 =3 =3 =3 r G4 . r 1 r H2 D3 . === === === === === === === === *- *- *- *- *- *- *- *-
kern -x input > output.krn
produces the following result:
!! `kern' example #1 **kern **kern **kern **deg **metpos **cocho **kern **embell *M2/4 *M2/4 *M2/4 *M2/4 *M2/4 *M2/4 *M2/4 *M2/4 * * * * *tb8 * * * =1 =1 =1 =1 =1 =1 =1 =1 bbb g# c 1foo 1 r GG# ct . . . . . . . . dddd A d 2 3 9.89 BB upt . . . . . . . . aaa A- b- 1 2 7.07 BB- ct . . . . . . . . eeee- c# d- 6 3 7.135 c# sus . . . . . . . . =2 =2 =2 =2 =2 =2 =2 =2 aaaa- r . 5 1 r r . . . . 7 3 5.5 BB-- ct aaaa d C E 1 2 8.11 C ct . . . . . . . . . d f . 2 3 7.33 6.4 C E- ct =3 =3 =3 =3 =3 =3 =3 =3 r g . r 1 r BB D . === === === === === === === === *- *- *- *- *- *- *- *-
**specC, **pitch, and
spines have been stripped away (due to the
Key signature sensitivity is illustrated in the following example.
The input contains a "pitch-height key signature" --
where flats and sharps pertain to only a specific absolute pitch.
For example, Bb3 is preferred to A#3, although A#4 is preferred to Bb4.
Similarly, C#4 is preferred to Db4, although Db5 is preferred to C#5.
!! `kern' example #2 **semits *K[B3-C4#F4#A4#D5-] -2 10 1 6 13 *- !! `kern' example #2 **kern *K[B3-C4#F4#A4#D5-] B- a# c# f# dd- *-
x_option.awkis used by this program when the -x option is invoked.
**cents (2), cents (4), **degree (2), degree (4), **freq (2), freq (4), **fret (2), hint (4), **kern (2), mint (4), **MIDI (2), midi (4), **pitch (2), pitch (4), proof (4), **semits (2), semits (4), **solfg (2), solfg (4), **specC (2), specc (4), **Tonh (2), tonh (4)
**Tonh, inputs, kern ignores cents deviation. Hence C#6+80 is rendered as `ccc#' rather than the nearest pitch `ddd'.
**pitchis intended to signify the presence of a double sharp. Thus the
**pitchinput token `xyzC4' is correctly translated by kern as `yzc##'. Similarly, the
**pitchinput token `1yzC4' becomes `yzCCC4'. (The first numerical value is interpreted as the octave number and the trailing number 4 is interpreted as a non-pitch-related signifier.)