freq_ratio | R Documentation |
Obtain frequency ratios data frame.
freq_ratio(x, ...)
x |
noteworthy or music object, or a numeric vector or list of numeric vectors for frequencies. |
... |
additional arguments: |
This generic function returns a data frame of frequency ratios from a vector or list of frequencies, a noteworthy object, or a music object. For frequency inputs, a list can be used to represent multiple timesteps. Octave numbering and accidentals are inferred from noteworthy and music objects, but can be specified for frequency. See examples.
By default ratios are returned for all combinations of intervals in each
chord (ratios = "all"
). ratios = "root"
filters the result to only
include chord ratios with respect to the root note of each chord.
ratios = "range"
filters to only the chord ratio between the root and
highest note.
a tibble data frame
x <- as_music("c4 e_ g ce_g")
(fr <- freq_ratio(x))
x <- music_notes(x)
identical(fr, freq_ratio(x))
x <- chord_freq(x)
identical(fr, freq_ratio(x))
freq_ratio(x, accidentals = "sharp")
freq_ratio(x, ratios = "root")
freq_ratio(x, ratios = "range")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.