|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ritornello.core.conceitual.Scale
Field Summary | |
static int |
CHROMATIC
The chromatic code. |
static int |
MAJOR
The major scale code. |
static int |
MINOR_HARMONIC
The minor harmonic scale code. |
static int |
MINOR_MELODIC
The minor melodic scale code. |
Constructor Summary | |
Scale(Note root)
Constructor. |
Method Summary | |
void |
addElement(java.lang.Object object)
|
static Scale |
getChromatic(Note root)
Returns a build chromatic scale, given its root. |
java.util.Iterator |
getElements()
|
java.util.Vector |
getIntervalList()
Returns a list of all intervals of the given scale. |
static Scale |
getMajor(Note root)
Returns a build major scale, given its root. |
static Scale |
getMinorHarmonic(Note root)
Returns a build minor harmonic scale, given its root. |
static Scale |
getMinorMelodic(Note root)
Returns a build minor melodic scale, given its root. |
java.lang.String |
getName()
Retrieves the scale name. |
Note |
getNoteByDegree(int degree)
Retrieves a note from scale, given its degree. |
Note |
getRoot()
Returns the scale root note. |
Chord |
getTriadByDegree(int degree)
Retrieves a chord, given its degree in scale. |
int |
getValue()
Retrieves the scale code (e.g. 0=CHROMATIC; 1=MAJOR,...). |
static void |
main(java.lang.String[] argv)
Test unit. |
void |
removeAllElements()
|
boolean |
removeElement(java.lang.Object object)
|
void |
setRoot(Note root)
Sets the scale's 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 MAJOR
public static final int MINOR_MELODIC
public static final int MINOR_HARMONIC
public static final int CHROMATIC
Constructor Detail |
public Scale(Note root)
root
- - The root note.Method Detail |
public static Scale getChromatic(Note root) throws ValidationException, IncompatibleElementException
root
- - The root note.
ValidationException
IncompatibleElementException
public static Scale getMinorHarmonic(Note root) throws ValidationException, IncompatibleElementException
root
- - The root note.
ValidationException
IncompatibleElementException
public static Scale getMajor(Note root) throws ValidationException, IncompatibleElementException
root
- - The root note.
ValidationException
IncompatibleElementException
public static Scale getMinorMelodic(Note root) throws ValidationException, IncompatibleElementException
root
- - The root note.
ValidationException
IncompatibleElementException
public java.util.Vector getIntervalList() throws ValidationException
ValidationException
public Note getRoot()
public void setRoot(Note root)
root
- - The root note.public java.lang.String getName() throws ValidationException
ValidationException
public boolean removeElement(java.lang.Object object)
removeElement
in interface Collection
object
-
public void removeAllElements()
removeAllElements
in interface Collection
public int getValue() throws ValidationException
ValidationException
public static void main(java.lang.String[] argv)
argv
- - The command line arguments.public void addElement(java.lang.Object object) throws IncompatibleElementException, ValidationException
addElement
in interface Collection
object
-
IncompatibleElementException
ValidationException
public java.util.Iterator getElements()
getElements
in interface Collection
public Note getNoteByDegree(int degree)
degree
- - The note degree in a scale.
public Chord getTriadByDegree(int degree) throws IncompatibleElementException, ValidationException
degree
- - The scale degree.
IncompatibleElementException
ValidationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |