|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectAmazingGraceSongElement
public class AmazingGraceSongElement
Class that represents elements of the song amazing grace
| Constructor Summary | |
|---|---|
AmazingGraceSongElement()
When we make a new element, the next part is empty, and ours is a blank new part |
|
| Method Summary | |
|---|---|
void |
addPhrase1(double startTime,
int instrument)
addPhrase1 puts the first part of AmazingGrace into our part of the song at the desired start time with the given instrument |
void |
addPhrase2(double startTime,
int instrument)
Add the second phrase |
double |
getEndTime()
Why do we need this? If we want one piece to start after another, we need to know when the last one ends. |
AmazingGraceSongElement |
getNext()
Method to get the next element |
jm.music.data.Part |
getPart()
We could just access myPart directly but we can CONTROL access by using a method We'll use it in showFromMeOn |
jm.music.data.Part |
part()
We could just access myPart directly but we can CONTROL access by using a method We'll use it in showFromMeOn |
void |
setChannel(int channel)
We need setChannel because each part has to be in its own channel if it has different start times. |
void |
setNext(AmazingGraceSongElement nextOne)
Set the next element |
void |
showFromMeOn()
Method to show from this element on |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AmazingGraceSongElement()
| Method Detail |
|---|
public void addPhrase1(double startTime,
int instrument)
startTime - the time to start playing this elementinstrument - the instrument to use
public void addPhrase2(double startTime,
int instrument)
startTime - the time to startinstrument - the instrument to usepublic void setNext(AmazingGraceSongElement nextOne)
nextOne - the one to use as the nextpublic AmazingGraceSongElement getNext()
public jm.music.data.Part getPart()
public jm.music.data.Part part()
public double getEndTime()
public void setChannel(int channel)
channel - the channel to usepublic void showFromMeOn()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||