mds_first_order <- cmdscale((first_order-1))
mds_first_order <- as_tibble(mds_first_order) %>%
cbind(chord_properties)
mds_first_order <- mds_first_order %>%
mutate(key = forcats::fct_relevel(key,"C","F","Bb","Eb","Ab","Db","Gb","B","E","A","D","G")) %>%
mutate(bold_me = case_when(key == "C" ~ 1,
key != "C" ~ 0)) %>%
filter(type == "key" | chord_names %in% c("C∆7",
"Dm7",
"G7",
"Bm7(b5)") == TRUE) %>%
mutate(V1 = V1*-1,
V2 = V2*-1) %>%
mutate(line_V1 = case_when(chord_names %in% c("C∆7",
"Dm7",
"G7",
"Bm7(b5)",
"C note",
"D note",
"E note",
"F note",
"G note",
"A note",
"B note") ==TRUE ~ V1),
line_V2 = case_when(chord_names %in% c("C∆7",
"Dm7",
"G7",
"Bm7(b5)",
"C note",
"D note",
"E note",
"F note",
"G note",
"A note",
"B note") ==TRUE ~ V2))
Cmajor7 <- ggplot(mds_first_order, aes(V1, V2,
label = chord_names))+
geom_point(color="black")+
geom_text_repel(size=8, max.overlaps = 500)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "C note")$V1),
yend = filter(mds_first_order,chord_names == "C note")$V2)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "E note")$V1),
yend = filter(mds_first_order,chord_names == "E note")$V2)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "G note")$V1),
yend = filter(mds_first_order,chord_names == "G note")$V2)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "B note")$V1),
yend = filter(mds_first_order,chord_names == "B note")$V2)+
geom_segment(
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "D note")$V1),
yend = filter(mds_first_order,chord_names == "D note")$V2,
linetype = "dotted")+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
color = "red",
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "C∆7")$V1),
yend = filter(mds_first_order,chord_names == "C∆7")$V2)+
geom_curve(arrow = arrow(length = unit(0.5, "cm")),
color = "white",
curvature = 1,
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "C∆7")$V1/2),
yend = filter(mds_first_order,chord_names == "C∆7")$V2/2)+
theme_classic()+
ggtitle("C∆7")+
theme(plot.title = element_text(size=40))
#Cmajor7
Dminor7 <- ggplot(mds_first_order, aes(V1, V2,
label = chord_names))+
geom_point(color="black")+
geom_text_repel(size=8, max.overlaps = 500)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "D note")$V1),
yend = filter(mds_first_order,chord_names == "D note")$V2)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "F note")$V1),
yend = filter(mds_first_order,chord_names == "F note")$V2)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "A note")$V1),
yend = filter(mds_first_order,chord_names == "A note")$V2)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "C note")$V1),
yend = filter(mds_first_order,chord_names == "C note")$V2)+
geom_segment(
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "D note")$V1),
yend = filter(mds_first_order,chord_names == "D note")$V2,
linetype = "dotted")+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
color = "red",
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "Dm7")$V1),
yend = filter(mds_first_order,chord_names == "Dm7")$V2)+
geom_curve(arrow = arrow(length = unit(0.5, "cm")),
color = "white",
curvature = 1,
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "Dm7")$V1/2),
yend = filter(mds_first_order,chord_names == "Dm7")$V2/2)+
theme_classic()+
ggtitle("Dm7")+
theme(plot.title = element_text(size=40))
#Dminor7
G7 <- ggplot(mds_first_order, aes(V1, V2,
label = chord_names))+
geom_point(color="black")+
geom_text_repel(size=8, max.overlaps = 500)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "G note")$V1),
yend = filter(mds_first_order,chord_names == "G note")$V2)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "B note")$V1),
yend = filter(mds_first_order,chord_names == "B note")$V2)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "D note")$V1),
yend = filter(mds_first_order,chord_names == "D note")$V2)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "F note")$V1),
yend = filter(mds_first_order,chord_names == "F note")$V2)+
geom_segment(
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "D note")$V1),
yend = filter(mds_first_order,chord_names == "D note")$V2,
linetype = "dotted")+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
color = "red",
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "G7")$V1),
yend = filter(mds_first_order,chord_names == "G7")$V2)+
geom_curve(arrow = arrow(length = unit(0.5, "cm")),
color = "red",
curvature = 1,
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "G7")$V1/2),
yend = filter(mds_first_order,chord_names == "G7")$V2/2)+
theme_classic()+
ggtitle("G7")+
theme(plot.title = element_text(size=40))
#G7
Bm7b5 <- ggplot(mds_first_order, aes(V1, V2,
label = chord_names))+
geom_point(color="black")+
geom_text_repel(size=8, max.overlaps = 500)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "B note")$V1),
yend = filter(mds_first_order,chord_names == "B note")$V2)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "D note")$V1),
yend = filter(mds_first_order,chord_names == "D note")$V2)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "F note")$V1),
yend = filter(mds_first_order,chord_names == "F note")$V2)+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "A note")$V1),
yend = filter(mds_first_order,chord_names == "A note")$V2)+
geom_segment(
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "D note")$V1),
yend = filter(mds_first_order,chord_names == "D note")$V2,
linetype = "dotted")+
geom_segment(arrow = arrow(length = unit(0.5, "cm")),
color = "red",
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "Bm7(b5)")$V1),
yend = filter(mds_first_order,chord_names == "Bm7(b5)")$V2)+
geom_curve(arrow = arrow(length = unit(0.5, "cm")),
color = "red",
curvature = -1,
aes(x=0,
y=0,
xend = filter(mds_first_order,chord_names == "Bm7(b5)")$V1/2),
yend = filter(mds_first_order,chord_names == "Bm7(b5)")$V2/2)+
theme_classic()+
ggtitle("Bm7(b5)")+
theme(plot.title = element_text(size=40))
#Bm7b5
library(patchwork)
(Cmajor7 + Dminor7) / (G7 +Bm7b5)