Clicks when setting FIR filters coefficients...

Status
Not open for further replies.

rebillat

Member
Hi all,

I'm new to the forum and new to "the Teensy with its AUDIO shield" community , and I find it extremely promising.

In the project I'd like to develop, I need to set up dynamically coefficients of FIR filters. In order to do so, I moved to the audio/Filter_FIR example and played with it.
My main concern is that when I set the coefficients of a FIR filter (even when setting the SAME coefficients) I have some audible clicks that appears...
I attached a minimal example of source code that illustrates that point.

If any of you have some idea to remove those unpleasant clicks, I'll be very grateful!

Thanks a lot in advance.

Marc

PS:
- I also tried to play with biquad filters and there is no problem changing dynamically their coefficients
- This may be due to that part of the library specifically developped for biquads: https://github.com/PaulStoffregen/Audio/blob/master/filter_biquad.cpp
 

Attachments

  • FilterFirMini.ino
    3.6 KB · Views: 84
Hi Marc,

Have you find solution for 'clicks'?
I trying to solve that problem too.

Regards,
Radek

Hi Radek,

Unfortunately, no. I'm not skillfull enough in programming to solve this issue. I'm more an end user than a core developper.
By the way, if you end up with a solution I'llbe very glad testing it.
Best regards.

Marc
 
If any of you have some idea to remove those unpleasant clicks, I'll be very grateful!
Don't know if it removes the clicks, but you should call myFilter(L/R).begin only once (i.e. in setup and not in loop)
I you wanted to change the filter, change the values of the FIR coefficients.
 
Don't know if it removes the clicks, but you should call myFilter(L/R).begin only once (i.e. in setup and not in loop)
I you wanted to change the filter, change the values of the FIR coefficients.

Hi WMXZ,

Thanks for your reply. Indeed it seems interesting to run myFIR.begin only once as it may be the reason for the clicks. However, to my (poor) knowledge of the Audio Library, I don't know any other ways than myFIR.begin to set up the values of the FIR coefficients. Could you tell me more about the one you have in mind?

Thanks in advance (even if I burnt my Teensies and won't be able to test it quickly...)!

Marc
 
Status
Not open for further replies.
Back
Top