Packagecom.ryanberdeen.soundtouch
Classpublic class Stretch
InheritanceStretch Inheritance AbstractFifoSamplePipe
ImplementsIFifoSamplePipe



Public Properties
 PropertyDefined by
 InheritedinputBuffer : FifoSampleBuffer
AbstractFifoSamplePipe
  inputChunkSize : int
[read-only]
Stretch
 InheritedoutputBuffer : FifoSampleBuffer
AbstractFifoSamplePipe
  outputChunkSize : int
[read-only]
Stretch
  quickSeek : Boolean
[write-only] Enables/disables the quick position seeking algorithm.
Stretch
  tempo : Number
Stretch
Protected Properties
 PropertyDefined by
 Inherited_inputBuffer : FifoSampleBuffer
AbstractFifoSamplePipe
 Inherited_outputBuffer : FifoSampleBuffer
AbstractFifoSamplePipe
Public Methods
 MethodDefined by
  
Stretch(createBuffers:Boolean = true)
Stretch
  
clear():void
Stretch
  
Stretch
  
process():void
Stretch
  
setParameters(aSampleRate:int, aSequenceMS:int, aSeekWindowMS:int, aOverlapMS:int):void
Sets routine control parameters.
Stretch
Public Constants
 ConstantDefined by
  DEFAULT_OVERLAP_MS : int = 8
[static] Overlap length in milliseconds.
Stretch
  DEFAULT_SEEKWINDOW_MS : int = 0
[static] Seeking window default length in milliseconds for algorithm that finds the best possible overlapping location.
Stretch
  DEFAULT_SEQUENCE_MS : int = 0
[static] Default length of a single processing sequence, in milliseconds.
Stretch
  USE_AUTO_SEEKWINDOW_LEN : int = 0
[static] Giving this value for the seek window length sets automatic parameter value according to tempo setting (recommended)
Stretch
  USE_AUTO_SEQUENCE_LEN : int = 0
[static] Giving this value for the sequence length sets automatic parameter value according to tempo setting (recommended)
Stretch
Property detail
inputChunkSizeproperty
inputChunkSize:int  [read-only]Implementation
    public function get inputChunkSize():int
outputChunkSizeproperty 
outputChunkSize:int  [read-only]Implementation
    public function get outputChunkSize():int
quickSeekproperty 
quickSeek:Boolean  [write-only]

Enables/disables the quick position seeking algorithm.

Implementation
    public function set quickSeek(value:Boolean):void
tempoproperty 
tempo:Number  [read-write]Implementation
    public function get tempo():Number
    public function set tempo(value:Number):void
Constructor detail
Stretch()constructor
public function Stretch(createBuffers:Boolean = true)Parameters
createBuffers:Boolean (default = true)
Method detail
clear()method
public override function clear():void
clone()method 
public function clone():IFifoSamplePipe

Returns
IFifoSamplePipe
process()method 
public function process():void
setParameters()method 
public function setParameters(aSampleRate:int, aSequenceMS:int, aSeekWindowMS:int, aOverlapMS:int):void

Sets routine control parameters. These control are certain time constants defining how the sound is stretched to the desired duration. 'sampleRate' = sample rate of the sound 'sequenceMS' = one processing sequence length in milliseconds (default = 82 ms) 'seekwindowMS' = seeking window length for scanning the best overlapping position (default = 28 ms) 'overlapMS' = overlapping length (default = 12 ms)

Parameters
aSampleRate:int
 
aSequenceMS:int
 
aSeekWindowMS:int
 
aOverlapMS:int
Constant detail
DEFAULT_OVERLAP_MSconstant
public static const DEFAULT_OVERLAP_MS:int = 8

Overlap length in milliseconds. When the chopped sound sequences are mixed back together, to form a continuous sound stream, this parameter defines over how long period the two consecutive sequences are let to overlap each other. This shouldn't be that critical parameter. If you reduce the DEFAULT_SEQUENCE_MS setting by a large amount, you might wish to try a smaller value on this. Increasing this value increases computational burden and vice versa.

DEFAULT_SEEKWINDOW_MSconstant 
public static const DEFAULT_SEEKWINDOW_MS:int = 0

Seeking window default length in milliseconds for algorithm that finds the best possible overlapping location. This determines from how wide window the algorithm may look for an optimal joining location when mixing the sound sequences back together. The bigger this window setting is, the higher the possibility to find a better mixing position will become, but at the same time large values may cause a "drifting" artifact because consequent sequences will be taken at more uneven intervals. If there's a disturbing artifact that sounds as if a constant frequency was drifting around, try reducing this setting. Increasing this value increases computational burden and vice versa.

DEFAULT_SEQUENCE_MSconstant 
public static const DEFAULT_SEQUENCE_MS:int = 0

Default length of a single processing sequence, in milliseconds. This determines to how long sequences the original sound is chopped in the time-stretch algorithm. The larger this value is, the lesser sequences are used in processing. In principle a bigger value sounds better when slowing down tempo, but worse when increasing tempo and vice versa. Increasing this value reduces computational burden and vice versa.

USE_AUTO_SEEKWINDOW_LENconstant 
public static const USE_AUTO_SEEKWINDOW_LEN:int = 0

Giving this value for the seek window length sets automatic parameter value according to tempo setting (recommended)

USE_AUTO_SEQUENCE_LENconstant 
public static const USE_AUTO_SEQUENCE_LEN:int = 0

Giving this value for the sequence length sets automatic parameter value according to tempo setting (recommended)