Class StandardScaleInstance
java.lang.Object
org.jjazz.harmony.api.StandardScaleInstance
- All Implemented Interfaces:
Serializable
A standard scale (e.g. Mixolydian) with a start note (e.g. Eb).
This is an immutable class.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis enables XStream instance configuration even for private classes or classes from non-public packages of Netbeans modules. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanEquals if same scale object and same relative pitch for start notes.Try to fit d to this scale.static DegreefitDegree(Degree d, StandardScaleInstance... ssis) Call fitDegree(d) on each of the StandardScaleInstance and return the first non-null result.getNotes()Get the notes that make the scale.Get the relative pitches of the notes that make the scale.getScale()getTransposed(int semitons) Return a copy transposed by t semitons.inthashCode()toString()
-
Constructor Details
-
StandardScaleInstance
-
-
Method Details
-
getScale
-
getStartNote
-
getTransposed
Return a copy transposed by t semitons.- Parameters:
semitons-- Returns:
-
getNotes
-
getRelativePitches
-
fitDegree
Try to fit d to this scale.1/ If d.getPitch() is part of this scale return the corresponding degree
Ex: d=NINTH_SHARP and scale=DORIAN, return THIRD_MINOR (same pitch)
2/ If 1/ dit not work, try to see a derived degree match
Ex: d=FIFTH and scale=ALTERED, return FIFTH_FLAT
- Parameters:
d-- Returns:
- A matching degree which belongs to this scale, or null.
-
equals
-
hashCode
-
toNoteString
-
toString
-
fitDegree
Call fitDegree(d) on each of the StandardScaleInstance and return the first non-null result.- Parameters:
d-ssis-- Returns:
- Can be null.
-