Package org.jjazz.harmony.api
Class Scale
java.lang.Object
org.jjazz.harmony.api.Scale
- Direct Known Subclasses:
StandardScale
A list of notes. Example: name=MajorPentatonic and startNote=Eb represent the scale Eb, F, G, Bb, C
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDegree
(int relPitch) Get the scale degree corresponding to specified relative pitch, if any.The list of degrees composing this scale.Get the scale degrees corresponding to a natural degree.For example for scale [C,D,E,G,A], intervals=[2,2,3,2]getName()
getNotes()
The list of notes starting on middle C (60).The list of ascending notes starting on the specified note.toString()
-
Constructor Details
-
Scale
Create a scale from a list of degrees.- Parameters:
name
-degs
- The ascending unique degrees starting with ROOT.
-
-
Method Details
-
getName
-
getNotes
The list of notes starting on middle C (60).- Returns:
-
getNotes
The list of ascending notes starting on the specified note.- Parameters:
startNote
-- Returns:
- Returned notes reuse startNote's duration, velocity and Alteration.
-
getDegrees
The list of degrees composing this scale.- Returns:
-
getIntervals
For example for scale [C,D,E,G,A], intervals=[2,2,3,2]- Returns:
- A list of intervals between notes (size=nb of notes-1)
-
getDegree
Get the scale degree corresponding to specified relative pitch, if any.- Parameters:
relPitch
-- Returns:
- A degree or null.
-
getDegrees
Get the scale degrees corresponding to a natural degree.Ex: n=NINTH, scale=MAJOR/IONIAN => return NINTH
Ex: n=NINTH, scale=PHRYGIAN => return NINTH_FLAT
Ex: n=NINTH, scale=ALTERED => return NINTH_FLAT and NINTH_SHARP
Ex: n=THIRTEENH, scale=PENTATONIC_MINOR => return an empty list- Parameters:
n
- A natural degree- Returns:
- A list of degrees. List size is usually 1, possibly 2 or 0.
-
toString
-