Spectrum Analyzer Morph

John.Maloney at disney.com John.Maloney at disney.com
Fri Sep 24 22:45:11 UTC 1999


>Yeah, I played with it as soon as I updated to it.  Same thing - got a lot
>of people wondering if I'd lost my mind (again) due to the funny (-ier than
>normal) noises.  You're right, it's pretty impressive considering the
>nature of the environment.

I was working on the code for this on a flight back from the
east coast and, after casting a number of nervous glances at
me, the guy next to me finally asked "Do you always sing to your
computer?"

He looked relieved when I explained what I was doing...

Note that the "sonogram" mode tries to show you all the data,
even if i can't keep up with real time. Thus, on a slow machine,
it can fall further and further behind while stealing most of
the CPU cycles. The cure is use lower sampling rates and,
somewhat contrary to intution, *larger* FFT sizes. The reason
larger FFT sizes are more efficience is that they consume
more data for each display update cycle.

Note that you can really see the "FFT Uncertain Principle"
at work by trying different FFT sizes. A larger FFT size gives
you good frequency but poor time resolution, while the converse
is true of smaller FFT sizes. If your machine is fast enough to
keep up, higher sampling rates give you more frequency resolution
for a given time resolution.

One cool demo I like to give is to push up the gain to the
point where the signal starts to clip. A nice "clean" spectrum
such the one you get by whistling suddenly generates a bunch
of spurious harmonics as the peaks of the signal get lopped off...

Another cool demo is the dramatic difference in the spectrum of
a hissing noise (the "s" sound) versus that of a vowel
sound ("ee" or "u").

I had a course on signal processing way back when, but this
tool really made all the concepts come alive in a new way.
I wish I had Squeak back then.

	-- John





More information about the Squeak-dev mailing list