Packageorg.si.sion.module
Classpublic class SiOPMWavePCMData
InheritanceSiOPMWavePCMData Inheritance SiOPMWaveBase Inheritance Object

PCM data class



Public Properties
 PropertyDefined By
  channelCount : int
channel count
SiOPMWavePCMData
  endPoint : int
[read-only] wave end position in sample count.
SiOPMWavePCMData
  loopPoint : int
[read-only] wave looping position in sample count.
SiOPMWavePCMData
  maxSampleLengthFromSound : int = 1048576
[static] maximum sampling length when converted from Sound instance
SiOPMWavePCMData
 InheritedmoduleType : int
module type
SiOPMWaveBase
  sampleCount : int
[read-only] Sampling data's length
SiOPMWavePCMData
  samplingOctave : int
[read-only] Sampling data's octave
SiOPMWavePCMData
  samplingPitch : int
sampling pitch (noteNumber4)
SiOPMWavePCMData
  startPoint : int
[read-only] wave starting position in sample count.
SiOPMWavePCMData
  wavelet : Vector.<int>
wave data
SiOPMWavePCMData
Public Methods
 MethodDefined By
  
SiOPMWavePCMData(data:* = null, samplingPitch:int = 4416, srcChannelCount:int = 2, channelCount:int = 0)
Constructor.
SiOPMWavePCMData
  
getInitialSampleIndex(phase:Number = 0):int
Get initial sample index.
SiOPMWavePCMData
  
initialize(data:*, samplingPitch:int = 4416, srcChannelCount:int = 2, channelCount:int = 0):SiOPMWavePCMData
Initializer.
SiOPMWavePCMData
  
loopTailSamples(sampleCount:int = 2205, tailMargin:int = 0, crossFade:Boolean = true):SiOPMWavePCMData
Loop tail samples, this function updates endPoint and loopPoint.
SiOPMWavePCMData
  
slice(startPoint:int = -1, endPoint:int = -1, loopPoint:int = -1):SiOPMWavePCMData
Slicer setting.
SiOPMWavePCMData
Property Detail
channelCountproperty
public var channelCount:int

channel count

endPointproperty 
endPoint:int  [read-only]

wave end position in sample count. you can set this property by slice().


Implementation
    public function get endPoint():int

See also

loopPointproperty 
loopPoint:int  [read-only]

wave looping position in sample count. -1 means no repeat. you can set this property by slice().


Implementation
    public function get loopPoint():int

See also

maxSampleLengthFromSoundproperty 
public static var maxSampleLengthFromSound:int = 1048576

maximum sampling length when converted from Sound instance

sampleCountproperty 
sampleCount:int  [read-only]

Sampling data's length


Implementation
    public function get sampleCount():int
samplingOctaveproperty 
samplingOctave:int  [read-only]

Sampling data's octave


Implementation
    public function get samplingOctave():int
samplingPitchproperty 
public var samplingPitch:int

sampling pitch (noteNumber4)

startPointproperty 
startPoint:int  [read-only]

wave starting position in sample count. you can set this property by slice().


Implementation
    public function get startPoint():int

See also

waveletproperty 
public var wavelet:Vector.<int>

wave data

Constructor Detail
SiOPMWavePCMData()Constructor
public function SiOPMWavePCMData(data:* = null, samplingPitch:int = 4416, srcChannelCount:int = 2, channelCount:int = 0)

Constructor.

Parameters
data:* (default = null) — wave data, Sound, Vector.<Number> or Vector.<int> is available. The Sound instance is extracted internally.
 
samplingPitch:int (default = 4416) — sampling data's original pitch (noteNumber4)
 
srcChannelCount:int (default = 2) — channel count of source data, this argument is only available when data type is Vector.<Number>.
 
channelCount:int (default = 0) — channel count of this data, 0 sets same with srcChannelCount
Method Detail
getInitialSampleIndex()method
public function getInitialSampleIndex(phase:Number = 0):int

Get initial sample index.

Parameters

phase:Number (default = 0) — Starting phase, ratio from start point to end point(0-1).

Returns
int
initialize()method 
public function initialize(data:*, samplingPitch:int = 4416, srcChannelCount:int = 2, channelCount:int = 0):SiOPMWavePCMData

Initializer.

Parameters

data:* — wave data, Sound, Vector.<Number> or Vector.<int> is available. The Sound instance is extracted internally.
 
samplingPitch:int (default = 4416) — sampling data's original note
 
srcChannelCount:int (default = 2) — channel count of source data, this argument is only available when data type is Vector.<Number>.
 
channelCount:int (default = 0) — channel count of this data, 0 sets same with srcChannelCount

Returns
SiOPMWavePCMData — this instance.
loopTailSamples()method 
public function loopTailSamples(sampleCount:int = 2205, tailMargin:int = 0, crossFade:Boolean = true):SiOPMWavePCMData

Loop tail samples, this function updates endPoint and loopPoint. This function is called from slice() when loopPoint < -1.

Parameters

sampleCount:int (default = 2205) — looping sample count.
 
tailMargin:int (default = 0) — margin for end point. sample count from tail of wave data (consider mp3's end gap).
 
crossFade:Boolean (default = true) — using short cross fading to reduce sample step noise while looping.

Returns
SiOPMWavePCMData

See also

slice()method 
public function slice(startPoint:int = -1, endPoint:int = -1, loopPoint:int = -1):SiOPMWavePCMData

Slicer setting. You can cut samples and set repeating.

Parameters

startPoint:int (default = -1) — slicing point to start data. The negative value skips head silence.
 
endPoint:int (default = -1) — slicing point to end data, The negative value calculates from the end.
 
loopPoint:int (default = -1) — slicing point to repeat data, -1 sets no repeat, other negative value sets loop tail samples

Returns
SiOPMWavePCMData — this instance.