These functions outputs jazz/pop-style chord symbols.
There is no universal standard for how to notate such chord symbols, in particular in plain text.
The chord()
function outputs a chord symbol representation roughly consistent with "standard practices."
Arguments
- x
An
atomic
vector.The
x
argument can be any (atomic) vectors- Key
The diatonic key used by the parser, deparser, and transposer.
Defaults to
NULL
, which is interpreted as C major.Must be a
diatonicSet
or something coercable todiatonicSet
; must be either length1
orlength(x)
.- transposeArgs
An optional list of arguments passed to a
transpose()
call.Defaults to an empty
list()
.Must be a
list
of named arguments totranspose()
.- parseArgs
An optional list of arguments to the chord parser.
Defaults to an empty
list()
.Must be a
list
of named arguments to the chord parser.- inPlace
Should non-chord information be retained in the output string.
Defaults to
FALSE
.Must be a singleton
logical
value: an on/off switch.
Details
For more rigorous, consistent work, we recommend the Harte notation,
which is the standard used by MIREX, etc.
The harte()
function will output standard Harte symbols.
Examples
romanNumerals <- c('2I', '2IV7', '1V', '2vi', '2-VI', '2iio7', '2Vb9')
chord(romanNumerals)
#> [1] "C" "Fmaj7" "G" "Amin" "Ab" "Ddim7" "Gb7/Fb"
chord(romanNumerals, Key = 'A:')
#> [1] "A" "Dmaj7" "E" "F#min" "F" "Bdim7" "Eb7/Db"
if (FALSE) {
B075 <- readHumdrum(humdrumRroot, "HumdrumData/BeethovenVariations/B075_00_05_a.krn")
with(B075[[ , 2]], chord(Token))
}