|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcaas.midi.Note
public class Note
Note represents a note that may be played by MIDIPlayer Extends StaffProperty.
Constructor Summary | |
---|---|
Note(int tone)
Default constructor, makes a note with a duration of 1ms/1 beat and a given pitch. |
|
Note(int tone,
int length,
double beats)
Constructor, makes a note with a given pitch and duration in milliseconds. |
Method Summary | |
---|---|
double |
getBeats()
|
int |
getDuration()
Returns the duration of this note. |
int |
getPitch()
Returns the tone of this note. |
void |
setBeats(double beats)
|
void |
setDuration(int time)
Sets a time duration for this note in milliseconds. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Note(int tone)
tone
- - the int pitch this note represents.public Note(int tone, int length, double beats)
tone
- - the int pitch this note represents.length
- - the int duration of this song in milliseconds.Method Detail |
---|
public int getPitch()
public int getDuration()
public void setDuration(int time)
time
- - the duration of the note in millisecondspublic double getBeats()
public void setBeats(double beats)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |