CBRModel class

Base class for implementing dissonance models based on summed critical-band roughness.

These dissonance models sum the roughness between all partials according to the models proposed by Plomp & Levelt, Sethares, and others.

Base classes

class DissonanceModel
Base class for implementing dissonance models.

Derived classes

class SetharesModel
Implementation of Sethares' model from "Tuning, Timbre, Spectrum, Scale" (2005).
class VassilakisModel
Implementation of Vassilakis' model from "Perceptual and Physical Properties of Amplitude Fluctuation and their Musical Significance" (2001).

Constructors, destructors, conversion operators

CBRModel ()
Creates a CBRModel object.
~CBRModel () virtual
Destructor.

Public functions

auto calculateDissonance (const OwnedArray<OvertoneDistribution>& distributions, bool sumPartialDissonances) -> float override
Calculates the dissonance of a set of overtone distributions with corresponding frequency and amplitude values.
auto calculateRoughness (float firstFreq, float firstAmp, float secondFreq, float secondAmp) -> float pure virtual
Calculates the roughness between two partials.

Function documentation

float CBRModel::calculateDissonance (const OwnedArray<OvertoneDistribution>& distributions, bool sumPartialDissonances) override

Calculates the dissonance of a set of overtone distributions with corresponding frequency and amplitude values.

This method makes repeated calls to calculateRoughness for every possible pair of partials (including fundamentals) in a set of overtone distributions. The outputs of the calls to calculateRoughness are summed to satisfy:

$$D = \sum_{i=1}^{n}\sum_{j=1}^{n} d(f_i, f_j, a_i, a_j)$$

float CBRModel::calculateRoughness (float firstFreq, float firstAmp, float secondFreq, float secondAmp) pure virtual

Calculates the roughness between two partials.