TonalUniverse:
Filter:
superharmony/Classes (extension) | Harmony | Chords | Tonality

TonalUniverse
ExtensionExtension

Set of tonalities and relations between them

Description

Defines a TonalUniverse that consists in an set of Tonalities, functions and relations among them. It can be used to analyze a chord relation to any major and minor tonality.

Part of superharmony, a library with utilities for tonal analysis of chords.

Class Methods

.new

Creates a tonality universe that contains all the mayor and minor tonalities.

Instance Methods

Accessing

.getHarmonyList

Parses a string with tonality and harmonies information in roman notation and, returns a list harmonies/chords with those tonal functions.

Arguments:

String with current tonality and harmonies in roman numerals separeted by space. Each line represents a tonality, the base and type are defined at the begining. After the colon the Roman numbers are added separated by space, it can have seventh or secondary functions.

Returns:

List of Harmony with those tonal functions.

.degreeSimple

Returns the roman degree of the input Harmony with respect to the passed tonality

Arguments:

Harmony to check.

Tonality Tonality as reference.

Returns:

Integer value with degree of note (1-7) if harmony is part of the Tonality, 0 if its not part.

.degreeSimpleCurrent

Returns the roman degree of the input Harmony with respect to current selected tonality in the tonality universe.

Arguments:

Harmony to check.

Returns:

Integer value with degree of note (1-7) if harmony is part of the Tonality, 0 if its not part.

.degreeSecondary

Finds the degrees to which the input harmony has a secondary function in the passed tonality, for example a secondary dominant or any other combination like V/II III/VI, etc.

Arguments:

Harmony to check.

Tonality Tonality as reference.

Returns:

TonalCoordinate with the information for the secondary function of the harmony with respect to the tonality.

.getVectorPercentages

Finds the percentage, value between 0 and 1 of the notes that belong to each tonality 12 mayor and 12 minor.

Arguments:

List of notes, interger values

Returns:

Array of 24 values with percentage of notes that belong to each tonality, first 12 values are 12 mayor tonalities, next 12 values are the 12 minor tonalities starting with C.

Authors

Cristian Banuelos, 2022.