z {musicMCT} | R Documentation |
Frequency ratios to logarithmic pitch intervals (e.g. semitones)
Description
Simple convenience function for converting frequency ratios to
semitones. Useful to have in addition to j()
because j()
is only
defined for specific common values. Defaults to 12-tone equal temperament
but edo
parameter allows other units.
Usage
z(..., edo = 12)
Arguments
... |
One or more numerics values which represent frequency ratios. |
edo |
Number of unit steps in an octave. Defaults to |
Details
The name z()
doesn't make a lot of sense but has the virtue of being
a letter that isn't otherwise very common. r
(for ratio) and q
(for
the rationals) were both avoided because they're already used for other
functions.
Value
Numeric vector representing the input ratios converted to
edo
unit steps per octave
See Also
j()
is a more convenient input method for the most common frequency
ratios.
Examples
z(81/80) == j(synt)
mod_jdia <- z(1, 10/9, 5/4, 4/3, 3/2, 5/3, 15/8)
minimize_vl(j(dia), mod_jdia)
z(1, 5/4, 3/2, edo=53)
[Package musicMCT version 0.2.0 Index]