Class ChordProgression

    • Constructor Summary

      Constructors 
      Constructor 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!
    • Constructor Detail

      • ChordProgression

        public 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

        public ChordProgression​(java.lang.String[] progressionElements)
        Creates a chord progression given an array of Progression Strings, like { "I", "vi", "ii", "V" } - case is important!
    • Method Detail

      • fromChords

        public static ChordProgression fromChords​(java.lang.String knownChords)
      • setKey

        public ChordProgression setKey​(java.lang.String key)
        The key usually identifies the tonic note and/or chord [Wikipedia]
      • getChords

        public Chord[] getChords()
        Returns a list of chords represented by this chord progression.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toStringArray

        public java.lang.String[] toStringArray()
      • eachChordAs

        public 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. For example, given a ChordProgression of "I IV V" and a string of "$0q $1h $2w", will return "Cq E4h G4w Fq A4h C5w Gq B4h D5w". Using the underscore character instead of an index will result in the chord itself added to the string. The final result will be returned from the getPattern() method.
      • allChordsAs

        public 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. For example, given a ChordProgression of "I IV V" and a string of "$0q $1h $2w", will return "C4MAJq F4MAJh G4MAJw". Using the underscore character instead of an index will result in the pattern of the ChordProgression itself added to the string. The final result will be returned from the getPattern() method.
      • distribute

        public ChordProgression distribute​(java.lang.String distribute)