I'm wondering whether something like this is possible (and relatively easy to do), and if so, how I could do it?
I would like to do band filtering on a wave file I'm reproducing. Something similar to the "Equalizer" you see in most Winamp-like applications.
My idea is, however, not to equalize the sound, but to use very high negative dB values, to almost kill the band I'm filtering.
The first question is: Does DirectSound give me something that allows me to do this?
If not: How would you go around implementing this?
I know (although I don't quite understand it completely) that you can convert from the sampled waveform to the distribution of frequencies using a Fast Fourier Transform. Now, I obviously can't go back from that distribution to the original waveform after changing the amplitude values of certain frequencies :-)
How could I do something like this?
Also, how precise can I make these filters? (If I wanted to filter out everything from 2250Hz to 2275Hz, what would be the error a filter would have? What would the maximum precision that I can get depend on?)
Thanks!
I don't know if DirectSound offers this functionality, I'd assume it doesn't since DSP is fairly complicated and often varies a great deal from situation to situation. What you want to do is typically called "filtering" in DSP (digital signal processing). Many times this involves using a FIR (finite impulse response) filter. There are many libraries out there to do exactly what you want. On of the trickiest aspects of filter design is that there are always tradeoffs betwen speed, accuracy, and error. In your example, you will be able to remove signal between frequencies but this will also effect the surrounding frequencies. The amount it will effect is related to processing time and filter design.
Perhaps start here (math heavy) : FIR Filter
Then google for your own Windows/DirectSound specific FIR related information