Packageorg.si.sion.module.channels
Classpublic class SiOPMChannelBase
InheritanceSiOPMChannelBase Inheritance Object
Subclasses SiOPMChannelFM, SiOPMChannelPCM, SiOPMChannelSampler

SiOPM sound channel base class. The SiOPM sound channels generate wave data and write it into streaming buffer.



Public Properties
 PropertyDefined By
  activeOperatorIndex : int
[write-only] active operator index (i).
SiOPMChannelBase
  bufferIndex : int
[read-only] buffer index
SiOPMChannelBase
  channelType : int
[read-only] channel type
SiOPMChannelBase
  detune : int
[write-only] detune (@dt)
SiOPMChannelBase
  erst : Boolean
[write-only] envelop reset (@er)
SiOPMChannelBase
  filterType : int
filter mode
SiOPMChannelBase
  fixedPitch : int
[write-only] fixed pitch (@fx)
SiOPMChannelBase
  fmul : int
[write-only] fine multiple (@ml)
SiOPMChannelBase
  isFilterActive : Boolean
[read-only] Is filter active ?
SiOPMChannelBase
  isIdling : Boolean
[read-only] Is idling ?
SiOPMChannelBase
  isNoteOn : Boolean
[read-only] is this channel note on ?
SiOPMChannelBase
  masterVolume : int
Master volume (0-128)
SiOPMChannelBase
  mute : Boolean
Mute
SiOPMChannelBase
  pan : int
Pan (-64-64 left=-64, center=0, right=64). [left volume] = cos((pan+64)/128I.5) volume; [right volume] = sin((pan+64)/128I.5) volume;
SiOPMChannelBase
  phase : int
[write-only] phase (@ph)
SiOPMChannelBase
  pitch : int
pitch
SiOPMChannelBase
  rr : int
[write-only] Release rate (@rr)
SiOPMChannelBase
  ssgec : int
[write-only] ssgec (@se)
SiOPMChannelBase
  tl : int
[write-only] total level (@tl)
SiOPMChannelBase
Protected Properties
 PropertyDefined By
  _basePipe : SLLint
base pipe
SiOPMChannelBase
  _bufferIndex : int
buffering index
SiOPMChannelBase
  _chip : SiOPMModule
chip
SiOPMChannelBase
  _cutoff : int
cutoff frequency
SiOPMChannelBase
  _cutoff_offset : int
cutoff frequency
SiOPMChannelBase
  _expressionTable : Vector.<int>
expression table
SiOPMChannelBase
  _filter_eg_cutoff : Vector.<int>
eg level
SiOPMChannelBase
  _filter_eg_cutoff_inc : int
eg direction
SiOPMChannelBase
  _filter_eg_next : int
eg phase shift l.
SiOPMChannelBase
  _filter_eg_state : int
eg state
SiOPMChannelBase
  _filter_eg_step : int
eg step
SiOPMChannelBase
  _filter_eg_time : Vector.<int>
eg rate
SiOPMChannelBase
  _filterOn : Boolean
filter switch
SiOPMChannelBase
  _filterType : int
filter type
SiOPMChannelBase
  _filterVriables : Vector.<Number>
filter Variables
SiOPMChannelBase
  _freq_ratio : int
frequency ratio
SiOPMChannelBase
  _funcProcess : Function
functor to process
SiOPMChannelBase
  _hasEffectSend : Boolean
effect send flag
SiOPMChannelBase
  _inPipe : SLLint
in pipe
SiOPMChannelBase
  _inputLevel : int
input level
SiOPMChannelBase
  _inputMode : int
input level
SiOPMChannelBase
  _isIdling : Boolean
idling flag
SiOPMChannelBase
  _isNoteOn : Boolean
note on flag
SiOPMChannelBase
  _lfo_on : int
lfo switch
SiOPMChannelBase
  _lfo_phase : int
lfo phase
SiOPMChannelBase
  _lfo_timer : int
lfo timer
SiOPMChannelBase
  _lfo_timer_step_ : int
lfo step buffer
SiOPMChannelBase
  _lfo_timer_step : int
lfo timer step
SiOPMChannelBase
  _lfo_waveShape : int
lfo wave shape
SiOPMChannelBase
  _lfo_waveTable : Vector.<int>
lfo wave table
SiOPMChannelBase
  _mute : Boolean
mute
SiOPMChannelBase
  _outPipe : SLLint
out pipe
SiOPMChannelBase
  _outputMode : int
output mode
SiOPMChannelBase
  _pan : int
pan
SiOPMChannelBase
  _prevStepRemain : int
eg step residue
SiOPMChannelBase
  _resonance : Number
resonance
SiOPMChannelBase
  _ringmodLevel : Number
ringmod level
SiOPMChannelBase
  _ringPipe : SLLint
ringmod pipe
SiOPMChannelBase
  _streams : Vector.<SiOPMStream>
stream
SiOPMChannelBase
  _table : SiOPMTable
table
SiOPMChannelBase
  _veocityTable : Vector.<int>
veocity table
SiOPMChannelBase
  _volumes : Vector.<Number>
volume
SiOPMChannelBase
Public Methods
 MethodDefined By
  
Constructor
SiOPMChannelBase
  
activateFilter(b:Boolean):void
Filter activation
SiOPMChannelBase
  
buffer(len:int):void
Buffering
SiOPMChannelBase
  
Get SiOPMChannelParam.
SiOPMChannelBase
  
getStreamSend(streamNum:int):Number
get stream send.
SiOPMChannelBase
  
initialize(prev:SiOPMChannelBase, bufferIndex:int):void
Initialize.
SiOPMChannelBase
  
initializeLFO(waveform:int, customWaveTable:Vector.<int> = null):void
initialize LFO (@lfo).
SiOPMChannelBase
  
nop(len:int):void
Buffering without processnig
SiOPMChannelBase
  
noteOff():void
Note off
SiOPMChannelBase
  
noteOn():void
Note on
SiOPMChannelBase
  
offsetFilter(i:int):void
LP Filter cutoff offset controled by table envelop (nf)
SiOPMChannelBase
  
offsetVolume(expression:int, velocity:int):void
offset volume, controled by SiMMLTrack.
SiOPMChannelBase
  
reset():void
Reset
SiOPMChannelBase
  
reset channel buffering status
SiOPMChannelBase
  
setAlgorism(cnt:int, alg:int):void
algorism (@al)
SiOPMChannelBase
  
setAllAttackRate(ar:int):void
Attack rate
SiOPMChannelBase
  
setAllReleaseRate(rr:int):void
Release rate (s)
SiOPMChannelBase
  
setAllStreamSendLevels(param:Vector.<int>):void
set all stream send levels by Vector.<int>.
SiOPMChannelBase
  
setAmplitudeModulation(depth:int):void
amplitude modulation (ma)
SiOPMChannelBase
  
setChannelNumber(channelNum:int):void
channel number (2nd argument of %)
SiOPMChannelBase
  
setFeedBack(fb:int, fbc:int):void
feedback (@fb)
SiOPMChannelBase
  
setFrequencyRatio(ratio:int):void
set chip "PSEUDO" frequency ratio by [%] (@clock).
SiOPMChannelBase
  
setInput(level:int, pipeIndex:int):void
Set input pipe (@i).
SiOPMChannelBase
  
setLFOCycleTime(ms:Number):void
set LFO cycle time (@lfo).
SiOPMChannelBase
  
setOutput(outputMode:int, pipeIndex:int):void
Set output pipe (@o).
SiOPMChannelBase
  
setParameters(param:Vector.<int>):void
parameters (@ call from SiMMLTrack._setChannelParameters())
SiOPMChannelBase
  
setPitchModulation(depth:int):void
pitch modulation (mp)
SiOPMChannelBase
  
setRegister(addr:int, data:int):void
set register
SiOPMChannelBase
  
setRingModulation(level:int, pipeIndex:int):void
Set ring modulation pipe (@r).
SiOPMChannelBase
  
setSiOPMChannelParam(param:SiOPMChannelParam, withVolume:Boolean, withModulation:Boolean = true):void
Set by SiOPMChannelParam.
SiOPMChannelBase
  
setStreamBuffer(streamNum:int, stream:SiOPMStream = null):void
set stream buffer.
SiOPMChannelBase
  
setStreamSend(streamNum:int, volume:Number):void
set stream send.
SiOPMChannelBase
  
setSVFilter(cutoff:int = 128, resonance:int = 0, ar:int = 0, dr1:int = 0, dr2:int = 0, rr:int = 0, dc1:int = 128, dc2:int = 128, sc:int = 128, rc:int = 128):void
SVFilter envelop (@f).
SiOPMChannelBase
  
setType(pgType:int, ptType:int):void
pgType and ptType (@ call from SiMMLChannelSetting.selectTone()/initializeTone())
SiOPMChannelBase
  
setVolumeTables(vtable:Vector.<int>, xtable:Vector.<int>):void
set velocity and expression tables
SiOPMChannelBase
  
setWaveData(waveData:SiOPMWaveBase):void
Set wave data.
SiOPMChannelBase
Protected Methods
 MethodDefined By
  
_applyRingModulation(pointer:SLLint, len:int):void
ring modulation
SiOPMChannelBase
  
_applySVFilter(pointer:SLLint, len:int, variables:Vector.<Number> = null):void
state variable filter
SiOPMChannelBase
  
_nop(len:int):void
No process (default functor of _funcProcess).
SiOPMChannelBase
  
reset SVFilter
SiOPMChannelBase
  
shiftSVFilterState(state:int):void
shift SVFilter state
SiOPMChannelBase
Public Constants
 ConstantDefined By
  FILTER_BP : int = 1
[static] band pass filter
SiOPMChannelBase
  FILTER_HP : int = 2
[static] high pass filter
SiOPMChannelBase
  FILTER_LP : int = 0
[static] low pass filter
SiOPMChannelBase
  INPUT_FEEDBACK : int = 2
[static] input from feedback
SiOPMChannelBase
  INPUT_PIPE : int = 1
[static] input from pipe
SiOPMChannelBase
  INPUT_ZERO : int = 0
[static] no input from pipe
SiOPMChannelBase
  OUTPUT_ADD : int = 2
[static] add to pipe
SiOPMChannelBase
  OUTPUT_OVERWRITE : int = 1
[static] overwrite pipe
SiOPMChannelBase
  OUTPUT_STANDARD : int = 0
[static] standard output
SiOPMChannelBase
Property Detail
_basePipeproperty
protected var _basePipe:SLLint

base pipe

_bufferIndexproperty 
protected var _bufferIndex:int

buffering index

_chipproperty 
protected var _chip:SiOPMModule

chip

_cutoffproperty 
protected var _cutoff:int

cutoff frequency

_cutoff_offsetproperty 
protected var _cutoff_offset:int

cutoff frequency

_expressionTableproperty 
protected var _expressionTable:Vector.<int>

expression table

_filter_eg_cutoffproperty 
protected var _filter_eg_cutoff:Vector.<int>

eg level

_filter_eg_cutoff_incproperty 
protected var _filter_eg_cutoff_inc:int

eg direction

_filter_eg_nextproperty 
protected var _filter_eg_next:int

eg phase shift l.

_filter_eg_stateproperty 
protected var _filter_eg_state:int

eg state

_filter_eg_stepproperty 
protected var _filter_eg_step:int

eg step

_filter_eg_timeproperty 
protected var _filter_eg_time:Vector.<int>

eg rate

_filterOnproperty 
protected var _filterOn:Boolean

filter switch

_filterTypeproperty 
protected var _filterType:int

filter type

_filterVriablesproperty 
protected var _filterVriables:Vector.<Number>

filter Variables

_freq_ratioproperty 
protected var _freq_ratio:int

frequency ratio

_funcProcessproperty 
protected var _funcProcess:Function

functor to process

_hasEffectSendproperty 
protected var _hasEffectSend:Boolean

effect send flag

_inPipeproperty 
protected var _inPipe:SLLint

in pipe

_inputLevelproperty 
protected var _inputLevel:int

input level

_inputModeproperty 
protected var _inputMode:int

input level

_isIdlingproperty 
protected var _isIdling:Boolean

idling flag

_isNoteOnproperty 
protected var _isNoteOn:Boolean

note on flag

_lfo_onproperty 
protected var _lfo_on:int

lfo switch

_lfo_phaseproperty 
protected var _lfo_phase:int

lfo phase

_lfo_timerproperty 
protected var _lfo_timer:int

lfo timer

_lfo_timer_stepproperty 
protected var _lfo_timer_step:int

lfo timer step

_lfo_timer_step_property 
protected var _lfo_timer_step_:int

lfo step buffer

_lfo_waveShapeproperty 
protected var _lfo_waveShape:int

lfo wave shape

_lfo_waveTableproperty 
protected var _lfo_waveTable:Vector.<int>

lfo wave table

_muteproperty 
protected var _mute:Boolean

mute

_outPipeproperty 
protected var _outPipe:SLLint

out pipe

_outputModeproperty 
protected var _outputMode:int

output mode

_panproperty 
protected var _pan:int

pan

_prevStepRemainproperty 
protected var _prevStepRemain:int

eg step residue

_resonanceproperty 
protected var _resonance:Number

resonance

_ringmodLevelproperty 
protected var _ringmodLevel:Number

ringmod level

_ringPipeproperty 
protected var _ringPipe:SLLint

ringmod pipe

_streamsproperty 
protected var _streams:Vector.<SiOPMStream>

stream

_tableproperty 
protected var _table:SiOPMTable

table

_veocityTableproperty 
protected var _veocityTable:Vector.<int>

veocity table

_volumesproperty 
protected var _volumes:Vector.<Number>

volume

activeOperatorIndexproperty 
activeOperatorIndex:int  [write-only]

active operator index (i).


Implementation
    public function set activeOperatorIndex(value:int):void
bufferIndexproperty 
bufferIndex:int  [read-only]

buffer index


Implementation
    public function get bufferIndex():int
channelTypeproperty 
channelType:int  [read-only]

channel type


Implementation
    public function get channelType():int
detuneproperty 
detune:int  [write-only]

detune (@dt)


Implementation
    public function set detune(value:int):void
erstproperty 
erst:Boolean  [write-only]

envelop reset (@er)


Implementation
    public function set erst(value:Boolean):void
filterTypeproperty 
filterType:int

filter mode


Implementation
    public function get filterType():int
    public function set filterType(value:int):void
fixedPitchproperty 
fixedPitch:int  [write-only]

fixed pitch (@fx)


Implementation
    public function set fixedPitch(value:int):void
fmulproperty 
fmul:int  [write-only]

fine multiple (@ml)


Implementation
    public function set fmul(value:int):void
isFilterActiveproperty 
isFilterActive:Boolean  [read-only]

Is filter active ?


Implementation
    public function get isFilterActive():Boolean
isIdlingproperty 
isIdling:Boolean  [read-only]

Is idling ?


Implementation
    public function get isIdling():Boolean
isNoteOnproperty 
isNoteOn:Boolean  [read-only]

is this channel note on ?


Implementation
    public function get isNoteOn():Boolean
masterVolumeproperty 
masterVolume:int

Master volume (0-128)


Implementation
    public function get masterVolume():int
    public function set masterVolume(value:int):void
muteproperty 
mute:Boolean

Mute


Implementation
    public function get mute():Boolean
    public function set mute(value:Boolean):void
panproperty 
pan:int

Pan (-64-64 left=-64, center=0, right=64). [left volume] = cos((pan+64)/128I.5) volume; [right volume] = sin((pan+64)/128I.5) volume;


Implementation
    public function get pan():int
    public function set pan(value:int):void
phaseproperty 
phase:int  [write-only]

phase (@ph)


Implementation
    public function set phase(value:int):void
pitchproperty 
pitch:int

pitch


Implementation
    public function get pitch():int
    public function set pitch(value:int):void
rrproperty 
rr:int  [write-only]

Release rate (@rr)


Implementation
    public function set rr(value:int):void
ssgecproperty 
ssgec:int  [write-only]

ssgec (@se)


Implementation
    public function set ssgec(value:int):void
tlproperty 
tl:int  [write-only]

total level (@tl)


Implementation
    public function set tl(value:int):void
Constructor Detail
SiOPMChannelBase()Constructor
public function SiOPMChannelBase(chip:SiOPMModule)

Constructor

Parameters
chip:SiOPMModule — Managing SiOPMModule.
Method Detail
_applyRingModulation()method
protected function _applyRingModulation(pointer:SLLint, len:int):void

ring modulation

Parameters

pointer:SLLint
 
len:int

_applySVFilter()method 
protected function _applySVFilter(pointer:SLLint, len:int, variables:Vector.<Number> = null):void

state variable filter

Parameters

pointer:SLLint
 
len:int
 
variables:Vector.<Number> (default = null)

_nop()method 
protected function _nop(len:int):void

No process (default functor of _funcProcess).

Parameters

len:int

activateFilter()method 
public function activateFilter(b:Boolean):void

Filter activation

Parameters

b:Boolean

buffer()method 
public function buffer(len:int):void

Buffering

Parameters

len:int

getSiOPMChannelParam()method 
public function getSiOPMChannelParam(param:SiOPMChannelParam):void

Get SiOPMChannelParam.

Parameters

param:SiOPMChannelParam

getStreamSend()method 
public function getStreamSend(streamNum:int):Number

get stream send.

Parameters

streamNum:int — stream number[0-7]. The streamNum of 0 means master volume.

Returns
Number — send level[0-1].
initialize()method 
public function initialize(prev:SiOPMChannelBase, bufferIndex:int):void

Initialize.

Parameters

prev:SiOPMChannelBase
 
bufferIndex:int

initializeLFO()method 
public function initializeLFO(waveform:int, customWaveTable:Vector.<int> = null):void

initialize LFO (@lfo).

Parameters

waveform:int — waveform number, -1 to set customized wave table
 
customWaveTable:Vector.<int> (default = null) — customized wave table, the length is 256 and the values are limited in the range of 0-255. This argument is available when waveform=-1.

nop()method 
public function nop(len:int):void

Buffering without processnig

Parameters

len:int

noteOff()method 
public function noteOff():void

Note off

noteOn()method 
public function noteOn():void

Note on

offsetFilter()method 
public function offsetFilter(i:int):void

LP Filter cutoff offset controled by table envelop (nf)

Parameters

i:int

offsetVolume()method 
public function offsetVolume(expression:int, velocity:int):void

offset volume, controled by SiMMLTrack.

Parameters

expression:int
 
velocity:int

reset()method 
public function reset():void

Reset

resetChannelBufferStatus()method 
public function resetChannelBufferStatus():void

reset channel buffering status

resetSVFilterState()method 
protected function resetSVFilterState():void

reset SVFilter

setAlgorism()method 
public function setAlgorism(cnt:int, alg:int):void

algorism (@al)

Parameters

cnt:int
 
alg:int

setAllAttackRate()method 
public function setAllAttackRate(ar:int):void

Attack rate

Parameters

ar:int

setAllReleaseRate()method 
public function setAllReleaseRate(rr:int):void

Release rate (s)

Parameters

rr:int

setAllStreamSendLevels()method 
public function setAllStreamSendLevels(param:Vector.<int>):void

set all stream send levels by Vector.<int>.

Parameters

param:Vector.<int> — Vector.<int>(8) of all volumes[0-128].

setAmplitudeModulation()method 
public function setAmplitudeModulation(depth:int):void

amplitude modulation (ma)

Parameters

depth:int

setChannelNumber()method 
public function setChannelNumber(channelNum:int):void

channel number (2nd argument of %)

Parameters

channelNum:int

setFeedBack()method 
public function setFeedBack(fb:int, fbc:int):void

feedback (@fb)

Parameters

fb:int
 
fbc:int

setFrequencyRatio()method 
public function setFrequencyRatio(ratio:int):void

set chip "PSEUDO" frequency ratio by [%] (@clock).

Parameters

ratio:int

setInput()method 
public function setInput(level:int, pipeIndex:int):void

Set input pipe (@i).

Parameters

level:int — Input level. The value for a standard FM sound module is 5.
 
pipeIndex:int — Input pipe index (0-3).

setLFOCycleTime()method 
public function setLFOCycleTime(ms:Number):void

set LFO cycle time (@lfo).

Parameters

ms:Number

setOutput()method 
public function setOutput(outputMode:int, pipeIndex:int):void

Set output pipe (@o).

Parameters

outputMode:int — Output mode. 0=standard stereo out, 1=overwrite pipe. 2=add pipe.
 
pipeIndex:int — Output stream/pipe index (0-3).

setParameters()method 
public function setParameters(param:Vector.<int>):void

parameters (@ call from SiMMLTrack._setChannelParameters())

Parameters

param:Vector.<int>

setPitchModulation()method 
public function setPitchModulation(depth:int):void

pitch modulation (mp)

Parameters

depth:int

setRegister()method 
public function setRegister(addr:int, data:int):void

set register

Parameters

addr:int
 
data:int

setRingModulation()method 
public function setRingModulation(level:int, pipeIndex:int):void

Set ring modulation pipe (@r).

Parameters

level:int — Input level(0-8).
 
pipeIndex:int — Input pipe index (0-3).

setSiOPMChannelParam()method 
public function setSiOPMChannelParam(param:SiOPMChannelParam, withVolume:Boolean, withModulation:Boolean = true):void

Set by SiOPMChannelParam.

Parameters

param:SiOPMChannelParam
 
withVolume:Boolean
 
withModulation:Boolean (default = true)

setStreamBuffer()method 
public function setStreamBuffer(streamNum:int, stream:SiOPMStream = null):void

set stream buffer.

Parameters

streamNum:int — stream number[0-7]. The streamNum of 0 means master stream.
 
stream:SiOPMStream (default = null) — stream buffer instance. Set null to set as default.

setStreamSend()method 
public function setStreamSend(streamNum:int, volume:Number):void

set stream send.

Parameters

streamNum:int — stream number[0-7]. The streamNum of 0 means master volume.
 
volume:Number — send level[0-1].

setSVFilter()method 
public function setSVFilter(cutoff:int = 128, resonance:int = 0, ar:int = 0, dr1:int = 0, dr2:int = 0, rr:int = 0, dc1:int = 128, dc2:int = 128, sc:int = 128, rc:int = 128):void

SVFilter envelop (@f).

Parameters

cutoff:int (default = 128) — initial cutoff (0-128).
 
resonance:int (default = 0) — resonance (0-9).
 
ar:int (default = 0) — attack rate (0-63).
 
dr1:int (default = 0) — decay rate 1 (0-63).
 
dr2:int (default = 0) — decay rate 2 (0-63).
 
rr:int (default = 0) — release rate (0-63).
 
dc1:int (default = 128) — decay cutoff level 1 (0-128).
 
dc2:int (default = 128) — decay cutoff level 2 (0-128).
 
sc:int (default = 128) — sustain cutoff level (0-128).
 
rc:int (default = 128) — release cutoff level (0-128).

setType()method 
public function setType(pgType:int, ptType:int):void

pgType and ptType (@ call from SiMMLChannelSetting.selectTone()/initializeTone())

Parameters

pgType:int
 
ptType:int

setVolumeTables()method 
public function setVolumeTables(vtable:Vector.<int>, xtable:Vector.<int>):void

set velocity and expression tables

Parameters

vtable:Vector.<int> — volume table (length = 513)
 
xtable:Vector.<int> — expression table (length = 513)

setWaveData()method 
public function setWaveData(waveData:SiOPMWaveBase):void

Set wave data.

Parameters

waveData:SiOPMWaveBase

shiftSVFilterState()method 
protected function shiftSVFilterState(state:int):void

shift SVFilter state

Parameters

state:int

Constant Detail
FILTER_BPConstant
public static const FILTER_BP:int = 1

band pass filter

FILTER_HPConstant 
public static const FILTER_HP:int = 2

high pass filter

FILTER_LPConstant 
public static const FILTER_LP:int = 0

low pass filter

INPUT_FEEDBACKConstant 
public static const INPUT_FEEDBACK:int = 2

input from feedback

INPUT_PIPEConstant 
public static const INPUT_PIPE:int = 1

input from pipe

INPUT_ZEROConstant 
public static const INPUT_ZERO:int = 0

no input from pipe

OUTPUT_ADDConstant 
public static const OUTPUT_ADD:int = 2

add to pipe

OUTPUT_OVERWRITEConstant 
public static const OUTPUT_OVERWRITE:int = 1

overwrite pipe

OUTPUT_STANDARDConstant 
public static const OUTPUT_STANDARD:int = 0

standard output