roughness_seth: Spectral roughness (Sethares)

Description Usage Arguments Value Note References

View source: R/sethares.R

Description

Gets the roughness of a sonority according to the model of Sethares (1993). By default, the algorithm is modified according to \insertCiteSethares2005;textualdycon and \insertCiteWeisser2013;textualdycon: roughness is proportional to the minimum amplitude of each pair of partials, not the product of their amplitudes. This behaviour can be disabled by setting min_amplitude = FALSE.

Usage

1
2
3
4
5
6
7
roughness_seth(x, min_amplitude = TRUE, ...)

## Default S3 method:
roughness_seth(x, min_amplitude = TRUE, ...)

## S3 method for class 'sparse_fr_spectrum'
roughness_seth(x, min_amplitude = TRUE, ...)

Arguments

x

Object to analyse, which is coerced to the class sparse_fr_spectrum.

  • Numeric vectors will be treated as vectors of MIDI note numbers, and expanded into their implied harmonics.

  • Two-element lists will be treated as finalised spectra, with the first element being a numeric vector of frequencies, and the second element being a numeric vector of amplitudes.

min_amplitude

See dyad_roughness_seth.

...

Further arguments to pass to sparse_fr_spectrum.

Value

Estimated roughness, as a numeric scalar.

Note

\insertCite

Sethares2005;textualdycon suggests using loudnesses instead of amplitudes. However, he acknowledges that loudness is difficult to calculate for arbitrary timbres. Furthermore, if we replace amplitude with roughness, we lose the original model's invariance to multiplicative scaling of the original signal. In this implementation, we therefore stay with amplitude, consistent with \insertCiteSethares1993;textualdycon.

References

\insertAllCited
pmcharrison/dycon documentation built on June 28, 2021, 4:46 p.m.