dyad | R Documentation |
Construct a dyad given one note, an interval, and a direction.
dyad(
notes,
interval,
reverse = FALSE,
octaves = c("tick", "integer"),
accidentals = c("flat", "sharp"),
key = NULL
)
notes |
character, a noteworthy string, single notes only, no chords.
Number of timesteps must equal the length of |
interval |
integer or character vector; semitones or interval ID, respectively. See details. |
reverse |
logical, reverse the transposition direction. Useful when
|
octaves , accidentals , key |
See |
The interval
may be specified by semitones of by common interval name
or abbreviation. See examples.
For a complete list of valid interval names and abbreviations see
mainIntervals()
.
key
enforces the use of sharps or flats. This function is based on
transpose()
.
notes
and interval
may be vectors, but must be equal length.
Recycling occurs only if one argument is scalar.
character
mainIntervals()
dyad("a", 4)
x <- c("minor third", "m3", "augmented second", "A2")
dyad("a", x)
dyad("c'", x, reverse = TRUE)
x <- c("M3", "m3", "m3", "M3", "M3", "m3", "m3")
dyad(letters[c(3:7, 1, 2)], x)
x <- c("P1", "m3", "M3", "P4", "P5", "P8", "M9")
dyad("c", x)
dyad("c", x, reverse = TRUE)
dyad("d e", "m3")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.