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

Waveshaping using Chebychev polynomials

Example 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 in which 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 need to find a suitable transfer function $f(x)$. First we recall the formula for the waveshaping function $f(x) = x^5$ (Page [*]), which gives first, third and fifth harmonics:

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

Next we add a suitable multiple of $x^3$ to cancel the third harmonic:

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

and then a multiple of $x$ to cancel the first harmonic:

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

So for our waveshaping function we choose

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

This procedure allows us to isolate any desired harmonic; the resulting functions $f$ are known as Chebychev polynomials [Leb79].

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( a[n] \cos(\omega n))
\end{displaymath}

where $a[n]$ is a suitable index which may vary as a function of the sample number $n$. When $a$ happens to be one in value, out comes the pure fifth harmonic. Other values of $a$ give varying spectra which, in general, have first and third harmonics as well as the fifth.

By suitably combining Chebychev polynomials we can fix any desired superposition of components in the output waveform (again, as long as the waveshaping index is one). But the real promise of waveshaping--that by simply changing the index we can manufacture spectra that evolve in interesting but controllable 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
Miller Puckette 2006-12-30