miller-book/node196.html

244 lines
8.6 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<TITLE>Transition splicing</TITLE>
<META NAME="description" CONTENT="Transition splicing">
<META NAME="keywords" CONTENT="book">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="book.css">
<LINK REL="previous" HREF="node195.html">
<LINK REL="up" HREF="node193.html">
<LINK REL="next" HREF="node197.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html3497"
HREF="node197.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="next.png"></A>
<A NAME="tex2html3491"
HREF="node193.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="up.png"></A>
<A NAME="tex2html3487"
HREF="node195.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="prev.png"></A>
<A NAME="tex2html3493"
HREF="node4.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="contents.png"></A>
<A NAME="tex2html3495"
HREF="node201.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="index.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html3498"
HREF="node197.html">Examples</A>
<B> Up:</B> <A NAME="tex2html3492"
HREF="node193.html">Predicting and controlling foldover</A>
<B> Previous:</B> <A NAME="tex2html3488"
HREF="node195.html">Sneaky triangle waves</A>
&nbsp; <B> <A NAME="tex2html3494"
HREF="node4.html">Contents</A></B>
&nbsp; <B> <A NAME="tex2html3496"
HREF="node201.html">Index</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION001443000000000000000">
Transition splicing</A>
</H2>
<P>
In the point of view developed in this chapter, the energy of the spectral
components of classical waves can be attributed entirely to their jumps and
corners. This is artificial, of course: the energy really emanates from the
entire waveform. Our derivation of the spectrum of the classical waveforms
uses the jumps and corners as a bookkeeping device, and this is possible
because the entire waveform is determined by their positions and magnitudes.
<P>
Taking this ruse even further, the problem of making band-limited versions of
classical waveforms can be attacked by making band-limited versions of the
jumps and corners. Since the jumps are the more serious foldover threat, we
will focus on them here, although the approach described here works perfectly
well for corners as well.
<P>
<DIV ALIGN="CENTER"><A NAME="fig10.09"></A><A NAME="14478"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 10.9:</STRONG>
A square wave, band-limited to partials 1, 3, 5, 7, 9, and 11. This
can be regarded approximately as a series of band-limited step functions arranged
end to end.</CAPTION>
<TR><TD><IMG
WIDTH="474" HEIGHT="109" BORDER="0"
SRC="img1370.png"
ALT="\begin{figure}\psfig{file=figs/fig10.09.ps}\end{figure}"></TD></TR>
</TABLE>
</DIV>
<P>
To construct a band-limited step function, all we have to do is add the Fourier
components of a square wave, as many as we like, and then harvest the step
function at any one of the jumps. Figure <A HREF="#fig10.09">10.9</A> shows the partial
Fourier sum corresponding to a square wave, using partials 1, 3, 5, 7, 9, and
11. The cutoff frequency can be taken as <IMG
WIDTH="29" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img1371.png"
ALT="$12\omega$"> (if <IMG
WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img27.png"
ALT="$\omega $"> is the
fundamental frequency).
<P>
If we double the period of the square wave, to arrive at the same cutoff
frequency, we would add twice as many Fourier partials, up to number 23, for
instance. Extending this process forever, we would eventually see the ideal
band-limited step function, twice per (arbitrarily long) period.
<P>
In practice we can do quite well using only the first two partials (one and
three times the fundamental). Figure <A HREF="#fig10.10">10.10</A> (part a) shows
a two-partial approximation of a square wave. The cutoff frequency is
four times the fundamental; so if the period of the waveform is eight
samples, the cutoff is at the Nyquist frequency. Part (b) of the
figure shows how we could use this step function to synthesize, approximately,
a square wave of twice the period. If the cutoff frequency is the Nyquist
frequency, the period of the waveform of part (b) is 16 samples. Each
transition lasts 4 samples, because the band-limited square wave has a period
of eight samples.
<P>
<DIV ALIGN="CENTER"><A NAME="fig10.10"></A><A NAME="14485"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 10.10:</STRONG>
Stretching a band-limited square wave: (a) the original waveform;
(b) after splicing in horizontal segments; (c) using the same step transition
for a sawtooth wave.</CAPTION>
<TR><TD><IMG
WIDTH="474" HEIGHT="376" BORDER="0"
SRC="img1372.png"
ALT="\begin{figure}\psfig{file=figs/fig10.10.ps}\end{figure}"></TD></TR>
</TABLE>
</DIV>
<P>
We can make a band-limited sawtooth wave by adding the four-sample-long
transition to a ramp function so that the end of the resulting function meets
smoothly with itself end to end, as shown in part (c) of the
figure.
There is one transition per period, so the period must be at least four
samples; the highest fundamental frequency we can synthesize this way is half
the Nyquist frequency. For this or lower fundamental frequency, the foldover
products all turn out to be at least 60 dB quieter than the fundamental.
<P>
<DIV ALIGN="CENTER"><A NAME="fig10.11"></A><A NAME="14490"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 10.11:</STRONG>
Block diagram for making a sawtooth wave with a spliced transition.</CAPTION>
<TR><TD><IMG
WIDTH="199" HEIGHT="389" BORDER="0"
SRC="img1373.png"
ALT="\begin{figure}\psfig{file=figs/fig10.11.ps}\end{figure}"></TD></TR>
</TABLE>
</DIV>
<P>
Figure <A HREF="#fig10.11">10.11</A> shows how to generate a sawtooth wave with a spliced
transition. The two parameters are <IMG
WIDTH="13" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img112.png"
ALT="$f$">, the fundamental frequency, and <IMG
WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img21.png"
ALT="$b$">,
the band limit, assumed to be at least as large as <IMG
WIDTH="13" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img112.png"
ALT="$f$">. We start with a
digital sawtooth wave (a phasor) ranging from -0.5 to 0.5 in value. The
transition will take place at the middle of the cycle, when the phasor crosses
0. The wavetable is traversed in a constant amount of time, <IMG
WIDTH="26" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img1374.png"
ALT="$1/b$">, regardless
of <IMG
WIDTH="13" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img112.png"
ALT="$f$">. The table lookup is taken to be non-wraparound, so that inputs out of
range output either -0.5 or 0.5.
<P>
At the end of the cycle the phasor discontinuously jumps from -0.5 to 0.5, but
the output of the transition table jumps an equal and opposite amount, so the
result is continuous. During the portion of the waveform in which the
transition table is read at one or the other end-point, the output describes
a straight line segment.
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html3497"
HREF="node197.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="next.png"></A>
<A NAME="tex2html3491"
HREF="node193.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="up.png"></A>
<A NAME="tex2html3487"
HREF="node195.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="prev.png"></A>
<A NAME="tex2html3493"
HREF="node4.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="contents.png"></A>
<A NAME="tex2html3495"
HREF="node201.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="index.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html3498"
HREF="node197.html">Examples</A>
<B> Up:</B> <A NAME="tex2html3492"
HREF="node193.html">Predicting and controlling foldover</A>
<B> Previous:</B> <A NAME="tex2html3488"
HREF="node195.html">Sneaky triangle waves</A>
&nbsp; <B> <A NAME="tex2html3494"
HREF="node4.html">Contents</A></B>
&nbsp; <B> <A NAME="tex2html3496"
HREF="node201.html">Index</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
Miller Puckette
2006-12-30
</ADDRESS>
</BODY>
</HTML>