Enum Chord.Type

    • Enum Constant Detail

      • MAJOR_TRIAD

        public static final Chord.Type MAJOR_TRIAD
      • MINOR_TRIAD

        public static final Chord.Type MINOR_TRIAD
      • DIMINISHED_TRIAD

        public static final Chord.Type DIMINISHED_TRIAD
      • AUGMENTED_TRIAD

        public static final Chord.Type AUGMENTED_TRIAD
      • DIMINISHED_SEVENTH

        public static final Chord.Type DIMINISHED_SEVENTH
      • HALF_DIMINISHED_SEVENTH

        public static final Chord.Type HALF_DIMINISHED_SEVENTH
      • MINOR_SEVENTH

        public static final Chord.Type MINOR_SEVENTH
      • MINOR_MAJOR_SEVENTH

        public static final Chord.Type MINOR_MAJOR_SEVENTH
      • AUGMENTED_SEVENTH

        public static final Chord.Type AUGMENTED_SEVENTH
      • DOMINANT_SEVENTH

        public static final Chord.Type DOMINANT_SEVENTH
      • MAJOR_SEVENTH

        public static final Chord.Type MAJOR_SEVENTH
      • AUGMENTED_MAJOR_SEVENTH

        public static final Chord.Type AUGMENTED_MAJOR_SEVENTH
    • Method Detail

      • values

        public static Chord.Type[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Chord.Type c : Chord.Type.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Chord.Type valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getDegrees

        public int[] getDegrees()
      • correlation

        public float correlation​(float[] chromagram)
        Calculates the correlation coefficient between the given chromagram and this chord type.
        Parameters:
        chromagram - chromagram
        Returns:
        correlation coefficient
      • getRoot

        public Tone getRoot​(Chord chord)
      • isTypeOf

        public boolean isTypeOf​(Chord chord)