Packageorg.si.sion
Classpublic class SiONVoice
InheritanceSiONVoice Inheritance SiMMLVoice Inheritance Object
Implements ISiOPMWaveInterface

SiONVoice class provides all of voice setting parameters of SiON.

See also

org.si.sion.module.SiOPMChannelParam
org.si.sion.module.SiOPMOperatorParam


Public Properties
 PropertyDefined By
 InheritedamDelay : int
amplitude modulation changing delay.
SiMMLVoice
 InheritedamDepth : int
amplitude modulation depth.
SiMMLVoice
 InheritedamDepthEnd : int
amplitude modulation depth after changing.
SiMMLVoice
 InheritedamTerm : int
amplitude modulation changing term.
SiMMLVoice
 InheritedchannelNum : int
channel number, 2nd argument of '%'.
SiMMLVoice
 InheritedchannelParam : SiOPMChannelParam
parameters for FM sound channel.
SiMMLVoice
 InheritedchipType : String
chip type
SiMMLVoice
 InheriteddefaultGateTicks : int
[Not implemented in current version] default absolute gate time (same as 1st argument of "@q" command), set -1 to ignore.
SiMMLVoice
 InheriteddefaultGateTime : Number
default gate time (same as "q" command 0.125), set Number.NaN to ignore.
SiMMLVoice
 InheriteddefaultKeyOnDelayTicks : int
[Not implemented in current version] default key on delay (same as 2nd argument "@q" command), set -1 to ignore.
SiMMLVoice
 Inheritedexpression : int
expression
SiMMLVoice
 InheritedexpressionMode : int
expression table mode (same as "%x" command).
SiMMLVoice
 InheritedisFMVoice : Boolean
[read-only] FM voice flag
SiMMLVoice
 InheritedisPCMVoice : Boolean
[read-only] PCM voice flag
SiMMLVoice
 InheritedisSamplerVoice : Boolean
[read-only] Sampler voice flag
SiMMLVoice
 InheritedisWaveTableVoice : Boolean
[read-only] wave table voice flag
SiMMLVoice
 InheritedmoduleType : int
module type, 1st argument of '%'.
SiMMLVoice
  name : String
voice name
SiONVoice
 InheritednoteOffAmplitudeEnvelop : SiMMLEnvelopTable
note off amplitude envelop table.
SiMMLVoice
 InheritednoteOffAmplitudeEnvelopStep : int
note off amplitude envelop tablestep.
SiMMLVoice
 InheritednoteOffFilterEnvelop : SiMMLEnvelopTable
note off filter envelop table.
SiMMLVoice
 InheritednoteOffFilterEnvelopStep : int
note off filter envelop tablestep.
SiMMLVoice
 InheritednoteOffNoteEnvelop : SiMMLEnvelopTable
note off note envelop table.
SiMMLVoice
 InheritednoteOffNoteEnvelopStep : int
note off note envelop tablestep.
SiMMLVoice
 InheritednoteOffPitchEnvelop : SiMMLEnvelopTable
note off pitch envelop table.
SiMMLVoice
 InheritednoteOffPitchEnvelopStep : int
note off pitch envelop tablestep.
SiMMLVoice
 InheritednoteOffToneEnvelop : SiMMLEnvelopTable
note off tone envelop table.
SiMMLVoice
 InheritednoteOffToneEnvelopStep : int
note off tone envelop tablestep.
SiMMLVoice
 InheritednoteOnAmplitudeEnvelop : SiMMLEnvelopTable
note on amplitude envelop table.
SiMMLVoice
 InheritednoteOnAmplitudeEnvelopStep : int
note on amplitude envelop tablestep.
SiMMLVoice
 InheritednoteOnFilterEnvelop : SiMMLEnvelopTable
note on filter envelop table.
SiMMLVoice
 InheritednoteOnFilterEnvelopStep : int
note on filter envelop tablestep.
SiMMLVoice
 InheritednoteOnNoteEnvelop : SiMMLEnvelopTable
note on note envelop table.
SiMMLVoice
 InheritednoteOnNoteEnvelopStep : int
note on note envelop tablestep.
SiMMLVoice
 InheritednoteOnPitchEnvelop : SiMMLEnvelopTable
note on pitch envelop table.
SiMMLVoice
 InheritednoteOnPitchEnvelopStep : int
note on pitch envelop tablestep.
SiMMLVoice
 InheritednoteOnToneEnvelop : SiMMLEnvelopTable
note on tone envelop table.
SiMMLVoice
 InheritednoteOnToneEnvelopStep : int
note on tone envelop tablestep.
SiMMLVoice
 InheritednoteShift : int
track key transpose (same as "kt" command).
SiMMLVoice
  param : Array
Get #@ parameters by Array
SiONVoice
  paramAL : Array
Get #AL@ parameters by Array
SiONVoice
  paramMA3 : Array
Get #MA@ parameters by Array
SiONVoice
  paramOPL : Array
Get #OPL@ parameters by Array
SiONVoice
  paramOPM : Array
Get #OPM@ parameters by Array
SiONVoice
  paramOPN : Array
Get #OPN@ parameters by Array
SiONVoice
  paramOPX : Array
Get #OPX@ parameters by Array
SiONVoice
 InheritedpitchShift : int
track pitch shift (same as "k" command).
SiMMLVoice
 InheritedpmDelay : int
pitch modulation changing delay.
SiMMLVoice
 InheritedpmDepth : int
pitch modulation depth.
SiMMLVoice
 InheritedpmDepthEnd : int
pitch modulation depth after changing.
SiMMLVoice
 InheritedpmsTension : int
PMS guitar tension
SiMMLVoice
 InheritedpmTerm : int
pitch modulation changing term.
SiMMLVoice
 Inheritedportament : int
portament.
SiMMLVoice
 InheritedpreferableNote : int
preferable note.
SiMMLVoice
 InheritedreleaseSweep : int
release sweep.
SiMMLVoice
 InheritedtoneNum : int
tone number, 1st argument of '@'.
SiMMLVoice
 InheritedupdateTrackParamaters : Boolean
update track paramaters, false to update only channel params.
SiMMLVoice
 InheritedupdateVolumes : Boolean
update volume, velocity, expression and panning when the voice is set.
SiMMLVoice
 InheritedvcommandShift : int
velocity table mode (same as 2nd argument of "%v" command).
SiMMLVoice
 Inheritedvelocity : int
velocity
SiMMLVoice
 InheritedvelocityMode : int
velocity table mode (same as 1st argument of "%v" command).
SiMMLVoice
 InheritedwaveData : SiOPMWaveBase
wave data.
SiMMLVoice
Public Methods
 MethodDefined By
  
SiONVoice(moduleType:int = 5, channelNum:int = 0, ar:int = 63, rr:int = 63, dt:int = 0, connectionType:int = -1, ws2:int = 0, dt2:int = 0)
create new SiONVoice instance with '%' parameters, attack rate, release rate and pitchShift.
SiONVoice
  
create clone voice.
SiONVoice
 Inherited
copy all parameters
SiMMLVoice
  
getMML(index:int, type:String = null, appendPostfixMML:Boolean = true):String
get FM voice setting MML.
SiONVoice
  
initialize():void
[override] initializer
SiONVoice
  
setAmplitudeModulation(depth:int = 0, end_depth:int = 0, delay:int = 0, term:int = 0):SiONVoice
Set amplitude modulation parameters (same as "ma" command of MML).
SiONVoice
  
setAnalogLike(connectionType:int, ws1:int = 1, ws2:int = 1, balance:int = 0, vco2pitch:int = 0):SiONVoice
Set as analog like synth voice.
SiONVoice
  
setByMML(mml:String):int
set FM voice by MML.
SiONVoice
  
setEnvelop(ar:int, dr:int, sr:int, rr:int, sl:int, tl:int):SiONVoice
Set envelop parameters of all operators.
SiONVoice
  
setFilterEnvelop(filterType:int = 0, cutoff:int = 128, resonance:int = 0, far:int = 0, fdr1:int = 0, fdr2:int = 0, frr:int = 0, fdc1:int = 128, fdc2:int = 64, fsc:int = 32, frc:int = 128):SiONVoice
Set filter envelop parameters.
SiONVoice
  
setLPFEnvelop(cutoff:int = 128, resonance:int = 0, far:int = 0, fdr1:int = 0, fdr2:int = 0, frr:int = 0, fdc1:int = 128, fdc2:int = 64, fsc:int = 32, frc:int = 128):SiONVoice
[Pleas use setFilterEnvelop() instead of this function].
SiONVoice
 Inherited
setModuleType(moduleType:int, channelNum:int = 0, toneNum:int = -1):void
set moduleType, channelNum, toneNum and 0th operator's pgType simultaneously.
SiMMLVoice
  
setMP3Voice(wave:Sound, ignoreNoteOff:Boolean = false, channelCount:int = 2):SiOPMWaveSamplerData
Set as Sampler voice (Sound without pitch shift, LPF envlope).
SiONVoice
  
setPCMVoice(data:*, samplingNote:int = 69, srcChannelCount:int = 2, channelCount:int = 0):SiOPMWavePCMData
Set as PCM voice (Sound with pitch shift, LPF envlope).
SiONVoice
  
setPCMWave(index:int, data:*, samplingNote:Number = 69, keyRangeFrom:int = 0, keyRangeTo:int = 127, srcChannelCount:int = 2, channelCount:int = 0):SiOPMWavePCMData
Set PCM wave data rederd by %7.
SiONVoice
  
setPitchModulation(depth:int = 0, end_depth:int = 0, delay:int = 0, term:int = 0):SiONVoice
Set amplitude modulation parameters (same as "mp" command of MML).
SiONVoice
  
setPMSGuitar(ar:int = 48, dr:int = 48, tl:int = 0, fixedPitch:int = 69, ws:int = 20, tension:int = 8):SiONVoice
Set as phisical modeling synth guitar voice.
SiONVoice
  
Set sampler table
SiONVoice
  
setSamplerWave(index:int, data:*, ignoreNoteOff:Boolean = false, pan:int = 0, srcChannelCount:int = 2, channelCount:int = 0):SiOPMWaveSamplerData
Set sampler wave data refered by %10.
SiONVoice
 Inherited
[NOT RECOMENDED] this function is only for compatibility of previous versions
SiMMLVoice
  
setWaveTable(data:Vector.<Number>):SiOPMWaveTable
Set wave table voice.
SiONVoice
 Inherited
update track's voice paramters
SiMMLVoice
Public Constants
 ConstantDefined By
  CHIPTYPE_ANALOG_LIKE : String = AnalogLike
[static]
SiONVoice
  CHIPTYPE_MA3 : String = MA3
[static]
SiONVoice
  CHIPTYPE_OPL : String = OPL
[static]
SiONVoice
  CHIPTYPE_OPM : String = OPM
[static]
SiONVoice
  CHIPTYPE_OPN : String = OPN
[static]
SiONVoice
  CHIPTYPE_OPX : String = OPX
[static]
SiONVoice
  CHIPTYPE_PMS_GUITAR : String = PMSGuitar
[static]
SiONVoice
  CHIPTYPE_SIOPM : String
[static]
SiONVoice
Property Detail
nameproperty
public var name:String

voice name

paramproperty 
param:Array

Get #@ parameters by Array


Implementation
    public function get param():Array
    public function set param(value:Array):void
paramALproperty 
paramAL:Array

Get #AL@ parameters by Array


Implementation
    public function get paramAL():Array
    public function set paramAL(value:Array):void
paramMA3property 
paramMA3:Array

Get #MA@ parameters by Array


Implementation
    public function get paramMA3():Array
    public function set paramMA3(value:Array):void
paramOPLproperty 
paramOPL:Array

Get #OPL@ parameters by Array


Implementation
    public function get paramOPL():Array
    public function set paramOPL(value:Array):void
paramOPMproperty 
paramOPM:Array

Get #OPM@ parameters by Array


Implementation
    public function get paramOPM():Array
    public function set paramOPM(value:Array):void
paramOPNproperty 
paramOPN:Array

Get #OPN@ parameters by Array


Implementation
    public function get paramOPN():Array
    public function set paramOPN(value:Array):void
paramOPXproperty 
paramOPX:Array

Get #OPX@ parameters by Array


Implementation
    public function get paramOPX():Array
    public function set paramOPX(value:Array):void
Constructor Detail
SiONVoice()Constructor
public function SiONVoice(moduleType:int = 5, channelNum:int = 0, ar:int = 63, rr:int = 63, dt:int = 0, connectionType:int = -1, ws2:int = 0, dt2:int = 0)

create new SiONVoice instance with '%' parameters, attack rate, release rate and pitchShift.

Parameters
moduleType:int (default = 5) — Module type. 1st argument of '%'.
 
channelNum:int (default = 0) — Channel number. 2nd argument of '%'.
 
ar:int (default = 63) — Attack rate (0-63).
 
rr:int (default = 63) — Release rate (0-63).
 
dt:int (default = 0) — pitchShift (64=1halftone).
 
connectionType:int (default = -1) — connection type of 2nd operator, -1 sets 1operator voice.
 
ws2:int (default = 0) — wave shape of 2nd operator.
 
dt2:int (default = 0) — pitchShift of 2nd operator (64=1halftone).
Method Detail
clone()method
public function clone():SiONVoice

create clone voice.

Returns
SiONVoice
getMML()method 
public function getMML(index:int, type:String = null, appendPostfixMML:Boolean = true):String

get FM voice setting MML.

Parameters

index:int — voice number.
 
type:String (default = null) — chip type. choose string from SiONVoice.CHIPTYPE_or null to detect automatically.
 
appendPostfixMML:Boolean (default = true) — append postfix MML of voice settings.

Returns
String — mml string of this voice setting.
initialize()method 
override public function initialize():void

initializer

setAmplitudeModulation()method 
public function setAmplitudeModulation(depth:int = 0, end_depth:int = 0, delay:int = 0, term:int = 0):SiONVoice

Set amplitude modulation parameters (same as "ma" command of MML).

Parameters

depth:int (default = 0) — start modulation depth (same as 1st argument)
 
end_depth:int (default = 0) — end modulation depth (same as 2nd argument)
 
delay:int (default = 0) — changing delay (same as 3rd argument)
 
term:int (default = 0) — changing term (same as 4th argument)

Returns
SiONVoice — this instance
setAnalogLike()method 
public function setAnalogLike(connectionType:int, ws1:int = 1, ws2:int = 1, balance:int = 0, vco2pitch:int = 0):SiONVoice

Set as analog like synth voice.

Parameters

connectionType:int — Connection type, 0=normal, 1=ring, 2=sync, 3=fm.
 
ws1:int (default = 1) — Wave shape for osc1.
 
ws2:int (default = 1) — Wave shape for osc2.
 
balance:int (default = 0) — balance between osc1 and 2 (-64 - 64). -64 for only osc1, 0 for same volume, 64 for only osc2.
 
vco2pitch:int (default = 0) — pitch difference in osc1 and 2. 64 for 1 halftone.

Returns
SiONVoice — this SiONVoice instance
setByMML()method 
public function setByMML(mml:String):int

set FM voice by MML.

Parameters

mml:String — MML string.

Returns
int — voice index number. returns -1 when error.
setEnvelop()method 
public function setEnvelop(ar:int, dr:int, sr:int, rr:int, sl:int, tl:int):SiONVoice

Set envelop parameters of all operators.

Parameters

ar:int — Attack rate (0-63).
 
dr:int — Decay rate (0-63).
 
sr:int — Sustain rate (0-63).
 
rr:int — Release rate (0-63).
 
sl:int — Sustain level (0-15).
 
tl:int — Total level (0-127).

Returns
SiONVoice
setFilterEnvelop()method 
public function setFilterEnvelop(filterType:int = 0, cutoff:int = 128, resonance:int = 0, far:int = 0, fdr1:int = 0, fdr2:int = 0, frr:int = 0, fdc1:int = 128, fdc2:int = 64, fsc:int = 32, frc:int = 128):SiONVoice

Set filter envelop parameters.

Parameters

filterType:int (default = 0) — filter type (0:Low-pass, 1:Band-pass, 2:High-pass)
 
cutoff:int (default = 128) — filter cutoff (0-128)
 
resonance:int (default = 0) — filter resonance (0-9)
 
far:int (default = 0) — filter attack rate (0-63)
 
fdr1:int (default = 0) — filter decay rate 1 (0-63)
 
fdr2:int (default = 0) — filter decay rate 2 (0-63)
 
frr:int (default = 0) — filter release rate (0-63)
 
fdc1:int (default = 128) — filter decay cutoff 1 (0-128)
 
fdc2:int (default = 64) — filter decay cutoff 2 (0-128)
 
fsc:int (default = 32) — filter sustain cutoff (0-128)
 
frc:int (default = 128) — filter release cutoff (0-128)

Returns
SiONVoice — this SiONVoice instance
setLPFEnvelop()method 
public function setLPFEnvelop(cutoff:int = 128, resonance:int = 0, far:int = 0, fdr1:int = 0, fdr2:int = 0, frr:int = 0, fdc1:int = 128, fdc2:int = 64, fsc:int = 32, frc:int = 128):SiONVoice

[Pleas use setFilterEnvelop() instead of this function]. Set low pass filter envelop parameters. This function is for compatibility of old versions.

Parameters

cutoff:int (default = 128) — LP filter cutoff (0-128)
 
resonance:int (default = 0) — LP filter resonance (0-9)
 
far:int (default = 0) — LP filter attack rate (0-63)
 
fdr1:int (default = 0) — LP filter decay rate 1 (0-63)
 
fdr2:int (default = 0) — LP filter decay rate 2 (0-63)
 
frr:int (default = 0) — LP filter release rate (0-63)
 
fdc1:int (default = 128) — LP filter decay cutoff 1 (0-128)
 
fdc2:int (default = 64) — LP filter decay cutoff 2 (0-128)
 
fsc:int (default = 32) — LP filter sustain cutoff (0-128)
 
frc:int (default = 128) — LP filter release cutoff (0-128)

Returns
SiONVoice — this SiONVoice instance

See also

setFilterEnvelop()
setMP3Voice()method 
public function setMP3Voice(wave:Sound, ignoreNoteOff:Boolean = false, channelCount:int = 2):SiOPMWaveSamplerData

Set as Sampler voice (Sound without pitch shift, LPF envlope).

Parameters

wave:Sound — wave data, Sound, Vector.<Number> or Vector.<int> is available. The Sound is extracted when the length is shorter than 4[sec].
 
ignoreNoteOff:Boolean (default = false) — flag to ignore note off
 
channelCount:int (default = 2) — channel count of streaming, 1 for monoral, 2 for stereo.

Returns
SiOPMWaveSamplerData — MP3 data instance as SiOPMWaveSamplerData

See also

setPCMVoice()method 
public function setPCMVoice(data:*, samplingNote:int = 69, srcChannelCount:int = 2, channelCount:int = 0):SiOPMWavePCMData

Set as PCM voice (Sound with pitch shift, LPF envlope).

Parameters

data:* — wave data, Sound, Vector.<Number> or Vector.<int> is available. The Sound instance is extracted internally.
 
samplingNote:int (default = 69) — sampling data's original note
 
srcChannelCount:int (default = 2)
 
channelCount:int (default = 0)

Returns
SiOPMWavePCMData — PCM data instance as SiOPMWavePCMData

See also

setPCMWave()method 
public function setPCMWave(index:int, data:*, samplingNote:Number = 69, keyRangeFrom:int = 0, keyRangeTo:int = 127, srcChannelCount:int = 2, channelCount:int = 0):SiOPMWavePCMData

Set PCM wave data rederd by %7.

Parameters

index:int — PCM data number.
 
data:* — wave data, Sound, Vector.<Number> or Vector.<int> is available. The Sound instance is extracted internally, the maximum length to extract is SiOPMWavePCMData.maxSampleLengthFromSound[samples].
 
samplingNote:Number (default = 69) — Sampling wave's original note number, this allows decimal number
 
keyRangeFrom:int (default = 0) — Assigning key range starts from (not implemented in current version)
 
keyRangeTo:int (default = 127) — Assigning key range ends at (not implemented in current version)
 
srcChannelCount:int (default = 2) — channel count of source data, 1 for monoral, 2 for stereo.
 
channelCount:int (default = 0) — channel count of this data, 1 for monoral, 2 for stereo, 0 sets same with srcChannelCount.

Returns
SiOPMWavePCMData

See also

setPitchModulation()method 
public function setPitchModulation(depth:int = 0, end_depth:int = 0, delay:int = 0, term:int = 0):SiONVoice

Set amplitude modulation parameters (same as "mp" command of MML).

Parameters

depth:int (default = 0) — start modulation depth (same as 1st argument)
 
end_depth:int (default = 0) — end modulation depth (same as 2nd argument)
 
delay:int (default = 0) — changing delay (same as 3rd argument)
 
term:int (default = 0) — changing term (same as 4th argument)

Returns
SiONVoice — this instance
setPMSGuitar()method 
public function setPMSGuitar(ar:int = 48, dr:int = 48, tl:int = 0, fixedPitch:int = 69, ws:int = 20, tension:int = 8):SiONVoice

Set as phisical modeling synth guitar voice.

Parameters

ar:int (default = 48) — attack rate of plunk energy
 
dr:int (default = 48) — decay rate of plunk energy
 
tl:int (default = 0) — total level of plunk energy
 
fixedPitch:int (default = 69) — plunk noise pitch
 
ws:int (default = 20) — wave shape of plunk
 
tension:int (default = 8) — sustain rate of the tone

Returns
SiONVoice — this SiONVoice instance
setSamplerTable()method 
public function setSamplerTable(table:SiOPMWaveSamplerTable):SiONVoice

Set sampler table

Parameters

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

Returns
SiONVoice — this instance

See also

SiONSoundFont
setSamplerWave()method 
public function setSamplerWave(index:int, data:*, ignoreNoteOff:Boolean = false, pan:int = 0, srcChannelCount:int = 2, channelCount:int = 0):SiOPMWaveSamplerData

Set sampler wave data refered by %10.

Parameters

index:int — note number. 0-127 for bank0, 128-255 for bank1.
 
data:* — wave data, Sound, Vector.<Number> or Vector.<int> is available. The Sound is extracted when the length is shorter than SiOPMWaveSamplerData.extractThreshold[msec].
 
ignoreNoteOff:Boolean (default = false) — True to set ignoring note off.
 
pan:int (default = 0) — pan of this sample [-64 - 64].
 
srcChannelCount:int (default = 2) — channel count of source data, 1 for monoral, 2 for stereo.
 
channelCount:int (default = 0) — channel count of this data, 1 for monoral, 2 for stereo, 0 sets same with srcChannelCount.

Returns
SiOPMWaveSamplerData — created data instance

See also

setWaveTable()method 
public function setWaveTable(data:Vector.<Number>):SiOPMWaveTable

Set wave table voice.

Parameters

data:Vector.<Number> — wave table number.

Returns
SiOPMWaveTable
Constant Detail
CHIPTYPE_ANALOG_LIKEConstant
public static const CHIPTYPE_ANALOG_LIKE:String = AnalogLike

CHIPTYPE_MA3Constant 
public static const CHIPTYPE_MA3:String = MA3

CHIPTYPE_OPLConstant 
public static const CHIPTYPE_OPL:String = OPL

CHIPTYPE_OPMConstant 
public static const CHIPTYPE_OPM:String = OPM

CHIPTYPE_OPNConstant 
public static const CHIPTYPE_OPN:String = OPN

CHIPTYPE_OPXConstant 
public static const CHIPTYPE_OPX:String = OPX

CHIPTYPE_PMS_GUITARConstant 
public static const CHIPTYPE_PMS_GUITAR:String = PMSGuitar

CHIPTYPE_SIOPMConstant 
public static const CHIPTYPE_SIOPM:String