Zero Delay Feedback Filter

DSP related issues, mathematics, processing and techniques
User avatar
martinvicanek
Posts: 1334
Joined: Sat Jun 22, 2013 8:28 pm

Re: Zero Delay Feedback Filter

Post by martinvicanek »

KG_is_back wrote: 90degree phase shifter

There is an allpass filter pair with 90 degree phase difference here. Trog optimized it and used it for some cool frequency shifting effects.
User avatar
MegaHurtz
Posts: 105
Joined: Mon Aug 11, 2008 6:29 pm
Location: Eindhoven/Nederland

Re: Zero Delay Feedback Filter

Post by MegaHurtz »

Got me inspired for an analog sound project :D This is digitally so unfulfilling, supressing a low carrier.
Getting a little PCB started.
192k @ 8ms
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Zero Delay Feedback Filter

Post by KG_is_back »

martinvicanek wrote:
KG_is_back wrote: 90degree phase shifter

There is an allpass filter pair with 90 degree phase difference here. Trog optimized it and used it for some cool frequency shifting effects.

Yes, I know about that one. It's usual hilbert transformer that phase-shifts two signals that they are in quadrature (90degree phase shift between them). I was thinking more of something that would shift output 90degree relative to input
User avatar
martinvicanek
Posts: 1334
Joined: Sat Jun 22, 2013 8:28 pm

Re: Zero Delay Feedback Filter

Post by martinvicanek »

KG_is_back wrote:shift output 90degree relative to input

I think this can only be done with a FIR filter, not with an IIR.
User avatar
MegaHurtz
Posts: 105
Joined: Mon Aug 11, 2008 6:29 pm
Location: Eindhoven/Nederland

Re: Zero Delay Feedback Filter

Post by MegaHurtz »

If you dont mind the phase being warped at the niquist freq, you can use iir 1st order allpass filter?
Edit I see, made it jump to 180. Tho there seem to be voltage sensing networks out there.
192k @ 8ms
User avatar
MegaHurtz
Posts: 105
Joined: Mon Aug 11, 2008 6:29 pm
Location: Eindhoven/Nederland

Re: Zero Delay Feedback Filter

Post by MegaHurtz »

It's a life sentence :lol: Once you go 2nd you can never return! Back to release day.
192k @ 8ms
adamszabo
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: Zero Delay Feedback Filter

Post by adamszabo »

Thanks Martin for this!

Here is an optimized version I made:

Code: Select all

streamin in;   // audio in
streamin f;      // cutoff frequency (0-1)
streamin q;      // resonance (>0)
streamout LP;   // lowpass out
streamout HP;   // highpass out
streamout BP;   // bandpass out (constant skirt)

// Padé coefficients
float F1=1.0;
float a0=16.25477937;
float a1=-4.456340011;
float a2=0.104719689;
float b0=10.34811394;
float b1=-11.34797665;
float denorm=1e-11;

mov eax,ecx;
and eax,31;
cmp eax,0;
jnz hop;
movaps xmm0,f;
mulps xmm0,xmm0;
movaps xmm1,a2;
mulps xmm1,xmm0;
addps xmm1,a1;
mulps xmm1,xmm0;
addps xmm1,a0;
mulps xmm1,f;
movaps xmm2,b1;
addps xmm2,xmm0;
mulps xmm2,xmm0;
addps xmm2,b0;
divps xmm1,xmm2;
movaps k,xmm1;
movaps xmm0,F1;
divps xmm0,q;
addps xmm0,xmm1;
movaps r,xmm0;
mulps xmm1,xmm0;
movaps xmm0,F1;
addps xmm1,xmm0;
divps xmm0,xmm1;
movaps g,xmm0;
hop:

movaps xmm0,in;
movaps xmm1,r;
mulps xmm1,x;
addps xmm1,y;
subps xmm0,xmm1;
mulps xmm0,g;
addps xmm0,denorm;
subps xmm0,denorm;
movaps HP,xmm0;
movaps xmm1,xmm0;
mulps xmm1,k;
addps xmm1,x;
movaps BP,xmm1;
movaps xmm2,xmm1;
mulps xmm2,k;
addps xmm2,y;
movaps LP,xmm2;
mulps xmm0,k;
addps xmm0,xmm1;
movaps x,xmm0;
mulps xmm1,k;
addps xmm1,xmm2;
movaps y,xmm1;
tor
Posts: 114
Joined: Fri Sep 24, 2010 5:54 pm

Re: Zero Delay Feedback Filter

Post by tor »

Great work Martin! :)

Here you have an oversampled version of it:
2ndOrdZDF_OS.fsm
(20.55 KiB) Downloaded 1586 times

Can sombody (Martin?) please point me in the right direction on how to make peak and shelving filters with this structure, if possible?
User avatar
MegaHurtz
Posts: 105
Joined: Mon Aug 11, 2008 6:29 pm
Location: Eindhoven/Nederland

Re: Zero Delay Feedback Filter

Post by MegaHurtz »

You can make a shelve by mixing "resonant" lowpass/highpass with the dry signal.
And you can make a peak filter by mixing in a "resonant" bandpass/notch with the dry signal.
192k @ 8ms
tor
Posts: 114
Joined: Fri Sep 24, 2010 5:54 pm

Re: Zero Delay Feedback Filter

Post by tor »

i made an attempt at that but it did not seem to work correctly. Maybe I was to quick in my asumption that phase issues lead to trouble?
Post Reply