next up previous contents index
Next: Waveshaping using an exponential Up: Examples Previous: Waveshaping and difference tones   Contents   Index

Waveshaping using Chebychev polynomials

Patch E05.chebychev.pd(Figure 5.12) demonstrates how you can use waveshaping to generate pure harmonics. We'll limit ourselves to a specific example here; for all the details see [Leb79]. In this example we would like to generate the pure fifth harmonic,

Figure 5.12: Using Chebychev polynomials as waveshaping transfer functions.
\begin{figure}\psfig{file=figs/fig05.12.ps}\end{figure}

\begin{displaymath}
\cos(5 \omega n)
\end{displaymath}

by waveshaping a sinusoid

\begin{displaymath}
x[n] = \cos (\omega n)
\end{displaymath}

We just need to find a suitable transfer function $f(x)$. Our technique is to use the formula for the waveshaping function $f(x) = x^5$ (page [*]), which gives first, third and fifth harmonics; then we add a suitable multiple of $x^3$ to cancel the third harmonic, then a multiple of $x$ to cancel the first harmonic:

\begin{displaymath}
16 {x^5} = \cos (5 \omega n) + 5 \cos(3 \omega n) + 10 \cos(\omega n)
\end{displaymath}


\begin{displaymath}
16 {x^5} - 20 {x^3} = \cos (5 \omega n) - 5 \cos(\omega n)
\end{displaymath}


\begin{displaymath}
16 {x^5} - 20 {x^3} + 5 x = \cos (5 \omega n)
\end{displaymath}

and so we choose

\begin{displaymath}
f(x) = 16 {x^5} - 20 {x^3} + 5 x
\end{displaymath}

This can be done in the same way to isolate any desired harmonic; the resulting functions $f$ are known as Chebychev polynomials.

To incorporate this in a waveshaping instrument, we simply build a patch that works as in Figure 5.5, computing the expression

\begin{displaymath}
x[n] = f( p[n] \cos(\omega n))
\end{displaymath}

where $p[n]$ is a suitable index which may vary as a function of the sample number $n$.

By suitably combining Chebychev polynomials we can fix any desired superposition of components in the output waveform. But the real promise of waveshaping--that by simply changing the index we can manufacture spectra that evolve in a variety of interesting ways--is not addressed, at least directly, in the Chebychev picture.


next up previous contents index
Next: Waveshaping using an exponential Up: Examples Previous: Waveshaping and difference tones   Contents   Index
msp 2003-08-09