Signal Generators: STFT Resynthesis (Vocoding)

## pvsynth, pvsadsyn

ar **pvsynth** fsig
ar **pvsadsyn** fsig, inoscs, kfmod[,ibinoffset, ibinincr, init]

### Description

Resynthesize an *fsig* using either FFT overlap-additive synthesis (**pvsynth**) or fast oscillator-bank additive sythesis(**pvsadsyn**).

### Initialization

*inoscs* – number of analysis bins to synthesize. Cannot be larger than the size of *fsrc* as created by **pvsanal**. See **pvsinfo**.

*ibinoffset* – the first (lowest) bin to resynthesize, counting from 0. Default is 0.

*ibinincr* – value to increment bins for resynthesis. Bins are resythesized *ibinincr* apart, starting with *ibinoffset*.

*init* – skip reinitialzation. Not currently implemented for any of the streaming **pvoc** opcodes.

### Performance

*kfmod* – factor by which to scale all frequencies.

- 1.0 = no change
- 2.0 = up one octave

**pvsadsyn** is experimental, and implements the oscillator bank using a fast direct calculation method, rather than a lookup table. This takes advantage of the fact that, for analysis by **pvsanal** at commonly used analysis rates, it is only necessary to interpolate amplitudes and not frequencies between frames. Resynthesis is often more accurate when **pvsanal** *iwinsize* = *ifftsize**2. Processing time is directly proportional to *inoscs*.

### Example

; resynth the first 100 odd-numbered bins, with pitch scaling envelope.
kpch **linseg** 1, p3/3, 1, p3/3, 1.5, p3/3, 1
aout **pvsadsyn** fsrc, 100, kpch, 1, 2

### Author

Richard Dobson

Somerset, England

August, 2001

New in Csound 4.14

Signal Generators: STFT Resynthesis (Vocoding)