Class SeventhChord

    • Constructor Detail

      • SeventhChord

        public SeventhChord​(Tone[] tones)
    • Method Detail

      • values

        public static SeventhChord[] values()
        All possible seventh chords.
        Returns:
        seventh chords
      • getCorrelation

        public float getCorrelation​(float[] chromagram,
                                    Tone chromagramBase)
        Description copied from interface: Chord
        Computes the correlation of this chord (and type) to a chromagram with the given base tone.
        Specified by:
        getCorrelation in interface Chord
        Parameters:
        chromagram - chromagram
        Returns:
        correlation coefficient
      • getCorrelatingChord

        public static SeventhChord getCorrelatingChord​(float[] chromagram,
                                                       Tone baseTone)
        Computes the seventh chord with the highest correlation to the given chromagram.
        Parameters:
        chromagram - chromagram
        baseTone - base tone of the chromagram
        Returns:
        seventh chord with the highest correlation coefficient
      • canBeFormedFrom

        public boolean canBeFormedFrom​(Tone[] tones,
                                       int length)
        Indicates whether an array of tones contains all the necessary tones to form this seventh chord. The array may contain more than necessary tones.
        Specified by:
        canBeFormedFrom in interface Chord
        Parameters:
        tones - tones
        length - number of tones of the given tone array to take into account
        Returns:
        true, if this seventh chord can be formed from the given array of tones
      • contains

        public boolean contains​(Tone tone)
        Specified by:
        contains in interface Chord
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object