midiReference
Enum NoteReference

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

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

Enum containing the basic note information at octave 0.

Author:
gmuller

Enum Constant Summary
A
          Base Number 9, Note Name "A"
Aflat
          Base Number 8, Note Name "Ab"
Asharp
          Base Number 10, Note Name "A#"
B
          Base Number 11, Note Name "B"
Bflat
          Base Number 10, Note Name "Bb"
C
          Base Number 0, Note Name "C"
Csharp
          Base Number 1, Note Name "C#"
D
          Base Number 2, Note Name "D"
Dflat
          Base Number 1, Note Name "Db"
Dsharp
          Base Number 3, Note Name "D#"
E
          Base Number 4, Note Name "E"
Eflat
          Base Number 3, Note Name "Eb"
F
          Base Number 5, Note Name "F"
Fsharp
          Base Number 6, Note Name "F#"
G
          Base Number 7, Note Name "G"
Gflat
          Base Number 6, Note Name "Gb"
Gsharp
          Base Number 8, Note Name "G#"
 
Method Summary
static NoteReference get(java.lang.String baseName)
          Reverse lookup of a NoteReference based on the abbreviation passed in.
 int getBaseNumber()
          This method gets the base note number of the note at octave 0.
static NoteReference valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static NoteReference[] 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

C

public static final NoteReference C
Base Number 0, Note Name "C"


Csharp

public static final NoteReference Csharp
Base Number 1, Note Name "C#"


Dflat

public static final NoteReference Dflat
Base Number 1, Note Name "Db"


D

public static final NoteReference D
Base Number 2, Note Name "D"


Dsharp

public static final NoteReference Dsharp
Base Number 3, Note Name "D#"


Eflat

public static final NoteReference Eflat
Base Number 3, Note Name "Eb"


E

public static final NoteReference E
Base Number 4, Note Name "E"


F

public static final NoteReference F
Base Number 5, Note Name "F"


Fsharp

public static final NoteReference Fsharp
Base Number 6, Note Name "F#"


Gflat

public static final NoteReference Gflat
Base Number 6, Note Name "Gb"


G

public static final NoteReference G
Base Number 7, Note Name "G"


Gsharp

public static final NoteReference Gsharp
Base Number 8, Note Name "G#"


Aflat

public static final NoteReference Aflat
Base Number 8, Note Name "Ab"


A

public static final NoteReference A
Base Number 9, Note Name "A"


Asharp

public static final NoteReference Asharp
Base Number 10, Note Name "A#"


Bflat

public static final NoteReference Bflat
Base Number 10, Note Name "Bb"


B

public static final NoteReference B
Base Number 11, Note Name "B"

Method Detail

values

public static final NoteReference[] 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(NoteReference c : NoteReference.values())
        System.out.println(c);

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

valueOf

public static NoteReference 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

getBaseNumber

public int getBaseNumber()
This method gets the base note number of the note at octave 0. As an example G has a base note number of 7.

Returns:
the integer of the note at octave 0

get

public static NoteReference get(java.lang.String baseName)
Reverse lookup of a NoteReference based on the abbreviation passed in. For example, passing in the String "C#" will return the Csharp NoteReference

Parameters:
baseName -
Returns:
The NoteReference of the abbreviation passed in