next up previous contents index
Next: Examples Up: Fourier analysis and resynthesis Previous: Phase relationships between channels   Contents   Index


Phase bashing

In Section 2.3 on enveloped sampling we saw how to make a periodic waveform from a recorded sound, thereby borrowing the timbre of the original sound but playing it at a specified pitch. If the window into the recorded sound is made to precess in time, the resulting timbre varies in imitation of the recorded sound.

One important problem arises, which is that if we take waveforms from different windows of a sample (or from different samples), there is no guarantee that the phases of the two match up. If they don't the result can be ugly, since the random phase changes are heard as frequency fluctuations. This can be corrected using Fourier analysis and resynthesis [Puc05].

Figure 9.13: Phase-bashing a recorded sound (here, a sinusoid with rising frequency) to give a series of oscillator wavetables.
\begin{figure}\psfig{file=figs/fig09.13.ps}\end{figure}

Figure 9.13 shows a simple way to use Fourier analysis to align phases in a series of windows in a recording. We simply take the FFT of the window and then set each phase to zero for even values of $k$ and $\pi $ for odd ones. The phase at the center of the window is thus zero for both even and odd values of $k$. To set the phases (the arguments of the complex amplitudes in the spectrum) in the desired way, first we find the magnitude, which can be considered a complex number with argument zero. Then multiplying by $(-1)^k$ adjusts the amplitude so that it is positive and negative in alternation. Then we take the inverse Fourier transform, without even bothering to window again on the way back; we will probably want to apply a windowing envelope later anyway as was shown in Figure 2.7. The results can be combined with the modulation techniques of Chapter 6 to yield powerful tools for vocal and other imitative synthesis.


next up previous contents index
Next: Examples Up: Fourier analysis and resynthesis Previous: Phase relationships between channels   Contents   Index
Miller Puckette 2006-12-30