50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

musicMCT (version 0.1.2)

comparesignvecs: Do two sign vectors represent adjacent colors?

Description

As "Modal Color Theory" (pp. 31ff.) describes, it can be useful to know whether two colors are adjacent to each other in the MCT space. That is, can one scalar color be continuously modified until it becomes the other, without crossing through any third color? For instance, the 5-limit just diatonic scale is a two-dimensional color that is adjacent to the 1-d line of meantone diatonic scales. This means, in some sense, that the meantone structure is a good approximation of the 5-limit just structure.

Usage

comparesignvecs(signvecX, signvecY)

Value

Integer: 0 if the sign vectors represent the same color, 1 if they are adjacent, and -1 if they are neither adjacent nor identical.

Arguments

signvecX, signvecY

A pair of sign vectors to be compared. Note that these must be sign vectors, not scales themselves.

Examples

Run this code
meantone_major_sv <- signvector(c(0, 2, 4, 5, 7, 9, 11))
meantone_dorian_sv <- signvector(c(0, 2, 3, 5, 7, 9, 10))
just_major <- j(dia)
just_dorian <- sim(just_major)[,2] 
just_major_sv <- signvector(just_major)
just_dorian_sv <- signvector(just_dorian)

comparesignvecs(meantone_major_sv, just_major_sv)
comparesignvecs(meantone_dorian_sv, just_major_sv)
comparesignvecs(meantone_dorian_sv, just_dorian_sv)

Run the code above in your browser using DataLab