|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object world.sound.tunes.Tune
public class Tune
Represents one a Chord to be played on the given channel. Based in part on a class originally designed by Viera K. Proulx.
Constructor Summary | |
---|---|
Tune(int channel)
Create an empty Tune on the given channel. |
|
Tune(int channel,
Chord chord)
Create a Tune on the given channel from the given Chord. |
|
Tune(int channel,
Note... notes)
Create a Tune on the given channel from the given Notes. |
Method Summary | |
---|---|
void |
addChord(Chord c)
Add all the Notes fomr the given Chord to this Tune. |
void |
addNote(Note note)
Add the given Note to this Tune's Chord |
void |
addNote(java.lang.String note)
Add a Note (represented by the given String) this Tune's Chord. |
void |
clearChord()
Remove all Notes from this Tune. |
boolean |
containsNote(Note n)
Does this tune contain the given Note? |
int |
getChannel()
Get the Channel number the Chord will be played on. |
Chord |
getChord()
Return the Chord that will be played. |
boolean |
isSilent()
Has this Tune finished playing? Are all the Notes in the Chord done? |
void |
removeSilent()
Remove all the silent Notes from this Tune. |
int |
size()
Return the number of Notes in this Tune |
java.lang.String |
toString()
Produce a human readable representation of this Tune/Chord. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Tune(int channel, Chord chord)
public Tune(int channel)
public Tune(int channel, Note... notes)
Method Detail |
---|
public int getChannel()
public Chord getChord()
public void addNote(Note note)
public void addNote(java.lang.String note)
public void addChord(Chord c)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isSilent()
public void removeSilent()
public void clearChord()
public int size()
public boolean containsNote(Note n)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |