|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ritornello.core.conceitual.Chord
Field Summary | |
static int |
AUG_5TH
The aug triad representation. |
static int |
DIM_5TH
The dim triad representation. |
static int |
FLAT_13TH
The b13 dissonance representation. |
static int |
FLAT_9TH
The b9 dissonance representation. |
static int |
MAJOR_3RD
The major triad representation. |
static int |
MAJOR_7TH
The maj 7th tetrad representation. |
static int |
MINOR_3RD
The minor triad representation. |
static int |
MINOR_7TH
The min 7th tetrad representation. |
static int |
NATURAL_11TH
The 11 dissonance representation. |
static int |
NATURAL_13TH
The 13 dissonance representation. |
static int |
NATURAL_9TH
The 9 dissonance representation. |
static int |
PERFECT_5TH
The perfect triad representation. |
static int |
SHARP_11TH
The #11 dissonance representation. |
static int |
SHARP_9TH
The #9 dissonance representation. |
Constructor Summary | |
Chord(Note root)
Constructor. |
Method Summary | |
void |
addElement(int type)
Adds an element by its respective type. |
void |
addElement(java.lang.Object object)
|
java.util.Iterator |
getElements()
|
Note |
getFifth()
Retrieves the fifth from chord. |
int |
getFifthType()
Returns the fifth type from the selected chord. |
static Chord |
getMajor(Note root)
Retrieves a major chord, given its root note. |
static Chord |
getMinor(Note root)
Retrieves a minor chord, given its root. |
java.lang.String |
getName()
Retrieves the chord name. |
java.util.Iterator |
getOtherChordsWithSameNotes()
Retrieves other chords with same notes. |
Note |
getRoot()
Retrieves the root note. |
Note |
getSeventh()
Retrieves the seventh from chord. |
int |
getSeventhType()
Returns the seventh type from the selected chord. |
Note |
getThird()
Retrieves the third from chord. |
int |
getThirdType()
Returns the third type from the selected chord. |
static java.lang.String |
getTypeName(int type)
Retrieves chord type name. |
static java.lang.String |
getTypeRepresentation(int type,
boolean showHidden)
Retrieves chord type representation. |
static void |
main(java.lang.String[] argv)
Test unit. |
void |
removeAllElements()
|
boolean |
removeElement(java.lang.Object object)
|
void |
setRoot(Note root)
Sets the root note. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MINOR_3RD
public static final int MAJOR_3RD
public static final int DIM_5TH
public static final int PERFECT_5TH
public static final int AUG_5TH
public static final int MINOR_7TH
public static final int MAJOR_7TH
public static final int FLAT_9TH
public static final int NATURAL_9TH
public static final int SHARP_9TH
public static final int NATURAL_11TH
public static final int SHARP_11TH
public static final int FLAT_13TH
public static final int NATURAL_13TH
Constructor Detail |
public Chord(Note root)
root
- - The root note.Method Detail |
public java.lang.String getName() throws ValidationException
ValidationException
public static Chord getMajor(Note root) throws ValidationException, IncompatibleElementException
root
- - The root note.
ValidationException
IncompatibleElementException
public static Chord getMinor(Note root) throws ValidationException, IncompatibleElementException
root
- - The root note.
ValidationException
IncompatibleElementException
public static void main(java.lang.String[] argv)
argv
- - Command line arguments.public void setRoot(Note root)
root
- - The root note.public Note getRoot()
public void addElement(java.lang.Object object) throws IncompatibleElementException, ValidationException
addElement
in interface Collection
object
-
IncompatibleElementException
ValidationException
public boolean removeElement(java.lang.Object object)
removeElement
in interface Collection
object
-
public void removeAllElements()
removeAllElements
in interface Collection
public java.util.Iterator getElements()
getElements
in interface Collection
public int getThirdType() throws ValidationException
ValidationException
public int getFifthType() throws ValidationException
ValidationException
public int getSeventhType() throws ValidationException
ValidationException
public Note getThird()
public Note getFifth()
public Note getSeventh()
public void addElement(int type) throws IncompatibleElementException, ValidationException
type
- The element type. Ex.: MINOR_3RD, MAJOR_3RD etc.
IncompatibleElementException
ValidationException
public static java.lang.String getTypeRepresentation(int type, boolean showHidden) throws ValidationException
type
- The chord type code.showHidden
- For certain king of chord types, the representation is optional. If "true", its representation is shown.
ValidationException
public static java.lang.String getTypeName(int type) throws ValidationException
type
- The chord type code.
ValidationException
public java.util.Iterator getOtherChordsWithSameNotes() throws ValidationException, IncompatibleElementException
ValidationException
IncompatibleElementException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |