|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectc11files.calgorythmic.lab.Part
public class Part
Part models a single part in a Piece of music. A part has a sequence
of Chords and is played using a single instrument.
| Constructor Summary | |
|---|---|
Part(int instrument)
Construct a new Part. |
|
| Method Summary | |
|---|---|
void |
addChord(Chord chord)
|
void |
addChords(java.util.List<Chord> chords)
|
void |
addRests(int beats)
Add empty, non-pitched beats to the chord sequence |
java.util.List<Beat> |
getBeats()
|
java.util.List<Chord> |
getChords()
|
int |
getInstrument()
|
void |
setInstrument(int instrument)
|
void |
transpose(int interval)
Transpose this part based on the given interval. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Part(int instrument)
throws java.lang.Exception
instrument - the instrument used to play the part
java.lang.Exception| Method Detail |
|---|
public int getInstrument()
public void setInstrument(int instrument)
throws java.lang.Exception
java.lang.Exceptionpublic void addChord(Chord chord)
public void addRests(int beats)
throws java.lang.Exception
beats - the number of beats to add
java.lang.Exception
public java.util.List<Chord> getChords()
throws java.lang.Exception
java.lang.Exceptionpublic void addChords(java.util.List<Chord> chords)
public java.util.List<Beat> getBeats()
public void transpose(int interval)
throws java.lang.Exception
interval - the change to apply to all chords in this part
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||