Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Bidirectional IIR filter

Post any examples or modules that you want to share here

Re: Bidirectional IIR filter

Postby Tronic » Mon Jan 27, 2014 9:32 pm

Just out of curiosity, have you tried also using modulated signals?
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: Bidirectional IIR filter

Postby KG_is_back » Mon Jan 27, 2014 10:34 pm

Tronic wrote:Just out of curiosity, have you tried also using modulated signals?


I have tried real tracks too.... to make the long story short - THE FILTER WORKS! If you meet the previously mentioned limitations (about the IR length) the filter is linear phase, has no artifacts (at least not more than usual filter). Works for any type of signal input.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Bidirectional IIR filter

Postby Tronic » Tue Jan 28, 2014 3:20 am

I'm sorry, I did not insinuate that does not work, but I have not got to try it in depth, so I asked.
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: Bidirectional IIR filter

Postby steph_tsf » Sun May 11, 2014 8:59 am

Me to, I can testimony that the bidirectional IIR filter works! When the buffersize is bigger than 256 samples, the 1 kHz distortion spectrum falls under the -120 dB line. See attached screenshot. The weak distorsion peaks that you see, are already in the test signal, coming from Flowstone built-in Sine component.

bidir IIR LR xover distortion (500).png
bidir IIR LR xover distortion (500).png (55.1 KiB) Viewed 24265 times

I did a 2-way Linkwitz-Riley 4th-order crossover. One Butterworth 2nd-order in the forward direction, plus the same Butterworth 2nd-order in the reverse direction. It makes a 4th-order filter in total.
The knob defines the crossover frequency.
IMO, the buffersize should be set to 256.

The lowpass and highpass magnitudes are plain normal, just as expected.
What makes the bidirectional IIR filter so remarkable, is the linear phase it delivers.
See the lowpass and highpass impulse responses (green curves).

bidir IIR LR xover lowpass (500).png
bidir IIR LR xover lowpass (500).png (59.85 KiB) Viewed 24265 times

bidir IIR LR xover highpass (500).png
bidir IIR LR xover highpass (500).png (58.92 KiB) Viewed 24265 times

This is truly fantastic.
Oh, and CPU load remains light.

Thanks kohugaly and MyCo a million for pointing the bidirectional IIR technique on Synthmaker forum!
http://www.synthmaker.co.uk/forum/viewtopic.php?f=10&t=11866

Thanks KG_is_back (= kohugaly ?) for bringing it here, on Flowstone forum!
Last edited by steph_tsf on Mon May 12, 2014 5:05 pm, edited 3 times in total.
steph_tsf
 
Posts: 249
Joined: Sun Aug 15, 2010 10:26 pm

Re: Bidirectional IIR filter

Postby steph_tsf » Sun May 11, 2014 9:04 am

Here attached is the .fsm I'm talking about.
bidir LR xover (500).png
bidir LR xover (500).png (71.76 KiB) Viewed 24265 times
Attachments
bidirectional_IIR_xover.fsm
(9.51 KiB) Downloaded 1204 times
Last edited by steph_tsf on Mon May 12, 2014 5:07 am, edited 1 time in total.
steph_tsf
 
Posts: 249
Joined: Sun Aug 15, 2010 10:26 pm

Re: Bidirectional IIR filter

Postby martinvicanek » Sun May 11, 2014 4:10 pm

That's some cool stuff there! 8-)
steph_tsf wrote:IMO, the buffersize should be set to 256.
Obviously that depends on the filter ringing duration, which is inversely proportional to the crossover frequency. buffer=256 works well for Fc > 600 Hz. For Fc down to 300 Hz I found buffer=512 necessary to avoid artifacts.
Thanks a million for pointing this!
You're welcome. Actually you had the idea some time ago, see earlier in this thread, so you can thank yourself. :lol:
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Bidirectional IIR filter

Postby KG_is_back » Sun May 11, 2014 4:26 pm

If the filters should be complementary, there's no need to compute both of them. Calculate the lowpass and the highpass = input - lowpass ...You save almost 50%cpu (don't forget about the latency when subtracting form input).
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Bidirectional IIR filter

Postby tester » Sun May 11, 2014 4:38 pm

KG_is_back wrote:If the filters should be complementary, there's no need to compute both of them. Calculate the lowpass and the highpass = input - lowpass ...You save almost 50%cpu (don't forget about the latency when subtracting form input).


Yep, I was always curious about that approach.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: Bidirectional IIR filter

Postby steph_tsf » Sun May 11, 2014 8:26 pm

KG_is_back wrote:If the filters should be complementary, there's no need to compute both of them. Calculate the lowpass and the highpass = input - lowpass ...You save almost 50%cpu (don't forget about the latency when subtracting form input).
Good point. However, it's not that esay to precalculate the required delay. It depends Fc. The dumb "lowpass" and "highpass" calculation allows using a single knob for modifying Fc.

I remain truly astonished by the fact that no windowing is required in the forward/reverse patchwork. We observe boundary artifact natural cancellation. This is worth investigating, IMO.
steph_tsf
 
Posts: 249
Joined: Sun Aug 15, 2010 10:26 pm

Re: Bidirectional IIR filter

Postby KG_is_back » Mon May 12, 2014 5:36 am

steph_tsf wrote:Good point. However, it's not that esay to precalculate the required delay. It depends Fc. The dumb "lowpass" and "highpass" calculation allows using a single knob for modifying Fc.


False! The latency delay is simply the buffersize ;-)
steph_tsf wrote:I remain truly astonished by the fact that no windowing is required in the forward/reverse patchwork. We observe boundary artifact natural cancellation. This is worth investigating, IMO.


it is simple actually... signal is divided int two windowed signals that can be added and recreate original signal. Filtering is linear, therefore if you apply the same filtering to both before adding it is the same as applying the filtering to original:
B+C=A
(B+C) x f = A x f
B x f + C x f = A x f

The filtering is applied to reverse windows, but the windows are rectacular and they (almost) ring out before they reach end, so they behave like if full non-windowed signal was reversed and filtered.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

PreviousNext

Return to User Examples

Who is online

Users browsing this forum: No registered users and 43 guests