roughness_hutch: Spectral roughness (Hutchinson & Knopoff)

View source: R/model-dycon.R

roughness_hutchR Documentation

Spectral roughness (Hutchinson & Knopoff)

Description

Gets the roughness of a sonority according to the model of \insertCiteHutchinson1978;textualincon.

Usage

roughness_hutch(
  x,
  cbw_cut_off = 1.2,
  a = 0.25,
  b = 2,
  dissonance_function = hutch_dissonance_function,
  ...
)

## Default S3 method:
roughness_hutch(
  x,
  cbw_cut_off = 1.2,
  a = 0.25,
  b = 2,
  dissonance_function = hutch_dissonance_function,
  ...
)

## S3 method for class 'sparse_fr_spectrum'
roughness_hutch(
  x,
  cbw_cut_off = 1.2,
  a = 0.25,
  b = 2,
  dissonance_function = hutch_dissonance_function,
  ...
)

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.

cbw_cut_off

Parameter passed to hutch_g().

a

Parameter passed to hutch_g().

b

Parameter passed to hutch_g().

dissonance_function

Function for computing dissonance contribution as a function of critical bandwidth distance, defaulting to hutch_dissonance_function. Custom functions may be specified here as long as they use the same parameter list as the original function.

...

Further arguments to pass to sparse_fr_spectrum.

Value

Numeric scalar, identifying the roughness of the spectrum.

References

\insertAllCited

pmcharrison/incon documentation built on Feb. 12, 2024, 3:18 a.m.