|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.org.toot.music.tonality.Chords
public class Chords
This class is effectively a database of known chords with static methods to retrieve particular chords. A Chord can be retrieved by symbol, spelling, name and intervals. Chords can also be identified from notes.
Nested Class Summary | |
---|---|
static class |
Chords.DefaultIdentifier
The DefaultIdentifier class provides the default implementation of withNotes(int[] notes) for Chord identification. |
static interface |
Chords.Identifier
The Identifier inner interface specified the contract for the class that implements withNotes(int[] notes) for Chord identification. |
Method Summary | |
---|---|
static void |
add(Chord aChord)
Add a Chord to the list of known chords. |
static void |
addChord(java.lang.String aSymbol,
java.lang.String aSpelling,
java.lang.String aName)
Add a new Chord to the list of known chords. |
static void |
checkIdentifiability()
Check all known Chords can be properly identified. |
static java.util.List<Chord> |
fromChordMode(int[] chordMode)
Return the List of Chords which are derived from the specifed chord mode. |
static void |
setChordIdentifer(Chords.Identifier identifier)
Permit an alternate Identifier to be plugged in in case DefaultIdentifier is unsuitable. |
static Chord |
withIntervals(int[] someIntervals)
Return the single Chord with the specified intervals |
static java.util.List<Chord.Voicing> |
withIntervals(int[] someIntervals,
int missing)
Return the List of Chord.Voicings with the specified intervals but with exactly 'missing' missing intervals. |
static Chord |
withName(java.lang.String aName)
Return the single Chord with the specified name. |
static java.util.List<Chord.PitchedVoicing> |
withNotes(int[] notes)
Return the List of Chord.PitchedVoicings with the specified notes |
static Chord |
withSpelling(java.lang.String aSpelling)
Return the single Chord that has the specified spelling. |
static Chord |
withSymbol(java.lang.String aSymbol)
Return the single Chord that has the specified symbol. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void setChordIdentifer(Chords.Identifier identifier)
identifier
- the Identifier to use to implement withNotes(int[] notes)public static void add(Chord aChord)
aChord
- the Chord to addpublic static void addChord(java.lang.String aSymbol, java.lang.String aSpelling, java.lang.String aName)
aSymbol
- the symbol of the Chord to be addedaSpelling
- the spelling of the Chord to be addedaName
- the name of the Cohord to be addedpublic static Chord withSymbol(java.lang.String aSymbol)
aSymbol
- the specified symbol to find
public static Chord withSpelling(java.lang.String aSpelling)
aSpelling
- the specified spelling to find
public static Chord withName(java.lang.String aName)
aName
- the specified name to find
public static Chord withIntervals(int[] someIntervals)
someIntervals
-
public static java.util.List<Chord.Voicing> withIntervals(int[] someIntervals, int missing)
someIntervals
- missing
- the number of intervals that must be missing
public static java.util.List<Chord.PitchedVoicing> withNotes(int[] notes)
notes
- the notes or pitches
public static java.util.List<Chord> fromChordMode(int[] chordMode)
chordMode
-
public static void checkIdentifiability()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |