Class Chord
java.lang.Object
org.jfugue.theory.Chord
- All Implemented Interfaces:
PatternProducer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidbooleanstatic Chordstatic Chordstatic Chordstatic String[]static StringgetChordType(Intervals intervals) static StringgetHumanReadableName(String chordName) Returns a human readable chord name if one exists, otherwise returns the same chord name that was passed instatic IntervalsgetIntervals(String name) intstatic intgetInversionFromChordString(String chordString) Returns a count of the number of carets at the end of the chord string.Note[]getNotes()Returns a patterngetRoot()booleanisMajor()booleanisMinor()static booleanisValidChord(String candidateChordMusicString) Returns true if the passed string contains a note, a known chord, and optionally an octave or duration.static voidputHumanReadable(String chordName, String humanReadableName) static voidremoveChord(String name) setBassNote(String newBass) setBassNote(Note newBass) Although setBassNote takes a Note, it doesn't just set a local value to the incoming note.setInversion(int nth) setOctave(int octave) Returns a string consisting of the notes in the chord.toString()
-
Field Details
-
chordMap
-
humanReadableMap
-
MAJOR_INTERVALS
-
MINOR_INTERVALS
-
DIMINISHED_INTERVALS
-
MAJOR_SEVENTH_INTERVALS
-
MINOR_SEVENTH_INTERVALS
-
DIMINISHED_SEVENTH_INTERVALS
-
MAJOR_SEVENTH_SIXTH_INTERVALS
-
MINOR_SEVENTH_SIXTH_INTERVALS
-
-
Constructor Details
-
Chord
-
Chord
-
Chord
-
Chord
-
-
Method Details
-
getChordNames
-
addChord
-
addChord
-
getIntervals
-
removeChord
-
getChordType
-
putHumanReadable
-
getHumanReadableName
-
isValidChord
Returns true if the passed string contains a note, a known chord, and optionally an octave or duration. -
fromNotes
-
fromNotes
-
fromNotes
-
getRoot
-
getIntervals
-
getInversion
public int getInversion() -
setInversion
-
setBassNote
-
setBassNote
Although setBassNote takes a Note, it doesn't just set a local value to the incoming note. Instead, it uses the incoming note to compute the inversion for this chord, and sets the inversion. getBassNote() reconstructs the bass note using the inversion. If the rootNote is null, this method returns without taking any action. -
getBassNote
-
setOctave
-
getNotes
-
getChordType
-
getInversionFromChordString
Returns a count of the number of carets at the end of the chord string. Given Cmaj^^, this will return 2. -
getPattern
Description copied from interface:PatternProducerReturns a pattern- Specified by:
getPatternin interfacePatternProducer
-
getPatternWithNotes
-
getPatternWithNotesExceptRoot
-
getPatternWithNotesExceptBass
-
isMajor
public boolean isMajor() -
isMinor
public boolean isMinor() -
equals
-
toString
-
toNoteString
Returns a string consisting of the notes in the chord. For example, new Chord("Cmaj").toNoteString() returns "(C+E+G)" TODO: Update with Java 8 String Joiner -
toHumanReadableString
-
toDebugString
-