Skip to contents

Rather than calculate the full sign vector from the "modal color" hyperplane arrangement, sometimes it's advantageous to use a sign vector that reflects only the pairwise comparisons on a scale's steps. This function does that.

Usage

step_signvector(set, ineqmat = NULL, edo = 12, rounder = 10)

Arguments

set

Numeric vector of pitch-classes in the set

ineqmat

Specifies which hyperplane arrangement to consider. By default (or by explicitly entering "mct") it supplies the standard "Modal Color Theory" arrangements of getineqmat(), but can be set to "white," "roth", "pastel," or "rosy", giving the ineqmats of make_white_ineqmat(), make_roth_ineqmat(), make_pastel_ineqmat(), and make_rosy_ineqmat(). For other arrangements, the desired inequality matrix can be entered directly.

edo

Number of unit steps in an octave. Defaults to 12.

rounder

Numeric (expected integer), defaults to 10: number of decimal places to round to when testing for equality.

Value

A vectors of signs, -1, 0, and 1, corresponding to the step-related hyperplanes in the defined ineqmat.

Examples

step_signvector(sc(7, 35)) # Half the length of a full sign vector for heptachords:
#>  [1] -1 -1  0  0  1  1 -1  0  0 -1 -1  0  0 -1  0 -1  0  0 -1  0  0
signvector(sc(7, 35))
#>  [1] -1 -1  0  0  1  1 -1  0  0 -1 -1  0  0 -1  0 -1  0  0 -1  0  0  0  0  1 -1
#> [26]  0 -1 -1  0 -1 -1  1  0  0  1  0 -1 -1  0  0  0  0