|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ritornello.core.conceitual.Interval
Field Summary | |
static int |
AUG_4TH_SEMITONES
The aug 4th / dim 5th semitones value. |
static int |
MAJOR_2ND_SEMITONES
The major 2nd semitones value. |
static int |
MAJOR_3RD_SEMITONES
The major 3rd semitones value. |
static int |
MAJOR_6TH_SEMITONES
The major 6th semitones value. |
static int |
MAJOR_7TH_SEMITONES
The major 7th semitones value. |
static int |
MINOR_2ND_SEMITONES
The minor 2nd semitones value. |
static int |
MINOR_3RD_SEMITONES
The minor 3rd semitones value. |
static int |
MINOR_6TH_SEMITONES
The minor 6th semitones value. |
static int |
MINOR_7TH_SEMITONES
The minor 7th semitones value. |
static int |
OCTAVE_SEMITONES
The number of semitones within an octave. |
static int |
PERFECT_4TH_SEMITONES
The perfect 4th semitones value. |
static int |
PERFECT_5TH_SEMITONES
The perfect 5th semitones value. |
static int |
UNISON_SEMITONES
The unison semitones value. |
Constructor Summary | |
Interval(int semitones)
Constructor. |
Method Summary | |
static int |
calculateLongestNoteInterval(Note note1,
Note note2)
Calculates the longest interval between two notes. |
static int |
calculateNoteBackwardInterval(Note rootNote,
Note secondNote)
Calculates the semitones between two notes in a backward deslocation. |
static int |
calculateNoteFowardInterval(Note rootNote,
Note secondNote)
Calculates the semitones between two notes in a foward deslocation. |
static Note |
calculateNoteInterval(Note rootNote,
int semitones)
Calculates a note, given its root note and circular descolation (e.g. in a circular environment, a deslocation VALUE = 0 and VALUE=12 have the same result). |
static PlayableNote |
calculatePlayableNoteInterval(PlayableNote rootNote,
int semitones)
Calculates the second note, given its root note and semitones interval. |
static int |
calculatePlayableNoteInterval(PlayableNote note1,
PlayableNote note2)
Calculates the interval. |
static int |
calculateShortestNoteInterval(Note note1,
Note note2)
Calculates the shortest interval between two notes. |
static java.util.Vector |
getEnharmonicsList(Note note)
Calculates all enharmonic notes, given a single note. |
java.lang.String |
getName()
Assign an interval name, given its semitones number. |
int |
getSemitones()
Returns the semitones value. |
static boolean |
isEnharmonic(Note note1,
Note note2)
Verifies if two given note are enharmonics. |
static void |
main(java.lang.String[] argv)
Test unit. |
void |
setSemitones(int semitones)
Set the interval kind. |
java.lang.String |
toString()
Retrieves the interval name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int OCTAVE_SEMITONES
public static final int UNISON_SEMITONES
public static final int MINOR_2ND_SEMITONES
public static final int MAJOR_2ND_SEMITONES
public static final int MINOR_3RD_SEMITONES
public static final int MAJOR_3RD_SEMITONES
public static final int PERFECT_4TH_SEMITONES
public static final int AUG_4TH_SEMITONES
public static final int PERFECT_5TH_SEMITONES
public static final int MINOR_6TH_SEMITONES
public static final int MAJOR_6TH_SEMITONES
public static final int MINOR_7TH_SEMITONES
public static final int MAJOR_7TH_SEMITONES
Constructor Detail |
public Interval(int semitones)
semitones
- - Number of semitones for the interval.Method Detail |
public java.lang.String getName()
public void setSemitones(int semitones)
semitones
- - The number of semitones between the notes in a interval.public int getSemitones()
public static int calculateShortestNoteInterval(Note note1, Note note2)
note1
- - The first note.note2
- - The second note.
public static int calculateLongestNoteInterval(Note note1, Note note2)
note1
- - The first note.note2
- - The second note.
public static int calculateNoteFowardInterval(Note rootNote, Note secondNote)
rootNote
- - The root note.secondNote
- - The second note.
public static int calculateNoteBackwardInterval(Note rootNote, Note secondNote)
rootNote
- - The root note.secondNote
- - The second note.
public static Note calculateNoteInterval(Note rootNote, int semitones) throws ValidationException
rootNote
- - The inicial note.semitones
- - The semitones deslocation. The negative deslocation means
backward steps.
ValidationException
public static PlayableNote calculatePlayableNoteInterval(PlayableNote rootNote, int semitones) throws ValidationException
rootNote
- - The root note.semitones
- - The semitones deslocation. The negative deslocation means
backward steps.
ValidationException
public static int calculatePlayableNoteInterval(PlayableNote note1, PlayableNote note2)
note1
- - The first note in a interval.note2
- - The second note in a interval.
public static boolean isEnharmonic(Note note1, Note note2)
note1
- - Note number one.note2
- - Note number two.
public static java.util.Vector getEnharmonicsList(Note note) throws ValidationException
note
- - The note.
ValidationException
public static void main(java.lang.String[] argv)
argv
- - The command line arguments.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |