Packageorg.si.sion.utils
Classpublic class Chord
InheritanceChord Inheritance Scale Inheritance Object

Chord class.



Public Properties
 PropertyDefined By
  bassNote : int
[override] bass note number, lowest note of "On Chord".
Chord
 InheritedcenterOctave : int
center octave
Scale
  name : String
[override] Chord name.
Chord
 InheritedrootNote : int
root note number
Scale
Protected Properties
 PropertyDefined By
  _bassNoteOffset : int
bass note offset from root
Chord
  _chordTableDictionary : *
[static] chord table dictionary
Chord
 Inherited_defaultCenterOctave : int
default center octave, this apply when there are no octave specification.
Scale
 Inherited_noteNames : Array
[static] note names
Scale
 Inherited_scaleName : String
scale name
Scale
 Inherited_scaleNotes : Vector.<int>
notes on the scale
Scale
 Inherited_scaleTable : int
scale table
Scale
 Inherited_scaleTableDictionary : *
[static] scale table dictionary
Scale
 Inherited_tensionNotes : Vector.<int>
notes on 1octave upper scale
Scale
Public Methods
 MethodDefined By
  
Chord(chordName:String, defaultCenterOctave:int = 5)
constructor
Chord
 Inherited
check(note:int):Boolean
check note availability on this scale.
Scale
  
[override] copy from another chord
Chord
 Inherited
getNote(index:int):int
get note by index on this scale.
Scale
 Inherited
getScaleIndex(note:int):int
get scale index from note.
Scale
 Inherited
setScaleTable(name:String, rootNote:int, table:Array):void
set scale table manualy.
Scale
 Inherited
shift(note:int):int
shift note to the nearest note on this scale.
Scale
Protected Methods
 MethodDefined By
  
_errorInvalidChordName(name:String):Error
Invalid chord name error
Chord
 Inherited
_errorInvalidScaleName(name:String):Error
Invalid scale name error
Scale
Protected Constants
 ConstantDefined By
  CT_69TH : int = 0x1204211
[static] Chord table of C69
Chord
  CT_7TH : int = 0x0490491
[static] Chord table of C7
Chord
  CT_9TH : int = 0x0484491
[static] Chord table of C9
Chord
  CT_ADD9 : int = 0x1084091
[static] Chord table of Cadd9
Chord
  CT_AUG : int = 0x1111111
[static] Chord table of Carg
Chord
  CT_DIM : int = 0x1489489
[static] Chord table of Cdim
Chord
  CT_MAJ7 : int = 0x0890891
[static] Chord table of CM7
Chord
  CT_MAJ9 : int = 0x0884891
[static] Chord table of CM9
Chord
  CT_MAJOR : int = 0x1091091
[static] Chord table of C
Chord
  CT_MIN69 : int = 0x1204209
[static] Chord table of Cm69
Chord
  CT_MIN7 : int = 0x0488489
[static] Chord table of Cm7
Chord
  CT_MIN9 : int = 0x0484489
[static] Chord table of Cm9
Chord
  CT_MINADD9 : int = 0x1084089
[static] Chord table of Cmadd9
Chord
  CT_MINOR : int = 0x1089089
[static] Chord table of Cm
Chord
  CT_MM7 : int = 0x0888889
[static] Chord table of CmM7
Chord
  CT_MM9 : int = 0x0884889
[static] Chord table of CmM9
Chord
  CT_SUS4 : int = 0x10a10a1
[static] Chord table of Csus4
Chord
  CT_SUS47 : int = 0x04a04a1
[static] Chord table of Csus47
Chord
 InheritedST_BLUE_NOTE : int = 0x14e94e9
[static] Scale table of Cb
Scale
 InheritedST_CHROMATIC : int = 0x1ffffff
[static] Scale table of Cc
Scale
 InheritedST_COMB_DIMINISH : int = 0x16db6db
[static] Scale table of Ccd
Scale
 InheritedST_DIMINISH : int = 0x1249249
[static] Scale table of Cd
Scale
 InheritedST_DORIAN : int = 0x16ad6ad
[static] Scale table of Cdor
Scale
 InheritedST_DPERFECT : int = 0x14a14a1
[static] Scale table of Csus47
Scale
 InheritedST_GYPSY : int = 0x19b39b3
[static] Scale table of Cgyp
Scale
 InheritedST_HANGARIAN : int = 0x1acdacd
[static] Scale table of Chan
Scale
 InheritedST_HARMONIC_MINOR : int = 0x19ad9ad
[static] Scale table of Chm
Scale
 InheritedST_JAPANESE : int = 0x14a54a5
[static] Scale table of Cjap
Scale
 InheritedST_LOCRIAN : int = 0x156b56b
[static] Scale table of Cloc
Scale
 InheritedST_LYDIAN : int = 0x1ad5ad5
[static] Scale table of Clyd
Scale
 InheritedST_MAJOR : int = 0x1ab5ab5
[static] Scale table of C
Scale
 InheritedST_MELODIC_MINOR : int = 0x1aadaad
[static] Scale table of Cmm
Scale
 InheritedST_MINOR : int = 0x15ad5ad
[static] Scale table of Cm
Scale
 InheritedST_MINOR_PENTATONIC : int = 0x14a94a9
[static] Scale table of Cmp
Scale
 InheritedST_MIXOLYDIAN : int = 0x16b56b5
[static] Scale table of Cmix
Scale
 InheritedST_PENTATONIC : int = 0x1295295
[static] Scale table of Cp
Scale
 InheritedST_PERFECT : int = 0x10a10a1
[static] Scale table of Csus4
Scale
 InheritedST_PHRIGIAN : int = 0x15ab5ab
[static] Scale table of Cphr
Scale
 InheritedST_POWER : int = 0x1081081
[static] Scale table of C5
Scale
 InheritedST_RYUKYU : int = 0x18b18b1
[static] Scale table of Cryu
Scale
 InheritedST_SPANISH : int = 0x15ab5ab
[static] Scale table of Cspa
Scale
 InheritedST_UNISON : int = 0x1001001
[static] Scale table of Cu
Scale
 InheritedST_WHOLE_TONE : int = 0x1555555
[static] Scale table of Cw
Scale
Property Detail
_bassNoteOffsetproperty
protected var _bassNoteOffset:int

bass note offset from root

_chordTableDictionaryproperty 
protected static var _chordTableDictionary:*

chord table dictionary

bassNoteproperty 
bassNote:int[override]

bass note number, lowest note of "On Chord".


Implementation
    public function get bassNote():int
    public function set bassNote(value:int):void
nameproperty 
name:String[override]

Chord name. The regular expression of name is /(o[0-9])?([A-Ga-g])([+#\-])?([a-z0-9]+)?(,[0-9]+[+#\-]?)?(,[0-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 chord as follows.

the 3rd letterschord
(no matching), majMajor chord
mMinor chord
77th chord
m7Minor 7th chord
M7Major 7th chord
mM7Minor major 7th chord
99th chord
m9Minor 9th chord
M9Major 9th chord
mM9Minor major 9th chord
add9Add 9th chord
madd9Minor add 9th chord
696,9th chord
m69Minor 6,9th chord
sus4Sus4 chord
sus47Sus4 7th chord
dimDiminish chord
argAugment chord
If you want to set "F sharp minor 7th", chordName = "F+m7".


Implementation
    public function get name():String
    public function set name(value:String):void
Constructor Detail
Chord()Constructor
public function Chord(chordName:String, defaultCenterOctave:int = 5)

constructor

Parameters
chordName:String — chord name.
 
defaultCenterOctave:int (default = 5) — default center octave, this apply when there are no octave specification.

See also

Method Detail
_errorInvalidChordName()method
protected function _errorInvalidChordName(name:String):Error

Invalid chord name error

Parameters

name:String

Returns
Error
copyFrom()method 
override public function copyFrom(src:Scale):Scale

copy from another chord

Parameters

src:Scale — another Chord instance copy from

Returns
Scale
Constant Detail
CT_69THConstant
protected static const CT_69TH:int = 0x1204211

Chord table of C69

CT_7THConstant 
protected static const CT_7TH:int = 0x0490491

Chord table of C7

CT_9THConstant 
protected static const CT_9TH:int = 0x0484491

Chord table of C9

CT_ADD9Constant 
protected static const CT_ADD9:int = 0x1084091

Chord table of Cadd9

CT_AUGConstant 
protected static const CT_AUG:int = 0x1111111

Chord table of Carg

CT_DIMConstant 
protected static const CT_DIM:int = 0x1489489

Chord table of Cdim

CT_MAJ7Constant 
protected static const CT_MAJ7:int = 0x0890891

Chord table of CM7

CT_MAJ9Constant 
protected static const CT_MAJ9:int = 0x0884891

Chord table of CM9

CT_MAJORConstant 
protected static const CT_MAJOR:int = 0x1091091

Chord table of C

CT_MIN69Constant 
protected static const CT_MIN69:int = 0x1204209

Chord table of Cm69

CT_MIN7Constant 
protected static const CT_MIN7:int = 0x0488489

Chord table of Cm7

CT_MIN9Constant 
protected static const CT_MIN9:int = 0x0484489

Chord table of Cm9

CT_MINADD9Constant 
protected static const CT_MINADD9:int = 0x1084089

Chord table of Cmadd9

CT_MINORConstant 
protected static const CT_MINOR:int = 0x1089089

Chord table of Cm

CT_MM7Constant 
protected static const CT_MM7:int = 0x0888889

Chord table of CmM7

CT_MM9Constant 
protected static const CT_MM9:int = 0x0884889

Chord table of CmM9

CT_SUS4Constant 
protected static const CT_SUS4:int = 0x10a10a1

Chord table of Csus4

CT_SUS47Constant 
protected static const CT_SUS47:int = 0x04a04a1

Chord table of Csus47