paulstretch
Prev | Orchestra Opcodes and Operators | Next

## paulstretch

paulstretch — Extreme time-stretching algorithm by Nasca Octavian Paul.

## Description

The paulstretch opcode is a lightweight implementation of the PaulStretch time-stretching algorithm by Nasca Octavian Paul. It is ideal for timestretching a signal by very large amounts.

The Paulstretch algorithm works very similarly to other STFT-based timestretching methods, using overlap-add with a hanning window. Unique to paulstretch are the use of scrambled phase and very large window sizes (specified in seconds).

## Syntax

    asig paulstretch istretch, iwindowsize, ift

## Initialization

istretch -- Stretch factor.

iwindowsize -- Window size, in seconds.

ift -- source signal function table. Deferred-allocation tables (see GEN01) are accepted, but the opcode expects a mono source.

## Examples

Here is an example of the paulstretch opcode. It uses the file paulstretch.csd

Example 671. Example of the paulstretch opcode.

    <CsoundSynthesizer>
    <CsOptions>
    -o paulstretch.wav -W
    </CsOptions>
    <CsInstruments>
    sr = 44100
    ksmps = 100
    0dbfs = 1
    nchnls = 2

    giwav ftgen 0, 0, 0, 1, "fox.wav", 0, 0, 1

    instr 1
    aout paulstretch 10, 0.2, giwav
    outs aout, aout
    endin

    </CsInstruments>
    <CsScore>
    i1 0 30

    </CsScore>
    </CsoundSynthesizer>

## Credits

Author: Paul Batchelor
May 2016

Prev | Up | Next
passign | Home | pcauchy