Page 1 of 1

FIR filter module

Posted: Tue Sep 09, 2014 8:50 am
by jotb
Hi,

if there a simple FIR-filter module for flowstone? or a simple to adjust code.
I just need high/lowpass with adjustable cutoff frequency and maybe some finetuning options

thanks,
jotb

Re: FIR filter module

Posted: Sun Sep 14, 2014 4:22 pm
by martinvicanek
Why a FIR filter? IIR filters are more flexible, more efficient in terms of CPU, and easier to design.

Re: FIR filter module

Posted: Sun Sep 14, 2014 6:20 pm
by KG_is_back
martinvicanek wrote:Why a FIR filter? IIR filters are more flexible, more efficient in terms of CPU, and easier to design.


Assuming form other posts and topics jotb is looking for a linear phase filter. I've already recommended bidirectional IIR filter for that matter.

Re: FIR filter module

Posted: Mon Sep 15, 2014 1:12 am
by MyCo

Re: FIR filter module

Posted: Wed Sep 17, 2014 1:14 pm
by Perfect Human Interface
MyCo wrote:http://www.dsprobotics.com/support/viewtopic.php?f=3&t=1487&start=10#p6877


I came across this earlier. Is there a way you might be able to give me a dumbed down explanation of what some of the modules in there are for? I found it rather confusing, especially things like the bar graph editor in there.

In general I just don't know my way around the concept of a FIR filter beyond a broad definition... I need one for a resonant feedback delay effect, and I was told I need to adjust the number of taps in the delay in order to broaden the useable range of the effect (and presumably the more taps the more CPU use, so I'll have to figure out the right compromise).

Re: FIR filter module

Posted: Wed Sep 17, 2014 4:16 pm
by jotb
thank you!
and yes I am looking for linear phase filters.
I just have problems to get used to the examples.
For example, how do I get a highpass filter with cutoff frequency=200hz and 128 coefficients??

Re: FIR filter module

Posted: Wed Sep 17, 2014 5:49 pm
by KG_is_back
jotb wrote:thank you!and yes I am looking for linear phase filters.I just have problems to get used to the examples.For example, how do I get a highpass filter with cutoff frequency=200hz and 128 coefficients??

Use bar graph with 64values for the frequency domain. They are linearly scaled from 0Hz(DC) to nyquist. Set them so that values before 200hZ mark are zero and after are one. Now you will need to scale the phase. It is a line that goes from 0 at DC to 64pi at nyquist. Then you'll wrap it using modulo (value%2pi) so it's in proper ranges.
Mirror both amplitude and phase spectrums (this is hard to explain) and perform iFFT and you will get impulse response=set of coefficients.

Re: FIR filter module

Posted: Wed Sep 17, 2014 8:33 pm
by jotb
to be honest, I did not understand that :oops:

Re: FIR filter module

Posted: Wed Sep 17, 2014 8:59 pm
by KG_is_back
jotb wrote:to be honest, I did not understand that


There is a stock module - additive oscillator. In its front view you can specify the volume of harmonics, then this frequency graph is converted into time domain graph (the period of the osc which is then used as a wavetable)

That module does almost exactly what you are looking for - converts frequency graph to time domain graph. with little tweaking you can modify it to produce impulse responses.