# CBRModel class

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

### Contents

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

## 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:

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

Calculates the roughness between two partials.