example/stretcher/soundtouch.js
function(
            aSampleRate,
            aSequenceMS,
            aSeekWindowMS,
            aOverlapMS
        ) {
            // accept only positive parameter values - if zero or negative, use old values instead
            if (aSampleRate > 0) {
                this.sampleRate = aSampleRate;
            }
            if (aOverlapMS > 0) {
                this.overlapMs = aOverlapMS;
            }

            if (aSequenceMS > 0) {
                this.sequenceMs = aSequenceMS;
                this.bAutoSeqSetting = false;
            } else {
                // zero or below, use automatic setting
                this.bAutoSeqSetting = true;
            }

            if (aSeekWindowMS > 0) {
                this.seekWindowMs = aSeekWindowMS;
                this.bAutoSeekSetting = false;
            } else {
                // zero or below, use automatic setting
                this.bAutoSeekSetting = true;
            }

            this.calcSeqParameters();

            this.calculateOverlapLength(this.overlapMs);

            // set tempo to recalculate 'sampleReq'
            this.tempo = this._tempo;
        }
function(
            aSampleRate,
            aSequenceMS,
            aSeekWindowMS,
            aOverlapMS
        ) {
            // accept only positive parameter values - if zero or negative, use old values instead
            if (aSampleRate > 0) {
                this.sampleRate = aSampleRate;
            }
            if (aOverlapMS > 0) {
                this.overlapMs = aOverlapMS;
            }

            if (aSequenceMS > 0) {
                this.sequenceMs = aSequenceMS;
                this.bAutoSeqSetting = false;
            } else {
                // zero or below, use automatic setting
                this.bAutoSeqSetting = true;
            }

            if (aSeekWindowMS > 0) {
                this.seekWindowMs = aSeekWindowMS;
                this.bAutoSeekSetting = false;
            } else {
                // zero or below, use automatic setting
                this.bAutoSeekSetting = true;
            }

            this.calcSeqParameters();

            this.calculateOverlapLength(this.overlapMs);

            // set tempo to recalculate 'sampleReq'
            this.tempo = this._tempo;
        }
function ( aSampleRate , aSequenceMS , aSeekWindowMS , aOverlapMS ) { // accept only positive parameter values - if zero or negative, use old values instead if ( aSampleRate > 0 ) { this . sampleRate = aSampleRate ; } if ( aOverlapMS > 0 ) { this . overlapMs = aOverlapMS ; } if ( aSequenceMS > 0 ) { this . sequenceMs = aSequenceMS ; this . bAutoSeqSetting = false ; } else { // zero or below, use automatic setting this . bAutoSeqSetting = true ; } if ( aSeekWindowMS > 0 ) { this . seekWindowMs = aSeekWindowMS ; this . bAutoSeekSetting = false ; } else { // zero or below, use automatic setting this . bAutoSeekSetting = true ; } this . calcSeqParameters ( ) ; this . calculateOverlapLength ( this . overlapMs ) ; // set tempo to recalculate 'sampleReq' this . tempo = this . _tempo ; }
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)
Sets routine control parameters . These control are certain time constants defining how the sound is stretched to the desired duration .