View source: R/expand-harmonics.R
expand_harmonics | R Documentation |
Expands each tone in an object into its implied harmonics.
expand_harmonics(
x,
num_harmonics = 11L,
roll_off = 1,
digits = 6,
label_harmonics = FALSE,
coherent = FALSE
)
## S3 method for class 'sparse_fr_spectrum'
expand_harmonics(
x,
num_harmonics = 11L,
roll_off = 1,
digits = 6,
label_harmonics = FALSE,
coherent = FALSE
)
## S3 method for class 'sparse_pi_spectrum'
expand_harmonics(
x,
num_harmonics = 11L,
roll_off = 1,
digits = 6,
label_harmonics = FALSE,
coherent = FALSE
)
## S3 method for class 'pi_chord'
expand_harmonics(
x,
num_harmonics = 11L,
roll_off = 1,
digits = 6,
label_harmonics = FALSE,
coherent = FALSE
)
x |
Object whose harmonics should be expanded.
Should be of class
|
num_harmonics |
(Integerish scalar) Number of harmonics (including the fundamental) to which each tone should be expanded. |
roll_off |
(Numeric scalar) Parametrises the amount of amplitude roll-off in the harmonics, with greater values corresponding to higher roll-off. |
digits |
Number of digits to which each partial's MIDI pitch should be rounded. |
label_harmonics |
If TRUE, then the harmonics in the resulting spectrum are labelled with their harmonic numbers. |
coherent |
Whether the amplitudes from different spectral components should be combined
assuming coherent summation, where the amplitudes simply add together
(default is |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.