Previous Next Package
Class MIDIComposeUtil.Scale
java.lang.Object
|
+----MIDIComposeUtil.Scale
- public class Scale
- extends Object
Scale helps you to get pitches for a certain scale.
-
MAJOR
-
-
MINOR
-
-
HARMONIC_MINOR
-
-
MELODIC_MINOR
-
-
GIPSY_MINOR
-
-
IONIC
- Equal to MAJOR.
-
DORIC
-
-
PHRYGIC
-
-
LYDIC
-
-
MIXOLYDIC
-
-
AEOLIC
- Equal to MINOR.
-
LOCRIC
-
-
MAJOR_PENTATONIC
-
-
MINOR_PENTATONIC
-
-
INDIAN_PENTATONIC
-
-
JAPANESE_PENTATONIC
-
-
BLUES
-
-
WHOLETONE
-
-
SEMITONE_WHOLETONE
-
-
WHOLETONE_SEMITONE
-
-
CHROMATIC
-
-
Scale(int)
- Creates new Scale with key.
-
Scale(int, int)
- Creates new Scale with key and type.
-
key()
- Returns current key.
-
octave()
- Returns current root-octave.
-
pitch(int)
- Returns MIDI-pitch for Scale-pitch.
-
pitch(int, int)
- Returns MIDI-pitch for degree and octave.
-
setKey(int)
- Sets key.
-
setType(int)
- Sets type.
-
type()
- Returns current type.
Scale
public Scale(int key)
- Creates new MAJOR-typed Scale.
- Parameters:
- key - any int between 0 and 11 (C...B).
Scale
public Scale(int key,
int type)
- Creates new Scale.
- Parameters:
- key - any int between 0 and 11 (C...B).
- type - any defined scale-type (MAJOR, MINOR, ...).
key
public int key()
- Returns the current key.
- Returns:
- an int between 0 and 11 (C...B).
setKey
public void setKey(int key)
- Sets the key.
- Parameters:
- key - any int between 0 and 11 (C...B).
type
public int type()
- Returns the current type.
- Returns:
- an defined type (MAJOR, MINOR, ...).
setType
public void setType(int type)
- Sets the type.
- Parameters:
- type - any defined type (MAJOR, MINOR, ...).
octave
public int octave()
- Returns the number of notes in one octave (depending on type).
- Returns:
- an int between 5 and 12.
pitch
public int pitch(int degree,
int octave)
- Returns the MIDI-pitch for degree and octave.
- Parameters:
- degree - any int between 0 and octave()-1.
- octave - any int between 0 and 10.
- Returns:
- an int between 0 and 127.
pitch
public int pitch(int pitch)
- Returns the MIDI-pitch for Scale-pitch.
- Parameters:
- pitch - any Scale-pitch (>= 0, range depending on type).
- Returns:
- an int between 0 and 127.
Previous Next Package