|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object world.sound.tunes.TuneCollection
public class TuneCollection
A collection of Notes/Tunes to be played on MIDI instruments, together
with the MusicBox
on which the Notes
will be played.
Based in part on a class originally designed by Viera K. Proulx.
Field Summary |
---|
Constructor Summary | |
---|---|
TuneCollection(MusicBox musicBox)
Create a TunCollection associated with the given MusicBox. |
Method Summary | |
---|---|
void |
add(TuneCollection tb)
Add all the Tunes/Chords form the given TuneCollection to this one. |
void |
addChord(int channel,
Chord chord)
Add the given Chord to the given Channel in this Collection. |
void |
addNote(int channel,
int pitch)
Add the Note represented by the given Pitch to the given Channel in this Collection. |
void |
addNote(int channel,
Note note)
Add the given Note to the given Channel in this Collection. |
void |
addNote(int channel,
java.lang.String note)
Add the Note represented by the given String to the given Channel in this Collection. |
void |
addTune(Tune tune)
Add a given Tune/Chord to this Collection. |
void |
addTunes(java.lang.Iterable<Tune> tunes)
Add a all given Tunes/Chords (Iterable) to this Collection. |
void |
clear()
Stop playing notes and clear the Collection. |
void |
clearTunes()
Clear all chords in this Collection |
boolean |
contains(int channel,
int pitch)
Does this TunCollection contain the given Pitch on the given Channel? |
boolean |
contains(int channel,
Note note)
Does this TunCollection contain the given Note on the given Channel? |
TuneCollection |
copy()
Make a deep copy of this TuneCollection |
void |
initTunes()
Initialize all the Channels to empty Tunes. |
void |
nextBeat()
Stop playing the Notes/Chords when their duration has expired. |
void |
playTunes()
Start playing all Tunes in this Collection |
int |
size()
Computes the total number of Notes in this TuneCollection |
java.lang.String |
toString()
Produce a String representation of this TunCollection. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TuneCollection(MusicBox musicBox)
Method Detail |
---|
public void initTunes()
public void add(TuneCollection tb)
public void addNote(int channel, int pitch)
public void addNote(int channel, java.lang.String note)
public void addTunes(java.lang.Iterable<Tune> tunes)
public void addTune(Tune tune)
public void addNote(int channel, Note note)
public void addChord(int channel, Chord chord)
public void clear()
public void clearTunes()
public void nextBeat()
public void playTunes()
public TuneCollection copy()
public int size()
public boolean contains(int channel, int pitch)
public boolean contains(int channel, Note note)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |