simplify_scale {musicMCT}R Documentation

Best ways to regularize a scale

Description

Given an input scale, identify which adjacent colors represent good approximations of it, in a sense consistent with "Modal Color Theory," pp. 31-32.

Usage

simplify_scale(
  set,
  start_zero = TRUE,
  ineqmat = NULL,
  scales = NULL,
  signvector_list = NULL,
  adjlist = NULL,
  method = c("euclidean", "taxicab", "chebyshev", "hamming"),
  display_digits = 2,
  edo = 12,
  rounder = 10
)

best_simplification(set, ...)

Arguments

set

Numeric vector of pitch-classes in the set

start_zero

Boolean: should the result be transposed so that its pitch initial is zero? Defaults to TRUE.

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," "black", "gray", "roth", "pastel," or "rosy", giving the ineqmats of make_white_ineqmat(), make_black_ineqmat(), make_gray_ineqmat(), make_roth_ineqmat(), make_pastel_ineqmat(), and make_rosy_ineqmat(). For other arrangements, the desired inequality matrix can be entered directly.

scales

List of scales representing the faces of your hyperplane arrangement. Defaults to NULL in which case the function looks for representative_scales in the global environment.

signvector_list

A list of signvectors to use as the reference by which colornum assigns a value. Defaults to NULL and will attempt to use representative_signvectors, which needs to be downloaded and assigned separately from the package musicMCT.

adjlist

Adjacency list structured in the same way as color_adjacencies. Defaults to NULL in which case the function looks for color_adjacencies in the global environment.

method

What distance metric should be used? Defaults to "euclidean" (unlike most functions with a method parameter in musicMCT) but can be "taxicab", "chebyshev", or "hamming".

display_digits

Integer: how many digits to display when naming any non-integral interval sizes. Defaults to 2.

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.

...

Other arguments to be passed from best_simplification() to simplify_scale().

Details

Suppose that you've gathered data on how a particular instrument is tuned. Two intervals in its scale differ by about 12 cents: does it make sense to consider those intervals to be essentially the same, up to some combination of measurement error and the permissiveness of cognitive categories? simplify_scale() helps to answer such a question by considering whether eliding a precisely measured difference results in a significant simplification of the overall scale structure.

It accomplishes this by starting from two premises:

To answer this question, simplify_signvector needs access to data about the hyperplane arrangement in question. For the basic "Modal Color Theory" arrangements, this is the data in representative_scales.rds, representative_signvectors.rds, and color_adjacencies.rds. The function assumes that, if you don't specify other data, you have those three files loaded into your workspace. It can't function without them.

Value

A matrix with n+6 rows, where n is the number of notes in the scale. Each column represents a scale which is a potential simplification of the input set, together with details about that simplified scale. The first n entries of the column represent the pitches of the scale itself:

If display_digits is a value other than NULL, the function prints to console a suitably rounded representation of the data, while invisibly returning the unrounded information.

best_simplification() returns simply a numeric vector with the scale judged optimal by simplify_scale() (i.e. the first n entries of its first column, without all the other information).

Examples


# For this example to run, you need the necessary data files loaded.
# Let's see what happens if we try to simplify the 5-limit just diatonic:

simplify_scale(j(dia))

# So the best option is color number 942659, which is the "well-formed"
# structure of the familiar diatonic scale. The particular saturation of
# that meantone structure is very close to 1/5-comma meantone:

simplified_jdia <- best_simplification(j(dia))
fifth_comma_dia <- sim(sort((meantone_fifth(1/5)*(0:6))%%12))[,5]
vl_dist(simplified_jdia, fifth_comma_dia)


[Package musicMCT version 0.2.0 Index]