| emb | R Documentation |
David Lewin's EMB and COV functions: see Lewin, Generalized Musical Intervals and Transformations
(New Haven, CT: Yale University Press, 1987), 105-120. For EMB, given a group ("CANON") of transformations
which are considered to preserve a set's type, find the number of instances of that type in a larger
set (scale). Lewin characterizes this generally, but emb() only offers T_n and T_n / T_nI
transformation groups as available canonical groups. Conversely, Lewin's COV function asks how
many instances of a scale type include subset: this is implemented as cover() (not cov()!).
emb(subset, scale, canon = c("tni", "tn"), edo = 12, rounder = 10)
cover(subset, scale, canon = c("tni", "tn"), edo = 12, rounder = 10)
subset |
Numeric vector of pitch-classes in any representative of the subset type (Lewin's X) |
scale |
Numeric vector of pitch-classes in the larger set to embed into (Lewin's Y) |
canon |
What transformations should be considered equivalent? Defaults to "tni" (using standard set classes) but can be "tn" (using transposition classes) |
edo |
Number of unit steps in an octave. Defaults to |
rounder |
Numeric (expected integer), defaults to |
Integer: count of subset or scale types satisfying the desired relation.
emb(c(0, 4, 7), sc(7, 35))
emb(c(0, 4, 7), sc(7, 35), canon="tn")
# Works for continuous pc-space too:
emb(j(1, 3, 5), j(dia))
emb(j(1, 2, 3, 5, 6), j(dia))
emb(j(1, 2, 4, 5, 6), j(dia), canon="tn")
emb(c(0, 4, 7), c(0, 1, 3, 7))
emb(c(0, 4, 7), c(0, 1, 3, 7), canon="tn")
emb(c(0, 4), c(0, 4, 8))
cover(c(0, 4), c(0, 4, 8))
harmonic_minor <- c(0, 2, 3, 5, 7, 8, 11)
cover(c(0, 4, 8), harmonic_minor)
cover(c(0, 4, 8), harmonic_minor, canon="tn")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.