home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: Multimed
/
Multimed.zip
/
pm123v10.zip
/
realeq.txt
< prev
next >
Wrap
Text File
|
1998-06-16
|
3KB
|
76 lines
Real Equalizer
==============
This Equalizer is a THE real thing. A full fledged FIR designed with the
window method using OOURA's RDFT and a von Hann window. It's not the cheap
assed EQ in the MPEG audio decoding that distorses the sound more than
anything else... But because it's a real EQ, it uses juice. I mean major
juice. On my P150, it hits 45% CPU usage with a FIR order of 64 while
processing stereo 44.1kHz samples. I'm planning on using a Remez exchange
algorithm instead of the window method to optimize the FIR order needed to
achieve the desired result. All I know is that it can "significantly
reduce the order of a FIR filter", what that exactly means, I don't know. I
also don't want to use an IIR, as it's 1. too complicated for me at the
moment (unless I can get my hands on MatLAB), 2. might (hum) become
obsolete because of advancing CPU power, and because it dephases the sound
(lower quality).
To come back on the filter order for the casual user, this is the number of
samples processed (in addition to the current sample) to obtain a new
sample. What does this means? Ok say you are playing at 44100Hz, this
means there are 44100 samples passing per second in the filter also, right?
Ok, so say you'd like to catch 20Hz and filter that decently. This means
you will need a filter order of at least 44100/20-1 = 2204!!! With values
in this range, you can make your stereo EQ jealous. Get a Pentium II and
ditch your stereo.
This also means that with my small 64 filter order, I cannot process
frequencies under 44100/(64+1) = ~678Hz properly. So the choice of any
bands under this frequency might be irrelevant, and modifying one of the
other might give the same effect (if any effect at all). The 32 middle
bands are defined by step of 1/3 octave and are as follow in Hz (granted,
the first band and last band aren't that useful, but what the heck):
16
20,16
25,40
32
40,32
50,80
64
80,63
101,60
128
161,27
203,19
256
322,54
406,37
512
645,08
812,75
1024
1290,16
1625,50
2048
2580,32
3250,00
4096
5160,64
6501,00
8192
10321,27
13004,00
16384
20642,55
The FIR order needs to be a multiple of 2. The plansize is for the initial
FFT and therefore needs to be a power of 2. Just leave it at 4096, that's
fine, unless you are planning on playing anything way over 44100kHz.
Well ok so it's not very useful on a x86 machine... I'll have to see how
good it does with the Remez exchange or an IIR filter later, but you're
welcome to try now.
- Samuel Audet <guardia@cam.org>