Page 1 of 1

Going back to the FIR Delay !)...

PostPosted: Fri Apr 21, 2023 4:26 pm
by Tepeix
Allpass delay are cool, but where they lack is asynchronous delay.
I think this is specially for asynchronous resampling, that they will add more problem..

So i come back a little to fir delay.. ;) :oops: (maybe i must talk to a psy about this ;) )
Trying to simplify the coefficient i find this little "trick"..

We could take some ideal (sinc based) coefficient for frac 0.5.
The more the delay is close to frac 0.5 more we blend to those coefficient.
(instead of the simple linear interpolation.)

(Making a linear interpolation between sample x4 and x5 and adding the sinc solution for sample x1 to x8)

Now to get a little more precision we use the coefficient of the linear version
"inversed". When x4 is 0.25 x1,x2,x3,x4 will be blend at *0.75 and x5,x6,x7,x8 at *0.25..

Hum.. not sure it's the best optimization for a 8 tap mono delay.. Getting 7 multiply and other stuff..
Maybe i also have to rethink the order of operation... But maybe for higher tap ??
But i'm pretty happy it works after just some nightmare debugging !)

Edit : Forget to say.. There's a very little overshoot (more volume) in treble when the frac is close to 0.5.
So the feedback could not be at 1 when the delay is there.. Or the treble will slowly rise up..
(not so hard to compensate)

Re: Going back to the FIR Delay !)...

PostPosted: Mon Apr 24, 2023 3:27 pm
by Tepeix
Some optimizations.. And now some bias value and the choice to not overshoot frequency ;)

I could reduce from 7 multiply to 4. There was some redondance.
Shufping like a dance, we could multiply only one time with the frac value !)

(even if it's a lot of shufps.. i'm biased as i consider to avoid multiply and divide..
But 2 add is almost like a multiply.. But divide could be between 3 to 9 multiply ??)

Also i find that it become an art at this point to design the best compromise or approximation..

With this approximation inverse and refrac technic we have to:
-First choose some truncated/windowed sinc coefficient.. Not sure i choose the best one...
- then if adjusting the refrac value, we could get better result for frac 0.25 or 0.75..
> Avoiding more frequency lost but at the risk to get frequency boost at other frac value..
So i let 2 bias control..

Refrac being just this image :

Re: Going back to the FIR Delay !)...

PostPosted: Wed Apr 26, 2023 3:46 pm
by Tepeix
Get some chance with those 8 tap coefficients..
Now i find that it could be good to plot the magnitude error..
Sometime the fir would have ripple, we end up with little attenuation that affect more bass..
Here i multiply the deviation from 1 of the output level by 128.
The 8 tap fir seams ok but the 16 tap i'm trying to do attenuate bass which could begin audible at high feedback..

So it's about finding the best windows for a sinc function which is not so easy..
Here the 8 tap then my bad 16 tap coefficient :

Re: Going back to the FIR Delay !)...

PostPosted: Fri Apr 28, 2023 12:53 pm
by Tepeix
And now a 24 tap Fir Delay !)

I pass on 16.. Having trouble to get something better than 8..

Then i discover that the inverse coefficient are no more good when going to more tap.
(No more left = 0.75 and right = 0.25 when frac is 0.25...)

So now it's just a simple refrac value that blend the sinc coefficient with the linear one.
Like in the image.

They might exist other way and more precise way to do..
But this one seams a good ratio of precision/cpu.

Re: Going back to the FIR Delay !)...

PostPosted: Mon May 01, 2023 12:30 pm
by Tepeix
And a 40 tap fir delay !)

Don't know if it make so much sense, the improvement is light against 24.

For this number of tap it would maybe be better to do something about the 0.25 frac value
(where it seams to improve less) but adding more refrac value will give amplification in the treble..
So it probably need more coefficient and or more complexity if we want to improve this.
(For most situation i don't think it's worth to do, maybe for very very precise thing)

Strangely, each time i make a new delay i have the sensation that it sound a little differently,
and this one seams more clear for me, but it might be psychology..