Obtain an ordered sequence of the diatonic chords for a given scale, as triads or sevenths.

scale_chords(
  root = "c",
  scale = "major",
  type = c("triad", "seventh"),
  collapse = FALSE
)

Arguments

root

character, root note or starting position of scale.

scale

character, a valid named scale, referring to one of the existing scale_* functions.

type

character, type of chord, triad or seventh.

collapse

logical, collapse result into a single string ready for phrase construction.

Value

character

Examples

scale_chords("c", "major")
#> <Noteworthy string>
#>   Format: vectorized time
#>   Values: <ceg> <dfa> <egb> <fac'> <gbd'> <ac'e'> <bd'f'>
scale_chords("a", "minor")
#> <Noteworthy string>
#>   Format: vectorized time
#>   Values: <a,ce> <b,df> <ceg> <dfa> <egb> <fac'> <gbd'>
scale_chords("a", "harmonic minor")
#> <Noteworthy string>
#>   Format: vectorized time
#>   Values: <a,ce> <b,df> <ceg#> <dfa> <eg#b> <fac'> <g#bd'>
scale_chords("a", "melodic minor")
#> <Noteworthy string>
#>   Format: vectorized time
#>   Values: <a,ce> <b,df#> <ceg#> <df#a> <eg#b> <f#ac'> <g#bd'>
scale_chords("a", "jazz minor")
#> <Noteworthy string>
#>   Format: vectorized time
#>   Values: <a,ce> <b,df#> <ceg#> <df#a> <eg#b> <f#ac'> <g#bd'>
scale_chords("a", "hungarian minor")
#> <Noteworthy string>
#>   Format: vectorized time
#>   Values: <a,ce> <b,d#f> <ceg#> <d#fa> <eg#b> <fac'> <g#bd#'>

scale_chords("c", "major", "seventh", collapse = TRUE)
#> <Noteworthy string>
#>   Format: space-delimited time
#>   Values: <cegb> <dfac'> <egbd'> <fac'e'> <gbd'f'> <ac'e'g'> <bd'f'a'>
scale_chords("a", "minor", "seventh", collapse = TRUE)
#> <Noteworthy string>
#>   Format: space-delimited time
#>   Values: <a,ceg> <b,dfa> <cegb> <dfac'> <egbd'> <fac'e'> <gbd'f'>