next up previous contents index
Next: Exercises Up: Examples Previous: Reverberator   Contents   Index

Pitch shifter

Example G09.pitchshift.pd (Figure 7.33) shows a realization of the pitch shifter described in Section 7.9. A delay line (defined and written elsewhere in the patch) is read using two vd~ objects. The delay times vary between a minimum delay (provided as the "delay" control) and the minimum plus a window size (the "window" control.)

Figure 7.33: A pitch shifter using two variable taps into a delay line.
\begin{figure}\psfig{file=figs/fig07.33.ps}\end{figure}

The desired pitch shift in half-tones ($h$) is first converted into a transposition factor

\begin{displaymath}
t = {2 ^ {h/12}} = {e ^ {\log(2)/12 \cdot h}} \approx {e ^ {0.05776 h}}
\end{displaymath}

(called "speed change" in the patch). The computation labeled "tape head rotation speed" is the same as the formula for $f$ given on Page [*]. Here the positive interval (seven half-steps) gives rise to a transposition factor greater than one, and therefore to a negative value for $f$.

Once $f$ is calculated, the production of the two phased sawtooth signals and the corresponding envelopes parallels exactly that of the overlapping sample looper (example B10.sampler.overlap.pd, Page [*]). The minimum delay is added to each of the two sawtooth signals to make delay inputs for the vd~ objects, whose outputs are multiplied by the corresponding envelopes and summed.


next up previous contents index
Next: Exercises Up: Examples Previous: Reverberator   Contents   Index
Miller Puckette 2006-12-30