Packageorg.si.sion.midi
Classpublic class MIDIModule
InheritanceMIDIModule Inheritance Object

MIDI sound module



Public Properties
 PropertyDefined By
  activeOperatorCount : int
[read-only] active operator count
MIDIModule
  drumVoiceSet : Vector.<SiONVoice>
voice set for drum track.
MIDIModule
  freeOperatorCount : int
[read-only] free operator count
MIDIModule
  midiChannelCount : int
MIDI channel count, port number is reset when channel count is changed.
MIDIModule
  midiChannels : Vector.<MIDIModuleChannel>
MIDI channels
MIDIModule
  onFinishSequence : Function = null
Finish sequence callback, should be function() : void.
MIDIModule
  onNRPN : Function = null
NRPN callback, should be function(channelNum:int, nrpn:int, dataEntry:int) : void.
MIDIModule
  onSysEx : Function = null
System exclusize callback, should be function(channelNum:int, bytes:ByteArray) : void.
MIDIModule
  polyphony : int
polyphony
MIDIModule
  portNumber : int
port number
MIDIModule
  systemExclusiveMode : String
System exclusive mode
MIDIModule
  voiceSet : Vector.<SiONVoice>
voice set for GM 128 voices.
MIDIModule
Public Methods
 MethodDefined By
  
MIDIModule(polyphony:int = 32, midiChannelCount:int = 16, systemExclusiveMode:String)
MIDI sound module emulator
MIDIModule
  
channelAfterTouch(channelNum:int, value:int):void
channel after touch
MIDIModule
  
checkByteArray(bytes:ByteArray, checkPattern:Array, position:int = -1):Boolean
[static] check ByteArray pattern by usigned byte
MIDIModule
  
controlChange(channelNum:int, controlerNumber:int, data:int):void
control change
MIDIModule
  
enableDrumNoteOff(voiceNumbers:Array, enable:Boolean = true):void
enable drum note off.
MIDIModule
  
noteOff(channelNum:int, note:int, velocity:int = 0):void
note off
MIDIModule
  
noteOn(channelNum:int, note:int, velocity:int = 64):void
note on
MIDIModule
  
pitchBend(channelNum:int, bend:int):void
pitch bned
MIDIModule
  
programChange(channelNum:int, programNumber:int):void
program change
MIDIModule
  
reset all channels
MIDIModule
  
setDefaultEffector(slot:int, effectorList:Array):void
set default effector set.
MIDIModule
  
setDrumExclusiveGroup(groupID:int, voiceNumbers:Array):void
set exclusive drum voice.
MIDIModule
  
Set drum voice by sampler table
MIDIModule
  
systemExclusive(channelNum:int, bytes:ByteArray):void
system exclusive
MIDIModule
Public Constants
 ConstantDefined By
  GM_MODE : String = GMmode
[static] General MIDI mode
MIDIModule
  GS_MODE : String = GSmode
[static] Roland GS system exclusive mode
MIDIModule
  XG_MODE : String = XGmode
[static] YAMAHA XG system exclusive mode
MIDIModule
Property Detail
activeOperatorCountproperty
activeOperatorCount:int  [read-only]

active operator count


Implementation
    public function get activeOperatorCount():int
drumVoiceSetproperty 
public var drumVoiceSet:Vector.<SiONVoice>

voice set for drum track.

freeOperatorCountproperty 
freeOperatorCount:int  [read-only]

free operator count


Implementation
    public function get freeOperatorCount():int
midiChannelCountproperty 
midiChannelCount:int

MIDI channel count, port number is reset when channel count is changed.


Implementation
    public function get midiChannelCount():int
    public function set midiChannelCount(value:int):void
midiChannelsproperty 
public var midiChannels:Vector.<MIDIModuleChannel>

MIDI channels

onFinishSequenceproperty 
public var onFinishSequence:Function = null

Finish sequence callback, should be function() : void.

onNRPNproperty 
public var onNRPN:Function = null

NRPN callback, should be function(channelNum:int, nrpn:int, dataEntry:int) : void.

onSysExproperty 
public var onSysEx:Function = null

System exclusize callback, should be function(channelNum:int, bytes:ByteArray) : void.

polyphonyproperty 
polyphony:int

polyphony


Implementation
    public function get polyphony():int
    public function set polyphony(value:int):void
portNumberproperty 
portNumber:int

port number


Implementation
    public function get portNumber():int
    public function set portNumber(value:int):void
systemExclusiveModeproperty 
systemExclusiveMode:String

System exclusive mode


Implementation
    public function get systemExclusiveMode():String
    public function set systemExclusiveMode(value:String):void
voiceSetproperty 
public var voiceSet:Vector.<SiONVoice>

voice set for GM 128 voices.

Constructor Detail
MIDIModule()Constructor
public function MIDIModule(polyphony:int = 32, midiChannelCount:int = 16, systemExclusiveMode:String)

MIDI sound module emulator

Parameters
polyphony:int (default = 32) — polyphony
 
midiChannelCount:int (default = 16) — MIDI channel count
 
systemExclusiveMode:String
Method Detail
channelAfterTouch()method
public function channelAfterTouch(channelNum:int, value:int):void

channel after touch

Parameters

channelNum:int
 
value:int

checkByteArray()method 
public static function checkByteArray(bytes:ByteArray, checkPattern:Array, position:int = -1):Boolean

check ByteArray pattern by usigned byte

Parameters

bytes:ByteArray
 
checkPattern:Array
 
position:int (default = -1)

Returns
Boolean
controlChange()method 
public function controlChange(channelNum:int, controlerNumber:int, data:int):void

control change

Parameters

channelNum:int
 
controlerNumber:int
 
data:int

enableDrumNoteOff()method 
public function enableDrumNoteOff(voiceNumbers:Array, enable:Boolean = true):void

enable drum note off. default value is false

Parameters

voiceNumbers:Array — list of voice number that enables note off
 
enable:Boolean (default = true)

noteOff()method 
public function noteOff(channelNum:int, note:int, velocity:int = 0):void

note off

Parameters

channelNum:int
 
note:int
 
velocity:int (default = 0)

noteOn()method 
public function noteOn(channelNum:int, note:int, velocity:int = 64):void

note on

Parameters

channelNum:int
 
note:int
 
velocity:int (default = 64)

pitchBend()method 
public function pitchBend(channelNum:int, bend:int):void

pitch bned

Parameters

channelNum:int
 
bend:int

programChange()method 
public function programChange(channelNum:int, programNumber:int):void

program change

Parameters

channelNum:int
 
programNumber:int

resetAllChannels()method 
public function resetAllChannels():void

reset all channels

setDefaultEffector()method 
public function setDefaultEffector(slot:int, effectorList:Array):void

set default effector set.

Parameters

slot:int — slot to set
 
effectorList:Array — Array of inherit class of SiEffectBase

setDrumExclusiveGroup()method 
public function setDrumExclusiveGroup(groupID:int, voiceNumbers:Array):void

set exclusive drum voice. Voice that has same groupID stops each other when it sounds.

Parameters

groupID:int — 0 means no group. 1-15 are available.
 
voiceNumbers:Array — list of voice number that have same groupID

setDrumSamplerTable()method 
public function setDrumSamplerTable(table:SiOPMWaveSamplerTable):void

Set drum voice by sampler table

Parameters

table:SiOPMWaveSamplerTable — sampler table class, ussualy get from SiONSoundFont

See also

SiONSoundFont
systemExclusive()method 
public function systemExclusive(channelNum:int, bytes:ByteArray):void

system exclusive

Parameters

channelNum:int
 
bytes:ByteArray

Constant Detail
GM_MODEConstant
public static const GM_MODE:String = GMmode

General MIDI mode

GS_MODEConstant 
public static const GS_MODE:String = GSmode

Roland GS system exclusive mode

XG_MODEConstant 
public static const XG_MODE:String = XGmode

YAMAHA XG system exclusive mode