# Re: [music-dsp] Phase vocoder

Hi Alex,
a phase vocoder changes the duration of a signal by modifying its STFT
representation. To avoid artefacts due to sinusoidal
component discontinuity introduced by the modification is required to
modify the phase.

Think of an STFT as a 2D matrix (time/frequency) containing
coefficients for each sinusoidal component of the original signal for each
time frame analyzed. Each coefficient represents both magnitude and phase
of the sinusoidal component. The magnitude contains information about the
'power/energy' of the sinusoid, whereas the phase tells you its 'starting
angle/position' (for example, if you shift by pi/2 or 90° the phase of a
sine wave you would obtain a cosine wave).

Now, what can you do to modify the duration using the STFT representation?
As you would do with OLA, you can modify the time axis by shifting the
position of the time frames (with the STFT this is obtained by choosing a
different hop size for synthesis ISTFT respect to the one used in the
analysis STFT).

For the sake of simplicity let's assume that the signal is periodic and
let's focus on what happens on a single frequency 'row' in adjacent time
position after the time shift. What you are likely to find is a
discontinuity in the sinusoidal component as shown in (b) in the picture.
This need to be avoided if you want to preserve the
stationary/continuous nature of sinusoidal elements. Intuitively, the phase
propagation is used to synthesize a phase such that the discontinuity would
be avoided as shown in (c).

[image: pv.JPG]

If you are interested I point you to a good review paper on time stretching
by Driedger and Muller called "A Review of Time-Scale Modifications of
Music Signals" at https://www.mdpi.com/2076-3417/6/2/57 (the image is taken
from there!)

Hope this helps,
Davide

On Thu, 28 Feb 2019 at 18:16, Alex Dashevski <alexd...@gmail.com> wrote:

> Hi,
> I'm trying to understand how the Phase Vocoder works.
> My question is:
> Why the problem is just in phase on overlapping. What about
> amplitude/magnitude ?
> I'm not sure if I understood a main idea of the phase propagation.
> interpretation: FilterBank and Fourier Transform. But I can't understand it.
>
> Thanks,
> Alex
> _______________________________________________
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp
_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp