Page 2 of 9
Re: Zero Delay Feedback Filter
Posted: Wed Feb 26, 2014 8:07 pm
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.
Re: Zero Delay Feedback Filter
Posted: Wed Feb 26, 2014 9:59 pm
by MegaHurtz
Got me inspired for an analog sound project

This is digitally so unfulfilling, supressing a low carrier.
Getting a little PCB started.
Re: Zero Delay Feedback Filter
Posted: Thu Feb 27, 2014 1:43 am
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
Re: Zero Delay Feedback Filter
Posted: Thu Feb 27, 2014 8:36 am
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.
Re: Zero Delay Feedback Filter
Posted: Thu Feb 27, 2014 9:03 am
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.
Re: Zero Delay Feedback Filter
Posted: Thu Feb 27, 2014 10:44 am
by MegaHurtz
It's a life sentence

Once you go 2nd you can never return! Back to release day.
Re: Zero Delay Feedback Filter
Posted: Thu Feb 27, 2014 12:35 pm
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;
Re: Zero Delay Feedback Filter
Posted: Tue Mar 04, 2014 9:32 am
by tor
Great work Martin!

Here you have an oversampled version of it:
Can sombody (Martin?) please point me in the right direction on how to make peak and shelving filters with this structure, if possible?
Re: Zero Delay Feedback Filter
Posted: Tue Mar 04, 2014 4:32 pm
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.
Re: Zero Delay Feedback Filter
Posted: Tue Mar 04, 2014 4:42 pm
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?