knitr::opts_chunk$set(
  collapse = TRUE,
  message = FALSE,
  comment = "#>"
)
library(magrittr)
library(pichor)

Chord types:

construct_chord_major(root_tone = "C")
construct_chord_minor(root_tone = "B")
construct_chord_major_7(root_tone = "C")
construct_chord_dominant_7(root_tone = "G")
construct_chord_raw(root_tone = "C", 
                    distances_rel = c(3, 4), 
                    chord_type = "minor", 
                    label_suffix = "m")

Any of these can be dealt with, e.g. getting keys for root form, an inversion and both plotted:

Cmaj7 <- construct_chord_major_7(root_tone = "C")
Cmaj7 %>% get_keys_inversion(inversion = 2L)
keys_chords %>% 
  highlight_chord(Cmaj7) %>% 
  ggpiano()
keys_chords %>% 
  highlight_chord(Cmaj7, inversion = 1L) %>% 
  ggpiano()
keys_chords %>% 
  highlight_chord(Cmaj7, inversion = 2L) %>% 
  ggpiano()


mikldk/pichor documentation built on Jan. 28, 2023, 5 a.m.