|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ddf.minim.ugens.Frequency
public class Frequency
A Frequency
is used to contain a frequency.
This is generally used by an Oscil
UGen, but
can also be used to convert different notations of frequencies
such as Hz, MIDI note number, and a pitch name (English or solfege).
Method Summary | |
---|---|
float |
asHz()
Returns the value of this Frequency in Hertz. |
float |
asMidiNote()
Returns the midi note value of this Frequency |
static Frequency |
ofHertz(float hz)
Construct a Frequency that represents the provided Hertz. |
static Frequency |
ofMidiNote(float midiNote)
Construct a Frequency from a MIDI note value. |
static Frequency |
ofPitch(java.lang.String pitchName)
Construct a Frequency from a pitch name, such as A4 or Bb2. |
void |
setAsHz(float hz)
Set this Frequency to be equal to the provided Hertz value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public float asHz()
public void setAsHz(float hz)
hz
- public float asMidiNote()
public static Frequency ofHertz(float hz)
hz
- the Hz for this Frequency (440 is A4, for instance)public static Frequency ofMidiNote(float midiNote)
midiNote
- a value in the range [0,127]public static Frequency ofPitch(java.lang.String pitchName)
pitchName
- the name of the pitch to convert to a Frequency.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |