# The Neo-Riemannian P, L, and R transformations on triads are all Q-relations:
major_triad <- c(0, 4, 7)
clampitt_q(major_triad)
# A well-formed scale like the diatonic has two Q-relations given by its signature transformations:
major_scale <- c(0, 2, 4, 5, 7, 9, 11)
clampitt_q(major_scale)
# A non-singular pairwise well-formed scale also has Q-relations:
clampitt_q(j(dia))
# Set-class 7-31 is pairwise well-formed:
clampitt_q(sc(7, 31))
# It also has two additional Q*-related sets:
clampitt_q(sc(7, 31), method="hamming")
# Most other types of scales have at most one Q-relation:
dominant_seventh <- c(0, 4, 7, 10)
clampitt_q(dominant_seventh)
# The order of "sets" may not match the order of "vls":
clampitt_q(c(0, 1, 4, 7))
Run the code above in your browser using DataLab