HarmonicMetric:
Filter:
Classes (extension) | DissonanceLib

HarmonicMetric
ExtensionExtension

Abstracts different harmonic metrics.
Location: NOT INSTALLED!

Switches between harmonic measures in SequenceableCollection: -rationalize and in classes such as Dissonance and PitchSet.

Description

This class is used in Dissonance and PitchSet in order to classify and analyze the generated intervals according to different harmonic metrics. The ones included are the most useful (Tenney's Harmonic Distance, Barlow's Harmonicity and Euler's Gradus Suavitatis) but others can be added to the class. See number extras for more info on the definition of the metrics.

Class Methods

.new

Arguments:

metric - A string. Can be "harmonicity", "harmonicDistance" or "gradusSuavitatis". Default is "harmonicity".

Inherited class methods

Instance Methods

.type

Instance Variable. The current type of harmonic metric. Can be changed. (Used to be a Symbol, but as changed to String because of errors in recent SC versions).

.value

Give the values of the harmonic metric for an array of [p, q] ratios. ratios - A collection of ratios or a single [p,q] ratio.

.mostHarmonic

Returns the most harmonic ratio from the collection according to the current type of metric. ratios - A collection of ratios.

.leastHarmonic

Same as above but for the least harmonic of a ratio collection. ratios - A collection of ratios.

.order

Order the collection of ratios according to the current harmonic metric type.

Inherited instance methods