View source: R/realize_stepword.R
| realize_stepword | R Documentation |
Where asword() takes you from a scale to a ranked list of its step sizes,
realize_stepword does the opposite: given a list of ranked step sizes,
it defines a scale with those steps. It does not attempt to define a scale
that exists in 12-tone equal temperament or another mod k universe, though
the result will have integral values in some mod k setting. If you
want that information, set reconvert to FALSE.
realize_stepword(stepword, edo = 12, reconvert = TRUE)
stepword |
A numeric vector (intended to be nonnegative integers) of ranked step sizes; should be the same length as desired output set. |
edo |
Number of unit steps in an octave. Defaults to |
reconvert |
Boolean. Should the result be expressed measured in terms of semitones (or a different mod k step if edo is not set to 12)? |
Numeric vector of same length as set, if reconvert is TRUE. If
reconvert is FALSE, returns a list with two elements. The first
element (set) expresses the defined set as integer values in some edo.
The second element (edo) tells you which edo (mod k universe) the set
is defined in.
dim7 <- realize_stepword(c(1, 1, 1, 1))
four_on_the_floor <- realize_stepword(c(1, 1, 1, 1), edo=16)
my_luggage <- realize_stepword(c(1, 2, 3, 4, 5))
my_luggage_in_15edo <- realize_stepword(c(1, 2, 3, 4, 5), reconvert=FALSE)
dim7
four_on_the_floor
my_luggage
my_luggage_in_15edo
pwf_scale <- realize_stepword(c(3, 2, 1, 3, 2, 3, 1))
asword(pwf_scale)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.