Harmonix content formula
Paul Schreiber
synth1 at airmail.net
Tue Jun 8 16:30:40 CEST 1999
Yes, it's called the FFT (Fast Fourier Transform). It is a moderately easy
dSP algorithm that you
1) digitize 1 cycle of the waveform (the more points, the better!)
2) decide how accurate you need the output data to be. This is a trade-off
of computation time. Some FFTs are "real-time"
like the spectrum display on the MP3 player WinAmp. But, if you are doing
this "off-line" on a PC then it doesn't matter.
The accuracy is decided on:
a) how many "bands" of analysis you need (every 1Hz? every 10Hz?, etc. These
are called "frequency bins" (weird name!))
b) the FFT data you get *out* is like a histogram, showing *frequency
content* (harmonics) versus "strength". The "strength"
data will bleed from bin-to-bin,. To "correct" for this, you apply a
"windowing function" (correction factor) to the data
at the last step. Most audio data uses a "Blackman-Harris" window (again,
you multiply the FFT data by this function to get
"a more better" answer.)
Now...the EASIEST way to do this is a program called MathCAD. W95/98 program
that is, as we say in Texas,
slicker than greased owl shit. All you need is an ASCII file of your sampled
wavefor data (for an FFT, you need to give it
a sample length of a power of 2, like 1024 points, etc. The MORE points per
wavefom cycle, the MORE frequency bins
you can resolve). MathCAD has a built-in FFT AND a built-in Blackman-Harris
window! Instant frequency analyzer!
Then (if you like W95/98) you can cut-paste these FFT plots into any MS
application. You can EXPORT the FFT data
into 20 different file formats.
Going "baackwards" is called the "inverse FFT".
If you are DYING to know "how the FFT does this" a good book is:
"DFT/FFT and Convolution Algorithms" by Burrus & Parks. (Wiley Interscience
Series)
The *BEST* FFT book (as little math as possible) is BY FAR
"The FFT: Fundamentals and Concepts" by Robert W. Ramirez. This is the ONLY
"math" book
I've seen with SCOPE PHOTOS demonstrating to us EE's what the ^@$# is going
on. HIGHLY RECOMMENDED.
The scope shots on page 24 are worth the book alone.
For my MSEE, I took 1 ENTIRE class on *just* the FFT. ZZZzzzzzzzz.....
Paul Schreiber
-----Original Message-----
From: Paul Maddox <space_banana at hotmail.com>
To: synth-diy at mailhost.bpa.nl <synth-diy at mailhost.bpa.nl>
Date: Tuesday, June 08, 1999 5:12 AM
Subject: Harmonix content formula
>Dear all,
>
>Is there some formula for working out the harmonic content of any wave? and
>conversly is there a formula for re-constructing the wave?
>
> Paul
>
>
>
>*******************************************************
>* Modulus DIY Web Page ;- *
>* http://www.geocities.com/siliconvalley/park/2707 *
>* E-Mail ;- *
>* Space_banana at hotmail.com *
>*******************************************************
>
>
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>
More information about the Synth-diy
mailing list