|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object AmazingGraceSongElement2
public class AmazingGraceSongElement2
Class that represents elements of the song amazing grace version 2
Constructor Summary | |
---|---|
AmazingGraceSongElement2()
When we make a new element, the next part is empty, and ours is a blank new part |
Method Summary | |
---|---|
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. |
AmazingGraceSongElement2 |
getNext()
Method to get the next element |
jm.music.data.Part |
part()
We could just access myPart directly but we can CONTROL access by using a method (called an accessor) |
jm.music.data.Phrase |
phrase1()
method that returns the first phrase of Amazing Grace |
jm.music.data.Phrase |
phrase2()
method that returns phrase 2 |
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(AmazingGraceSongElement2 nextOne)
Method to set the next element |
void |
setPhrase(jm.music.data.Phrase myPhrase,
double startTime,
int instrument)
setPhrase takes a phrase and makes it the one for this element at the desired start time with the given instrument |
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 AmazingGraceSongElement2()
Method Detail |
---|
public void setPhrase(jm.music.data.Phrase myPhrase, double startTime, int instrument)
myPhrase
- the phrase to usestartTime
- the time to startinstrument
- the instrument to usepublic jm.music.data.Phrase phrase1()
public jm.music.data.Phrase phrase2()
public void setNext(AmazingGraceSongElement2 nextOne)
nextOne
- the next elementpublic AmazingGraceSongElement2 getNext()
public jm.music.data.Part part()
public double getEndTime()
public void setChannel(int channel)
the
- channel to usepublic void showFromMeOn()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |