0
0

As a rank beginner to filters, I was able to use the High and Low pass filters built into Fmod to create a Bandpass filter.

Now I need to create a Bandstop filter. I did a bit of research, found some code, and asked a couple of questions on a dsp forum. One of the people suggested that I do the following:[code:214skn6v]f= (frequency * 2 * pi) / samplerate

peak = band * (2-q*2); //this will be a bandpass filter with variable slope adjusted by q
hi = input – (low + peak)
band += hi * f;
low += band * f;

you can get a notch by either:

1) low+high
2) input – peak

low+high will behaved in a slightly odd way, while input – peak will be the oposite of peak, a notch with adjustable slopes. the maximum cut for such a filter is not very much, you can improve the cut by oversampling the filter, or running multiple of it in series.[/code:214skn6v]

From the sound of it, I should use the "input – peak" method.

So now I’m trying to understand and apply this to my program. (Let me be the first person to admit that I am still a beginner in the whole Fmod world also!)

Here is where the Fmod questions come in … At this point, I am assuming that the "samplerate" is the soundcards output rate of 48000 Hz. My main question involves the frequency component. Would I be correct in thinking that the *inbuffer, and *outbuffer given in the FMOD_DSP_READCALLBACK function are not in the frequency domain? Does Fmod have anything that can get me this data?

Or have I got myself totally lost? 😉

• You must to post comments
0
0

Hi –

For practical reasons, the vast majority of filters are normally implemented in the time domain. Doing frequency domain filtering is possible but very slow and not as flexible as you might think.

The algorithm in your example doesn’t look like any DSP I’ve ever seen. I don’t think it can work and will just be a source of confusion for you. It looks like it’s perhaps an analog filter (not what you want).

If you want a notch filter you could try this as a starting point:
http://www.musicdsp.org/showone.php?id=35

FMOD’s I/O buffers are time domain samples, upon which a filter can operate.

If you are interested in DSP, it’s strongly recommended to do some background reading, such as :

• Rabiner, Lawrence R. & Gold, Bernard, Theory and application of digital signal processing
• Proakis, J.G. and Manolakis, D.G., Digital signal processing: principles, algorithms and applications
• You must to post comments
Showing 1 result