|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmusiccreator.Chord
public class Chord
Implements the Chord class. A Chord is one unit of a song, and consists of a Beat (which defines its rhythm), and a ChordDef (which defines the musical notes in the chord).
Constructor Summary | |
---|---|
Chord(Beat b,
ChordDef cd)
Creates a new instance of Chord. |
Method Summary | |
---|---|
int |
getLength()
|
int |
getNote(int index)
|
boolean |
isDiatonic()
Indicates if the chord is diatonic to the key. |
void |
outputToConsole()
Outputs the chord to the console for debugging. |
void |
outputToMusicXml(java.io.PrintWriter out)
Outputs a chord to MusicXML |
static void |
setKey(Key k)
Sets the key for all chords. |
int |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Chord(Beat b, ChordDef cd)
b
- Beat size of chordcd
- Chord definition of chordMethod Detail |
---|
public static void setKey(Key k)
k
- key to set chords topublic final void outputToConsole()
public final boolean isDiatonic()
public final void outputToMusicXml(java.io.PrintWriter out)
outputToMusicXml
in interface MusicXmlOutputable
public int getLength()
public int size()
public int getNote(int index)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |