| Property | Defined By | ||
|---|---|---|---|
| bassNote : int  bass note number   | Scale | ||
| centerOctave : int  center octave   | Scale | ||
| name : String  Scale name.  | Scale | ||
| rootNote : int  root note number   | Scale | ||
| Property | Defined By | ||
|---|---|---|---|
| _defaultCenterOctave : int  default center octave, this apply when there are no octave specification.  | Scale | ||
| _noteNames : Array [static]  note names   | Scale | ||
| _scaleName : String  scale name   | Scale | ||
| _scaleNotes : Vector.<int>  notes on the scale   | Scale | ||
| _scaleTable : int  scale table   | Scale | ||
| _scaleTableDictionary : * [static]  scale table dictionary   | Scale | ||
| _tensionNotes : Vector.<int>  notes on 1octave upper scale  | Scale | ||
| Method | Defined By | ||
|---|---|---|---|
Scale(scaleName:String, defaultCenterOctave:int = 5)  constructor 
            | Scale | ||
check(note:int):Boolean  check note availability on this scale.  | Scale | ||
 copy from another scale
            | Scale | ||
getNote(index:int):int  get note by index on this scale.  | Scale | ||
getScaleIndex(note:int):int  get scale index from note.  | Scale | ||
setScaleTable(name:String, rootNote:int, table:Array):void  set scale table manualy.  | Scale | ||
shift(note:int):int  shift note to the nearest note on this scale.  | Scale | ||
| Method | Defined By | ||
|---|---|---|---|
_errorInvalidScaleName(name:String):Error  Invalid scale name error   | Scale | ||
| Constant | Defined By | ||
|---|---|---|---|
| ST_BLUE_NOTE : int = 0x14e94e9 [static]  Scale table of Cb   | Scale | ||
| ST_CHROMATIC : int = 0x1ffffff [static]  Scale table of Cc   | Scale | ||
| ST_COMB_DIMINISH : int = 0x16db6db [static]  Scale table of Ccd   | Scale | ||
| ST_DIMINISH : int = 0x1249249 [static]  Scale table of Cd   | Scale | ||
| ST_DORIAN : int = 0x16ad6ad [static]  Scale table of Cdor   | Scale | ||
| ST_DPERFECT : int = 0x14a14a1 [static]  Scale table of Csus47   | Scale | ||
| ST_GYPSY : int = 0x19b39b3 [static]  Scale table of Cgyp   | Scale | ||
| ST_HANGARIAN : int = 0x1acdacd [static]  Scale table of Chan   | Scale | ||
| ST_HARMONIC_MINOR : int = 0x19ad9ad [static]  Scale table of Chm   | Scale | ||
| ST_JAPANESE : int = 0x14a54a5 [static]  Scale table of Cjap   | Scale | ||
| ST_LOCRIAN : int = 0x156b56b [static]  Scale table of Cloc   | Scale | ||
| ST_LYDIAN : int = 0x1ad5ad5 [static]  Scale table of Clyd   | Scale | ||
| ST_MAJOR : int = 0x1ab5ab5 [static]  Scale table of C   | Scale | ||
| ST_MELODIC_MINOR : int = 0x1aadaad [static]  Scale table of Cmm   | Scale | ||
| ST_MINOR : int = 0x15ad5ad [static]  Scale table of Cm   | Scale | ||
| ST_MINOR_PENTATONIC : int = 0x14a94a9 [static]  Scale table of Cmp   | Scale | ||
| ST_MIXOLYDIAN : int = 0x16b56b5 [static]  Scale table of Cmix   | Scale | ||
| ST_PENTATONIC : int = 0x1295295 [static]  Scale table of Cp   | Scale | ||
| ST_PERFECT : int = 0x10a10a1 [static]  Scale table of Csus4   | Scale | ||
| ST_PHRIGIAN : int = 0x15ab5ab [static]  Scale table of Cphr   | Scale | ||
| ST_POWER : int = 0x1081081 [static]  Scale table of C5   | Scale | ||
| ST_RYUKYU : int = 0x18b18b1 [static]  Scale table of Cryu   | Scale | ||
| ST_SPANISH : int = 0x15ab5ab [static]  Scale table of Cspa   | Scale | ||
| ST_UNISON : int = 0x1001001 [static]  Scale table of Cu   | Scale | ||
| ST_WHOLE_TONE : int = 0x1555555 [static]  Scale table of Cw   | Scale | ||
| _defaultCenterOctave | property | 
protected var _defaultCenterOctave:intdefault center octave, this apply when there are no octave specification.
| _noteNames | property | 
protected static var _noteNames:Arraynote names
| _scaleName | property | 
protected var _scaleName:Stringscale name
| _scaleNotes | property | 
protected var _scaleNotes:Vector.<int>notes on the scale
| _scaleTable | property | 
protected var _scaleTable:intscale table
| _scaleTableDictionary | property | 
protected static var _scaleTableDictionary:*scale table dictionary
| _tensionNotes | property | 
protected var _tensionNotes:Vector.<int>notes on 1octave upper scale
| bassNote | property | 
bassNote:intbass note number
    public function get bassNote():int    public function set bassNote(value:int):void| centerOctave | property | 
centerOctave:intcenter octave
    public function get centerOctave():int    public function set centerOctave(value:int):void| name | property | 
name:StringScale name. The regular expression of name is /(o[0-9])?([A-Ga-g])([+#\-])?([a-z0-9]+)?/. The 1st letter means center octave. default octave = 5 (when omit). The 2nd letter means root note. The 3nd letter (option) means note shift sign. "+" and "#" shift +1, "-" shifts -1. The 4th letters (option) means scale as follows.
| the 3rd letters | scale | 
|---|---|
| (no matching), ion | Major scale | 
| m, nm, aeo | Natural minor scale | 
| hm | Harmonic minor scale | 
| mm | Melodic minor scale | 
| p | Pentatonic scale | 
| mp | Minor pentatonic scale | 
| b | Blue note scale | 
| d | Diminish scale | 
| cd | Combination of diminish scale | 
| w | Whole tone scale | 
| c | Chromatic scale | 
| sus4 | table of sus4 chord | 
| sus47 | table of sus47 chord | 
| 5 | Power chord | 
| u | Unison (octave scale) | 
| dor | Dorian mode | 
| phr | Phrigian mode | 
| lyd | Lydian mode | 
| mix | Mixolydian mode | 
| loc | Locrian mode | 
| gyp | Gypsy scale | 
| spa | Spanish scale | 
| han | Hangarian scale | 
| jap | Japanese scale (Ritsu mode) | 
| ryu | Japanese scale (Ryukyu mode) | 
    public function get name():String    public function set name(value:String):void| rootNote | property | 
rootNote:introot note number
    public function get rootNote():int    public function set rootNote(value:int):void| Scale | () | Constructor | 
public function Scale(scaleName:String, defaultCenterOctave:int = 5)constructor
ParametersscaleName:String — scale name.
           | |
defaultCenterOctave:int (default = 5) — default center octave, this apply when there are no octave specification.
           | 
See also
| _errorInvalidScaleName | () | method | 
 protected function _errorInvalidScaleName(name:String):ErrorInvalid scale name error
Parameters
name:String | 
Error | 
| check | () | method | 
 public function check(note:int):Booleancheck note availability on this scale.
Parameters
note:int — MIDI note number (0-127).
           | 
Boolean — Returns true if the note is on this scale.
          | 
| copyFrom | () | method | 
 public function copyFrom(src:Scale):Scalecopy from another scale
Parameters
src:Scale — another Scale instance copy from
          | 
Scale | 
| getNote | () | method | 
 public function getNote(index:int):intget note by index on this scale.
Parameters
index:int — index on this scale. You can specify both posi and nega values.
           | 
int — MIDI note number on this scale.
          | 
| getScaleIndex | () | method | 
 public function getScaleIndex(note:int):intget scale index from note.
Parameters
note:int | 
int | 
| setScaleTable | () | method | 
 public function setScaleTable(name:String, rootNote:int, table:Array):voidset scale table manualy.
Parameters
name:String — name of this scale.
           | |
rootNote:int — root note of this scale.
           | |
table:Array | 
    var table:Array = [1,0,1,0,0,1,0,1,0,0,1,0];  // c,d,f,g,b- is available on "C japanese scale".
    scale.setScaleTable("Fjap", 65, table);       // 65="F"s note number
| shift | () | method | 
 public function shift(note:int):intshift note to the nearest note on this scale.
Parameters
note:int — MIDI note number (0-127).
           | 
int — Returns shifted note. if the note is on this scale, no shift.
          | 
| ST_BLUE_NOTE | Constant | 
protected static const ST_BLUE_NOTE:int = 0x14e94e9Scale table of Cb
| ST_CHROMATIC | Constant | 
protected static const ST_CHROMATIC:int = 0x1ffffffScale table of Cc
| ST_COMB_DIMINISH | Constant | 
protected static const ST_COMB_DIMINISH:int = 0x16db6dbScale table of Ccd
| ST_DIMINISH | Constant | 
protected static const ST_DIMINISH:int = 0x1249249Scale table of Cd
| ST_DORIAN | Constant | 
protected static const ST_DORIAN:int = 0x16ad6adScale table of Cdor
| ST_DPERFECT | Constant | 
protected static const ST_DPERFECT:int = 0x14a14a1Scale table of Csus47
| ST_GYPSY | Constant | 
protected static const ST_GYPSY:int = 0x19b39b3Scale table of Cgyp
| ST_HANGARIAN | Constant | 
protected static const ST_HANGARIAN:int = 0x1acdacdScale table of Chan
| ST_HARMONIC_MINOR | Constant | 
protected static const ST_HARMONIC_MINOR:int = 0x19ad9adScale table of Chm
| ST_JAPANESE | Constant | 
protected static const ST_JAPANESE:int = 0x14a54a5Scale table of Cjap
| ST_LOCRIAN | Constant | 
protected static const ST_LOCRIAN:int = 0x156b56bScale table of Cloc
| ST_LYDIAN | Constant | 
protected static const ST_LYDIAN:int = 0x1ad5ad5Scale table of Clyd
| ST_MAJOR | Constant | 
protected static const ST_MAJOR:int = 0x1ab5ab5Scale table of C
| ST_MELODIC_MINOR | Constant | 
protected static const ST_MELODIC_MINOR:int = 0x1aadaadScale table of Cmm
| ST_MINOR | Constant | 
protected static const ST_MINOR:int = 0x15ad5adScale table of Cm
| ST_MINOR_PENTATONIC | Constant | 
protected static const ST_MINOR_PENTATONIC:int = 0x14a94a9Scale table of Cmp
| ST_MIXOLYDIAN | Constant | 
protected static const ST_MIXOLYDIAN:int = 0x16b56b5Scale table of Cmix
| ST_PENTATONIC | Constant | 
protected static const ST_PENTATONIC:int = 0x1295295Scale table of Cp
| ST_PERFECT | Constant | 
protected static const ST_PERFECT:int = 0x10a10a1Scale table of Csus4
| ST_PHRIGIAN | Constant | 
protected static const ST_PHRIGIAN:int = 0x15ab5abScale table of Cphr
| ST_POWER | Constant | 
protected static const ST_POWER:int = 0x1081081Scale table of C5
| ST_RYUKYU | Constant | 
protected static const ST_RYUKYU:int = 0x18b18b1Scale table of Cryu
| ST_SPANISH | Constant | 
protected static const ST_SPANISH:int = 0x15ab5abScale table of Cspa
| ST_UNISON | Constant | 
protected static const ST_UNISON:int = 0x1001001Scale table of Cu
| ST_WHOLE_TONE | Constant | 
protected static const ST_WHOLE_TONE:int = 0x1555555Scale table of Cw