public enum BaseNote extends java.lang.Enum<BaseNote>
To get frequency for octave x, simply use the following formula:
baseNote.getFrequency() * Math.pow(2, octave)
Enum Constant and Description |
---|
DO_0
Do (octave 0).
|
FA_0
Fa (octave 0).
|
LA_0
La (octave 0).
|
MI_0
Mi (octave 0).
|
RE_0
Re (octave 0).
|
SI_0
Si (octave 0).
|
SOL_0
Sol (octave 0).
|
Modifier and Type | Method and Description |
---|---|
double |
getFrequency()
Get the frequency of this base note (octave 0), in Hz.
|
java.lang.String |
toString() |
static BaseNote |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static BaseNote[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BaseNote DO_0
public static final BaseNote RE_0
public static final BaseNote MI_0
public static final BaseNote FA_0
public static final BaseNote SOL_0
public static final BaseNote LA_0
public static final BaseNote SI_0
public static BaseNote[] values()
for (BaseNote c : BaseNote.values()) System.out.println(c);
public static BaseNote valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic double getFrequency()
public java.lang.String toString()
toString
in class java.lang.Enum<BaseNote>