public class ChordProgression extends java.lang.Object implements PatternProducer
Constructor and Description |
---|
ChordProgression(java.lang.String progression)
Creates a chord progression given a Progression String, like "I vi ii V" - case is important!
Chords can be separated with spaces ("I vi ii V") or dashes ("I-vi-ii-V").
|
ChordProgression(java.lang.String[] progressionElements)
Creates a chord progression given an array of Progression Strings, like { "I", "vi", "ii", "V" } - case is important!
|
Modifier and Type | Method and Description |
---|---|
ChordProgression |
allChordsAs(java.lang.String sequence)
Requires passing a string that has dollar signs followed by an index, in which case each dollar+index will be replaced
by the indexed chord of the chord progression.
|
ChordProgression |
distribute(java.lang.String distribute) |
ChordProgression |
eachChordAs(java.lang.String sequence)
Requires passing a string that has dollar signs followed by an index, in which case each dollar+index will be replaced
by the indexed note of the chord for each chord in the progression.
|
static ChordProgression |
fromChords(Chord... chords) |
static ChordProgression |
fromChords(java.lang.String knownChords) |
Chord[] |
getChords()
Returns a list of chords represented by this chord progression.
|
Pattern |
getPattern()
Returns a pattern
|
ChordProgression |
setKey(Key key) |
ChordProgression |
setKey(java.lang.String key)
The key usually identifies the tonic note and/or chord [Wikipedia]
|
java.lang.String |
toString() |
java.lang.String[] |
toStringArray() |
public ChordProgression(java.lang.String progression)
public ChordProgression(java.lang.String[] progressionElements)
public static ChordProgression fromChords(java.lang.String knownChords)
public static ChordProgression fromChords(Chord... chords)
public ChordProgression setKey(java.lang.String key)
public ChordProgression setKey(Key key)
public Pattern getPattern()
PatternProducer
getPattern
in interface PatternProducer
public Chord[] getChords()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String[] toStringArray()
public ChordProgression eachChordAs(java.lang.String sequence)
public ChordProgression allChordsAs(java.lang.String sequence)
public ChordProgression distribute(java.lang.String distribute)