roughness_hutch: Spectral roughness (Hutchinson & Knopoff)

Description Usage Arguments Value References

View source: R/hutch.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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/dycon documentation built on June 28, 2021, 4:46 p.m.