Enum KeyProfile

    • Enum Constant Detail

      • KRUMHANSL_KESSLER

        public static final KeyProfile KRUMHANSL_KESSLER
      • AARDEN_ESSEN

        public static final KeyProfile AARDEN_ESSEN
      • BELLMAN_BUDGE

        public static final KeyProfile BELLMAN_BUDGE
      • TEMPERLEY_KOSTKA_PAYNE

        public static final KeyProfile TEMPERLEY_KOSTKA_PAYNE
    • Method Detail

      • values

        public static KeyProfile[] 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 (KeyProfile c : KeyProfile.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static KeyProfile 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
      • majorCorrelation

        public float majorCorrelation​(float[] chromagram)
        Calculates the correlation coefficient between the given chromagram and this profile.
        Parameters:
        chromagram - chromagram
        Returns:
        correlation coefficient
      • minorCorrelation

        public float minorCorrelation​(float[] chromagram)
        Calculates the correlation coefficient between the given and this profile.
        Parameters:
        chromagram - chromagram
        Returns:
        correlation coefficient
      • getCorrelatingKey

        public Key getCorrelatingKey​(float[] chromagram,
                                     Tone baseTone)
        Computes the key with the highest correlation to the given chromagram using the given profile.
        Parameters:
        chromagram - chromagram
        baseTone - base tone of the chromagram
        Returns:
        key with the highest correlation coefficient
      • getCorrelatingKeys

        public KeyProfile.KeyCorrelation[] getCorrelatingKeys​(float[] chromagram,
                                                              Tone baseTone)
        Computes the correlations to all (regular) keys. Results are ordered by correlation in ascending order.
        Parameters:
        chromagram - chromagram
        baseTone - base tone of the chromagram
        Returns:
        correlations