Enum MinorKey

    • Enum Constant Detail

      • A_MINOR

        public static final MinorKey A_MINOR
        A minor.
      • E_MINOR

        public static final MinorKey E_MINOR
        E minor.
      • B_MINOR

        public static final MinorKey B_MINOR
        B minor.
      • F_SHARP_MINOR

        public static final MinorKey F_SHARP_MINOR
        F# minor.
      • D_FLAT_MINOR

        public static final MinorKey D_FLAT_MINOR
        Db minor.
      • A_FLAT_MINOR

        public static final MinorKey A_FLAT_MINOR
        Ab minor.
      • E_FLAT_MINOR

        public static final MinorKey E_FLAT_MINOR
        Eb minor.
      • B_FLAT_MINOR

        public static final MinorKey B_FLAT_MINOR
        Bb minor.
      • F_MINOR

        public static final MinorKey F_MINOR
        F minor.
      • C_MINOR

        public static final MinorKey C_MINOR
        C minor.
      • G_MINOR

        public static final MinorKey G_MINOR
        G minor.
      • D_MINOR

        public static final MinorKey D_MINOR
        D minor.
    • Method Detail

      • values

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

        public static MinorKey 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
      • getTones

        public Tone[] getTones()
        Description copied from interface: Key
        Tones in this key.
        Specified by:
        getTones in interface Key
        Returns:
        tones in this key
      • positiveDistance

        public int positiveDistance​(Key nextKey)
        Description copied from interface: Key
        Positive distance in semitones from this key to the given, next key.
        Specified by:
        positiveDistance in interface Key
        Parameters:
        nextKey - next key
        Returns:
        distance in semitones
        See Also:
        Tone.positiveDistance(Tone)
      • negativeDistance

        public int negativeDistance​(Key nextKey)
        Description copied from interface: Key
        Negative distance in semitones from this key to the given, next key.
        Specified by:
        negativeDistance in interface Key
        Parameters:
        nextKey - next key
        Returns:
        distance in semitones
        See Also:
        Tone.negativeDistance(Tone)
      • getTriad

        public Triad getTriad()
        Description copied from interface: Key
        Triad for this key.
        Specified by:
        getTriad in interface Key
        Returns:
        triad
      • isMajor

        public boolean isMajor()
        Description copied from interface: Key
        Is this a major key?
        Specified by:
        isMajor in interface Key
        Returns:
        true, if the key is a major key
      • isMinor

        public boolean isMinor()
        Description copied from interface: Key
        Is this a minor key?
        Specified by:
        isMinor in interface Key
        Returns:
        true, if the key is a minor key
      • getSubdominant

        public Key getSubdominant()
        Description copied from interface: Key
        Subdominant.
        Specified by:
        getSubdominant in interface Key
        Returns:
        subdominant
        See Also:
        Key.inc(int)
      • getDominant

        public Key getDominant()
        Description copied from interface: Key
        Dominant.
        Specified by:
        getDominant in interface Key
        Returns:
        dominant
        See Also:
        Key.inc(int)
      • inc

        public Key inc​(int fifths)
        Description copied from interface: Key
        Increase key by the given number of fifths. This allows to travel easily around the circle of fifths. Key.getDominant() is the same as inc(1). Key.getSubdominant() is the same as inc(-1).
        Specified by:
        inc in interface Key
        Parameters:
        fifths - number of fifths
        Returns:
        key
      • incBySemitones

        public Key incBySemitones​(int semitones)
        Description copied from interface: Key
        Return the key that would result in shifting all tones in this key by' the given number of semitones. Such a shift may result, when the audio is played back at a higher or lower speed.
        Specified by:
        incBySemitones in interface Key
        Parameters:
        semitones - number of semitones
        Returns:
        shifted key
        See Also:
        Tempo.incBySemitones(int)
      • getTonicParallel

        public Key getTonicParallel()
        Description copied from interface: Key
        Tonic parallel, i.e. major to minor or vice versa.
        Specified by:
        getTonicParallel in interface Key
        Returns:
        tonic parallel
      • getCorrelation

        public float getCorrelation​(KeyProfile profile,
                                    float[] chromagram,
                                    Tone chromagramBase)
        Description copied from interface: Key
        Calculates the Pearson correlation coefficient between this key and the given chromagram using the provided profile.
        Specified by:
        getCorrelation in interface Key
        Parameters:
        profile - key profile
        chromagram - chromagram
        chromagramBase - tone/pitch of the first chromagram bin
        Returns:
        correlation coefficient
      • getKeyCodeNumeral

        public int getKeyCodeNumeral()
        Description copied from interface: Key
        Key code numeral.
        Specified by:
        getKeyCodeNumeral in interface Key
        Returns:
        key code numeral (1-12)
      • getOpenKeyCodeNumeral

        public int getOpenKeyCodeNumeral()
        Description copied from interface: Key
        Position on the circle of fifths, clockwise, starting with C major = 1 for major keys and A minor = 1 for minor keys.
        Specified by:
        getOpenKeyCodeNumeral in interface Key
        Returns:
        open key code numeral (1-12)
        See Also:
        Key.getOpenKeyCode()
      • getKeyCode

        public String getKeyCode()
        Description copied from interface: Key
        Key code.
        Specified by:
        getKeyCode in interface Key
        Returns:
        key code 1-12[A|B]
      • getWallClockKeyCode

        public String getWallClockKeyCode()
        Description copied from interface: Key
        Wall clock key code.
        Specified by:
        getWallClockKeyCode in interface Key
        Returns:
        key code 1-12[M|m]
      • getOpenKeyCode

        public String getOpenKeyCode()
        Description copied from interface: Key
        Open key code, followed by either d (German dur, Latin durus, Engl. major) or m (German moll, Latin mollis, Engl. minor).
        Specified by:
        getOpenKeyCode in interface Key
        Returns:
        open key code 1-12[d|m]
        See Also:
        Key.getOpenKeyCodeNumeral()
      • getKeyCodeColor

        public Color getKeyCodeColor()
        Description copied from interface: Key
        Key code color.
        Specified by:
        getKeyCodeColor in interface Key
        Returns:
        key code color
      • getTKey

        public String getTKey()
        Description copied from interface: Key
        Id3 representation of this key.
        Specified by:
        getTKey in interface Key
        Returns:
        id3 representation of this key
      • toJSONString

        public String toJSONString()
        Specified by:
        toJSONString in interface org.json.simple.JSONAware