combine_sparse_spectra: Combine sparse spectra

View source: R/sparse-spectrum.R

combine_sparse_spectraR Documentation

Combine sparse spectra

Description

This function combines a series of sparse spectra into one spectrum assuming incoherent amplitude summation. This involves a rounding process, by which the MIDI pitch(-class) of each partial is rounded to a specified number of digits.

Usage

combine_sparse_spectra(..., digits = 6, coherent = FALSE)

Arguments

...

Sparse spectra to combine (see sparse_pi_spectrum and sparse_pc_spectrum).

digits

(Integerish scalar) The MIDI pitch(-class) of each partial will be rounded to this number of digits.

coherent

Whether the amplitudes from different spectral components should be combined assuming coherent summation, where the amplitudes simply add together (default is FALSE). Otherwise incoherent summation is used, where the amplitudes are squared, added, then square rooted.

Value

A sparse spectrum object.


pmcharrison/hrep documentation built on Feb. 18, 2024, 2:33 a.m.