midiReference
Enum ChordReference

java.lang.Object
  extended by java.lang.Enum<ChordReference>
      extended by midiReference.ChordReference
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ChordReference>

public enum ChordReference
extends java.lang.Enum<ChordReference>

Enum class providing access to ready made chord degrees based on scale references.

Author:
gmuller

Enum Constant Summary
ADD_FOURTH
          Scale Degrees {1, 3, 4, 5} Midi Note Numbers {0, 4, 5, 7}
ADD_NINE
          Scale Degrees {0, 3, 5, 9} Midi Note Numbers {0, 4, 7, 14}
ADD_TWO
          Scale Degrees {1, 2, 3, 5} Midi Note Numbers {0, 2, 4, 7}
AUGMENTED
          Scale Degrees {1, 3, #5} Midi Note Numbers {0, 4, 8}
DIMINISHED
          Scale Degrees {1, b3, b5} Midi Note Numbers {0, 3, 6}
DIMISHED_SEVENTH
          Scale Degrees {1, b3, b5, b7} Midi Note Numbers {0, 3, 6, 9}
ELEVENTH
          Scale Degrees {1, 3, 5, b7, 9, 11} Midi Note Numbers {0, 4, 7, 10, 14, 17}
FIFTH
          Scale Degrees {1, 5} Midi Note Numbers {0, 7}
HALF_DIMINISHED
          Scale Degrees {1, b3, b5, 7} Midi Note Numbers {0, 3, 6, 10}
MAJOR
          Scale Degrees {1, 3, 5} Midi Note Numbers {0, 4, 7}
MAJOR_ELEVENTH
          Scale Degrees {1, 3, 5, 7, 9, 11} Midi Note Numbers {0, 4, 7, 11, 14, 17}
MAJOR_NINTH
          Scale Degrees {1, 3, 5, 7, 9} Midi Note Numbers {0, 4, 7, 11, 14}
MAJOR_SEVENTH
          Scale Degrees {1, 3, 5, 7} Midi Note Numbers {0, 4, 7, 11}
MAJOR_THIRTEENTH
          Scale Degrees {1, 3, 5, 7, 9, 11, 13} Midi Note Numbers {0, 4, 7, 11, 14, 17, 21}
MINOR
          Scale Degrees {1, b3, 5} Midi Note Numbers {0, 3, 7}
MINOR_ELEVENTH
          Scale Degrees {1, b3, 5, b7, 9, 11} Midi Note Numbers {0, 3, 7, 10, 14, 17}
MINOR_MAJOR_SEVENTH
          Scale Degrees {1, b3, 5, 7} Midi Note Numbers {0, 3, 7, 11}
MINOR_NINTH
          Scale Degrees {1, b3, 5, b7, 9} Midi Note Numbers {0, 3, 7, 10, 14}
MINOR_SEVENTH
          Scale Degrees {1, b3, 5, b7} Midi Note Numbers {0, 3, 7, 10}
MINOR_SIXTH
          Scale Degrees {1, b3, 5, 6} Midi Note Numbers {0, 3, 7, 9}
MINOR_THIRTEENTH
          Scale Degrees {1, b3, 5, b7, 9, 11, 13} Midi Note Numbers {0, 3, 7, 10, 14, 17, 21}
NINTH
          Scale Degrees {1, 3, 5, b7, 9} Midi Note Numbers {0, 4, 7, 10, 14}
SEVENTH
          Scale Degrees {1, 3, 5, b7} Midi Note Numbers {0, 4, 7, 10}
SEVENTH_FLAT_FIFTH
          Scale Degrees {1, 3, b5, b7} Midi Note Numbers {0, 4, 6, 10}
SEVENTH_FLAT_NINE
          Scale Degrees {1, 3, 5, b7, b9} Midi Note Numbers {0, 4, 7, 10, 13}
SEVENTH_SHARP_FIFTH
          Scale Degrees {1, 3, #5, b7} Midi Note Numbers {0, 4, 8, 10}
SEVENTH_SHARP_NINE
          Scale Degrees {1, 3, 5, b7, #9} Midi Note Numbers {0, 4, 7, 10, 15}
SEVENTH_SUSPENDED_FOURTH
          Scale Degrees {1, 4, 5, b7} Midi Note Numbers {0, 5, 7, 10}
SEVENTH_SUSPENDED_SECOND
          Scale Degrees {1, 2, 5, b7} Midi Note Numbers {0, 2, 7, 10}
SIX_NINE
          Scale Degrees {1, 3, 5, 6, 9} Midi Note Numbers {0, 4, 7, 9, 14}
SIXTH
          Scale Degrees {1, 3, 5, 6} Midi Note Numbers {0, 4, 7, 9}
SUSPENDED_FOURTH
          Scale Degrees {1, 4, 5} Midi Note Numbers {0, 5, 7}
SUSPENDED_SECOND
          Scale Degrees {1, 2, 5} Midi Note Numbers {0, 2, 7}
THIRTEENTH
          Scale Degrees {1, 3, 5, b7, 9, 11, 13} Midi Note Numbers {0, 4, 7, 10, 14, 17, 21}
 
Method Summary
static ChordReference get(java.lang.String commonName)
          Reverse lookup of the enum ChordReference by the abbreviation.
 java.lang.String getCommonName()
          Gets the abbreviated name of the chord.
 int[] getDegrees()
          Provides access to the integer array containing the scale degrees for a particular chord.
static ChordReference valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ChordReference[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MAJOR

public static final ChordReference MAJOR
Scale Degrees {1, 3, 5} Midi Note Numbers {0, 4, 7}


MINOR

public static final ChordReference MINOR
Scale Degrees {1, b3, 5} Midi Note Numbers {0, 3, 7}


DIMINISHED

public static final ChordReference DIMINISHED
Scale Degrees {1, b3, b5} Midi Note Numbers {0, 3, 6}


DIMISHED_SEVENTH

public static final ChordReference DIMISHED_SEVENTH
Scale Degrees {1, b3, b5, b7} Midi Note Numbers {0, 3, 6, 9}


HALF_DIMINISHED

public static final ChordReference HALF_DIMINISHED
Scale Degrees {1, b3, b5, 7} Midi Note Numbers {0, 3, 6, 10}


AUGMENTED

public static final ChordReference AUGMENTED
Scale Degrees {1, 3, #5} Midi Note Numbers {0, 4, 8}


FIFTH

public static final ChordReference FIFTH
Scale Degrees {1, 5} Midi Note Numbers {0, 7}


SEVENTH

public static final ChordReference SEVENTH
Scale Degrees {1, 3, 5, b7} Midi Note Numbers {0, 4, 7, 10}


MINOR_SEVENTH

public static final ChordReference MINOR_SEVENTH
Scale Degrees {1, b3, 5, b7} Midi Note Numbers {0, 3, 7, 10}


MAJOR_SEVENTH

public static final ChordReference MAJOR_SEVENTH
Scale Degrees {1, 3, 5, 7} Midi Note Numbers {0, 4, 7, 11}


MINOR_MAJOR_SEVENTH

public static final ChordReference MINOR_MAJOR_SEVENTH
Scale Degrees {1, b3, 5, 7} Midi Note Numbers {0, 3, 7, 11}


SUSPENDED_FOURTH

public static final ChordReference SUSPENDED_FOURTH
Scale Degrees {1, 4, 5} Midi Note Numbers {0, 5, 7}


SUSPENDED_SECOND

public static final ChordReference SUSPENDED_SECOND
Scale Degrees {1, 2, 5} Midi Note Numbers {0, 2, 7}


SEVENTH_SUSPENDED_FOURTH

public static final ChordReference SEVENTH_SUSPENDED_FOURTH
Scale Degrees {1, 4, 5, b7} Midi Note Numbers {0, 5, 7, 10}


SEVENTH_SUSPENDED_SECOND

public static final ChordReference SEVENTH_SUSPENDED_SECOND
Scale Degrees {1, 2, 5, b7} Midi Note Numbers {0, 2, 7, 10}


ADD_TWO

public static final ChordReference ADD_TWO
Scale Degrees {1, 2, 3, 5} Midi Note Numbers {0, 2, 4, 7}


ADD_NINE

public static final ChordReference ADD_NINE
Scale Degrees {0, 3, 5, 9} Midi Note Numbers {0, 4, 7, 14}


ADD_FOURTH

public static final ChordReference ADD_FOURTH
Scale Degrees {1, 3, 4, 5} Midi Note Numbers {0, 4, 5, 7}


SIXTH

public static final ChordReference SIXTH
Scale Degrees {1, 3, 5, 6} Midi Note Numbers {0, 4, 7, 9}


MINOR_SIXTH

public static final ChordReference MINOR_SIXTH
Scale Degrees {1, b3, 5, 6} Midi Note Numbers {0, 3, 7, 9}


SIX_NINE

public static final ChordReference SIX_NINE
Scale Degrees {1, 3, 5, 6, 9} Midi Note Numbers {0, 4, 7, 9, 14}


NINTH

public static final ChordReference NINTH
Scale Degrees {1, 3, 5, b7, 9} Midi Note Numbers {0, 4, 7, 10, 14}


MINOR_NINTH

public static final ChordReference MINOR_NINTH
Scale Degrees {1, b3, 5, b7, 9} Midi Note Numbers {0, 3, 7, 10, 14}


MAJOR_NINTH

public static final ChordReference MAJOR_NINTH
Scale Degrees {1, 3, 5, 7, 9} Midi Note Numbers {0, 4, 7, 11, 14}


ELEVENTH

public static final ChordReference ELEVENTH
Scale Degrees {1, 3, 5, b7, 9, 11} Midi Note Numbers {0, 4, 7, 10, 14, 17}


MINOR_ELEVENTH

public static final ChordReference MINOR_ELEVENTH
Scale Degrees {1, b3, 5, b7, 9, 11} Midi Note Numbers {0, 3, 7, 10, 14, 17}


MAJOR_ELEVENTH

public static final ChordReference MAJOR_ELEVENTH
Scale Degrees {1, 3, 5, 7, 9, 11} Midi Note Numbers {0, 4, 7, 11, 14, 17}


THIRTEENTH

public static final ChordReference THIRTEENTH
Scale Degrees {1, 3, 5, b7, 9, 11, 13} Midi Note Numbers {0, 4, 7, 10, 14, 17, 21}


MINOR_THIRTEENTH

public static final ChordReference MINOR_THIRTEENTH
Scale Degrees {1, b3, 5, b7, 9, 11, 13} Midi Note Numbers {0, 3, 7, 10, 14, 17, 21}


MAJOR_THIRTEENTH

public static final ChordReference MAJOR_THIRTEENTH
Scale Degrees {1, 3, 5, 7, 9, 11, 13} Midi Note Numbers {0, 4, 7, 11, 14, 17, 21}


SEVENTH_SHARP_NINE

public static final ChordReference SEVENTH_SHARP_NINE
Scale Degrees {1, 3, 5, b7, #9} Midi Note Numbers {0, 4, 7, 10, 15}


SEVENTH_FLAT_NINE

public static final ChordReference SEVENTH_FLAT_NINE
Scale Degrees {1, 3, 5, b7, b9} Midi Note Numbers {0, 4, 7, 10, 13}


SEVENTH_SHARP_FIFTH

public static final ChordReference SEVENTH_SHARP_FIFTH
Scale Degrees {1, 3, #5, b7} Midi Note Numbers {0, 4, 8, 10}


SEVENTH_FLAT_FIFTH

public static final ChordReference SEVENTH_FLAT_FIFTH
Scale Degrees {1, 3, b5, b7} Midi Note Numbers {0, 4, 6, 10}

Method Detail

values

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

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static ChordReference valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getDegrees

public int[] getDegrees()
Provides access to the integer array containing the scale degrees for a particular chord. For example a Major chord is made up of the root, the third and the fifth. Taking zero as the root, the third is 5 notes away, and the the fifth is 7 notes away. The integer array for this chord would be {0, 5, 7}.

Returns:
int array of chord degrees
See Also:
MidiReference.createScale(ScaleReference, NoteReference)

getCommonName

public java.lang.String getCommonName()
Gets the abbreviated name of the chord. For example a Major Thirteenth chord is abbreviated maj13.

Returns:
String abbreviation of the chord.

get

public static ChordReference get(java.lang.String commonName)
Reverse lookup of the enum ChordReference by the abbreviation. Passing in "maj13" will return the MAJOR_THIRTEENTH ChordReference

Parameters:
commonName -
Returns:
ChordReference matching the abbreviation passed in