| point_on_flat | R Documentation |
Given a hyperplane arrangement (specified by ineqmat) and a subset
of those hyperplanes (specified numerically as the rows of ineqmat),
determine some point that lies on the intersection of those hyperplanes.
If the chosen hyperplanes do not all intersect in at least one point,
returns NAs and throws a warning. This function exists mostly for the
sake of calculations about a hyperplane arrangement itself, not for
musical applications: its results are often not very scale-like (e.g.,
they often fail optc_test()).
point_on_flat(rows, card, ineqmat = NULL, edo = 12, rounder = 10)
rows |
Integer vector: which rows of |
card |
Integer: the number of notes in your desired scale. |
ineqmat |
Specifies which hyperplane arrangement to consider. By default (or by
explicitly entering "mct") it supplies the standard "Modal Color Theory" arrangements
of |
edo |
Number of unit steps in an octave. Defaults to |
rounder |
Numeric (expected integer), defaults to |
Numeric vector of length card which lies on the specified
hyperplanes. If the intersection of the hyperplanes is empty,
throws a warning and returns a vector of NAs with length card.
match_flat() and populate_flat() are intended for more
concretely musical applications, returning a set on the chosen flat
which is similar to an input set.
# Works essentially like an inverse of whichsvzeroes():
test_set <- sc(5, 32)
whichsvzeroes(test_set)
generated_point <- point_on_flat(c(5, 8, 10), card=5)
whichsvzeroes(generated_point)
# But note that the given point might lie on any face of the flat:
signvector(test_set)
signvector(generated_point)
# Works for other hyperplane arrangements:
point_on_flat(c(2, 3, 6), card=3, ineqmat="roth")
point_on_flat(c(2, 4), card=4, ineqmat="black")
# Not all combinations of hyperplanes admit a solution:
try(point_on_flat(c(1, 2, 3), card=3, ineqmat="roth"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.