smooth_pc_spectrum: Smooth pitch-class spectrum

View source: R/smooth-pc-spectrum.R

smooth_pc_spectrumR Documentation

Smooth pitch-class spectrum

Description

Creates an object of class smooth_pc_spectrum, describing a smooth pitch-class spectrum. A smooth pitch-class spectrum describes perceptual weight along a continuous pitch class scale. The representation incorporates smoothing to account for imprecisions in pitch perception.

Usage

smooth_pc_spectrum(
  x,
  ...,
  sigma = 6.83,
  num_harmonics = 11L,
  roll_off = 1,
  coherent = FALSE
)

## Default S3 method:
smooth_pc_spectrum(
  x,
  ...,
  sigma = 6.83,
  num_harmonics = 11L,
  roll_off = 1,
  coherent = FALSE
)

## S3 method for class 'sparse_pc_spectrum'
smooth_pc_spectrum(x, ..., sigma = 6.83, coherent = FALSE)

Arguments

x

Object to convert. By default sparse_pc_spectrum is called first to convert the object to a sparse pitch-class spectrum.

...

Provided for S3 method consistency.

sigma

(Numeric scalar) Standard deviation of the Gaussian distribution used to simulate perceptual blurring. Defaults to 6.83 cents, after \insertCiteMilne2016;textualhrep.

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.

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.

Details

This representation is created by expressing the sonority as a sparse pitch-class spectrum (see sparse_pc_spectrum) and convolving the result with a Gaussian distribution with standard deviation sigma.

References

\insertAllCited

See Also

This representation was inspired by milne_pc_spectrum, which embodies similar ideas with a slightly different implementation. See smooth_pi_spectrum for an equivalent representation in the pitch domain.


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