Learn R Programming

tabr (version 0.5.1)

scale_chords: Diatonic chords

Description

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

Usage

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

Value

character

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.

Examples

Run this code
scale_chords("c", "major")
scale_chords("a", "minor")
scale_chords("a", "harmonic minor")
scale_chords("a", "melodic minor")
scale_chords("a", "jazz minor")
scale_chords("a", "hungarian minor")

scale_chords("c", "major", "seventh", collapse = TRUE)
scale_chords("a", "minor", "seventh", collapse = TRUE)

Run the code above in your browser using DataLab