Defines a chord as an array of numbers toghether with its harmonic content, including its chord type, base and inversion.
Part of superharmony, a library with utilities for tonal analysis of chords.
Creates a new Harmony instance, it takes an array of integer numbers. Can be called with the shorthand notation
Creates a four voice harmony instance from the fundamental note and chord type from the list in ChordsDefinition where you can select triads, sevenths and ninth chords among others. For example
Fundamental note of the chord as an integer number. | |
Type of chord, see ChordsDefinition for available types. |
Checks if two chords have the same chord and type, regardless of number of voices and order or octave.
Fundamental interger value of a chord.
Fundamental string value of a chord.
String value of the harmony type
Numerical value of the inversion of the chord, CM in root value would be [0,4,7] would have value 0, first inversion [4,7,12] would have value 1, and so on.
String value of the inversion of the chord, CM in root value would be [0,4,7,11] would have value "7" as a seventh chord in root position, first inversion [4,7,12] would have value "6,5". Other inversions would have "6,4", "4,3", "2". This method works for triads and seventh chords.
Array with the sorted notes in the harmony.
Array with simplified version of the array of notes. Notes are converted to pitch class module 12, duplicates are removed and elements are sorted ascending.
String with fundamental letter value an type of chord string value
String with fundamental letter value an type of chord string value with inversion string added.
Degree of each chord with respect to chord type, for example for C Major seventh chord [0,4,7,11], 0 would be the fundamental 1, 4 would be the and interval of third, 7 an interval of fifth and 11 the seventh interval.
Prints information about the harmony: Fundamental string, type, inversion, notes, simplified notes and interval types
Prints simplifiedinformation about the harmony: Fundamental string, type and inversion.
Creating a chord
Cristian Banuelos, 2022.