pc_harmonicity: Pitch-class harmonicity

Description Usage Arguments Value Note References Examples

Description

Gets the pitch-class harmonicity of an input sonority, after \insertCiteHarrison2018;textualhar18 and \insertCiteMilne2013;textualhar18.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
pc_harmonicity(x, method = "kl", num_harmonics = 12, rho = 0.75,
  sigma = 6.83, ...)

## Default S3 method:
pc_harmonicity(x, method = "kl", num_harmonics = 12,
  rho = 0.75, sigma = 6.83, array_dim = 1200, ...)

## S3 method for class 'pc_set'
pc_harmonicity(x, method = "kl", num_harmonics = 12,
  rho = 0.75, sigma = 6.83, array_dim = 1200, ...)

## S3 method for class 'milne_pc_spectrum'
pc_harmonicity(x, method = "kl",
  num_harmonics = 12, rho = 0.75, sigma = 6.83, ...)

Arguments

x

Object to analyse.

method

(Character scalar) Method to use.

  • "kl" (default) delivers the Kullback-Leibler method of \insertCiteHarrison2018;textualhar18.

  • "peak" delivers the peak-value method of \insertCiteMilne2013;textualhar18.

num_harmonics

(Integerish scalar) Number of harmonics to use when expanding tones into their implied harmonics, and when defining the harmonic template (including the fundamental frequency). Defaults to 12, after \insertCiteMilne2016;textualhar18.

rho

(Numeric scalar) Roll-off parameter for harmonic expansion. Defaults to 0.75, after \insertCiteMilne2016;textualhar18.

sigma

(Numeric scalar) Standard deviation of the Gaussian smoothing distribution (cents). Defaults to 6.83, after \insertCiteMilne2016;textualhar18.

...

Arguments passed to specific methods.

array_dim

(Integerish scalar) Dimensionality of the pitch-class spectrum array. Defaults to 1200, after \insertCiteMilne2016;textualhar18.

Value

Pitch-class harmonicity, as a numeric scalar.

Note

This algorithm makes use of milne_pc_spectrum() as defined in the hrep package.

References

\insertAllCited

Examples

1
2
3
pc_harmonicity(c(0, 4, 7))
pc_harmonicity(c(0, 3, 7))
pc_harmonicity(c(0, 3, 6))

pmcharrison/har18 documentation built on May 25, 2019, 4:03 a.m.