Construct a dyad given one note, an interval, and a direction.
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.
logical, reverse the transposition direction. Useful when
interval
is character.
See transpose()
.
character
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.
dyad("a", 4)
#> <Noteworthy string>
#> Format: space-delimited time
#> Values: <ad_'>
x <- c("minor third", "m3", "augmented second", "A2")
dyad("a", x)
#> <Noteworthy string>
#> Format: space-delimited time
#> Values: <ac'> <ac'> <ac'> <ac'>
dyad("c'", x, reverse = TRUE)
#> <Noteworthy string>
#> Format: space-delimited time
#> Values: <ac'> <ac'> <ac'> <ac'>
x <- c("M3", "m3", "m3", "M3", "M3", "m3", "m3")
dyad(letters[c(3:7, 1, 2)], x)
#> <Noteworthy string>
#> Format: vectorized time
#> Values: <ce> <df> <eg> <fa> <gb> <ac'> <bd'>
x <- c("P1", "m3", "M3", "P4", "P5", "P8", "M9")
dyad("c", x)
#> <Noteworthy string>
#> Format: space-delimited time
#> Values: c <ce_> <ce> <cf> <cg> <cc'> <cd'>
dyad("c", x, reverse = TRUE)
#> <Noteworthy string>
#> Format: space-delimited time
#> Values: c <a,c> <a_,c> <g,c> <f,c> <c,c> <b_,,c>
dyad("d e", "m3")
#> <Noteworthy string>
#> Format: space-delimited time
#> Values: <df> <eg>