A tutorial on how to encode tuplets in **kern data.

Tuplets

Tuplets are no different from regular rhythmic values since they describe how many notes of that duration sum together to create a whole-note duration. Triplet eighth notes are represented with the number 12 because twelve of them equal a whole-note duration. quintuplet sixteenth notes are represented as 20 since 20 of the equal a whole-note duration.

Extended Rhythm representation

Note durations that do not divide the duration of a whole note into an integer number of equal pieces (when also accounting for augmentation dots), must be encoded in an extended **recip representation. This system is understood by VHV and Humdrum Extras, but not in the classical Humdrum Toolkit (see rscale for using extended rhythms with the Humdrum Toolkit).

Example extended rhythms include triplet whole notes. 3/2 of a triplet whole note fill the duration of a regular whole note, so it is represented by the string 3%2. Another way of conceptualizing this is to flip the numbers in the rhythm string, noting that a triplet whole note is 2/3rds of a whole note:

Notice the 1%2 rhythm in the last measure. This represent a double whole note, since 1/2 of the double whole note is equivalent to a whole note. 0 is a special code equivalent to 1%2, 00 is equivalent to 1%4 (a long) and 000 is equivalent to 1%8 (a maxima). It is probably best to use the zero-system for breves, maximas and longs, reserving extended rhythms for readability and use %-based descriptions more complicated rhythmic cases.