Package com.tagtraum.audiokern.key
Enum Chord.Type
- java.lang.Object
-
- java.lang.Enum<Chord.Type>
-
- com.tagtraum.audiokern.key.Chord.Type
-
- All Implemented Interfaces:
Serializable
,Comparable<Chord.Type>
- Enclosing interface:
- Chord
public static enum Chord.Type extends Enum<Chord.Type>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUGMENTED_MAJOR_SEVENTH
AUGMENTED_SEVENTH
AUGMENTED_TRIAD
DIMINISHED_SEVENTH
DIMINISHED_TRIAD
DOMINANT_SEVENTH
HALF_DIMINISHED_SEVENTH
MAJOR_SEVENTH
MAJOR_TRIAD
MINOR_MAJOR_SEVENTH
MINOR_SEVENTH
MINOR_TRIAD
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description float
correlation(float[] chromagram)
Calculates the correlation coefficient between the given chromagram and this chord type.int[]
getDegrees()
Tone
getRoot(Chord chord)
static Chord.Type
getType(Chord chord)
boolean
isTypeOf(Chord chord)
static Chord.Type
valueOf(String name)
Returns the enum constant of this type with the specified name.static Chord.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 nameNullPointerException
- if the argument is null
-
getType
public static Chord.Type getType(Chord chord)
-
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
-
isTypeOf
public boolean isTypeOf(Chord chord)
-
-