|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmusiccreator.ChordArray
public class ChordArray
Implements the ChordArray class, which is the actual array of chords in a song. This array is modeless; i.e., it has no key.
Constructor Summary | |
---|---|
ChordArray()
Creates a new instance of ChordArray |
Method Summary | |
---|---|
void |
AddChord(Chord c)
Adds a new chord to the end of the ChordArray |
void |
clear()
Clears the song from memory. |
Chord |
getChord(int index)
Get the chord at 'index' |
void |
outputToConsole()
Outputs the chordarray to the console for debugging. |
void |
outputToMidi(javax.sound.midi.Track track)
Outputs the song to a midi track specified by "track" |
void |
outputToMusicXml(java.io.PrintWriter out)
Outputs the chordarray to MusicXML format |
void |
setTempo(int tempo)
Set the tempo of the song in beats per minute |
void |
setTimeSignature(TimeSignature inTs)
Set the time-signature of the ChordArray, used by OutputToMusicXML to know the number of beats per measure. |
int |
Size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChordArray()
Method Detail |
---|
public Chord getChord(int index)
index
- the array index to find the chord
public void AddChord(Chord c)
c
- the chord to addpublic int Size()
public void setTimeSignature(TimeSignature inTs)
inTs
- Time Signature to setpublic void outputToConsole()
public void outputToMusicXml(java.io.PrintWriter out)
outputToMusicXml
in interface MusicXmlOutputable
public void clear()
public void setTempo(int tempo)
tempo
- public void outputToMidi(javax.sound.midi.Track track)
outputToMidi
in interface MidiOutputable
track
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |