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

Accurately Adjusting Filter Coefficients For SampR(question)

For general discussion related FlowStone

Accurately Adjusting Filter Coefficients For SampR(question)

Postby guyman » Sat Apr 25, 2020 12:01 pm

Ok, in my last post I was asking questions regarding filter optimization. Upon conducting my own experiments, and listening to some of your responses I was flung down a rabbit hole toward better grasping how filters work and are calculated.


I now have a question regarding the calculation of coefficients. I'm in a bit over my head, but after pulling an all nighter I realized that I had a problem. I had some module in my toolbox that implemented LWR x-overs for a k weight filter (LUs/LKFS).


I used Martin's matched shelves to accurately recreate the spectrum of this filter (for fun) but realized the highpass LWR kept shifting in the transfer function viewer when I disconnected/reconnected... irregular behavior... glitchy..
I was no longer sure what the correct cutoff would be, so I went to the source to study the kweight specification...

pg.4
https://www.itu.int/dms_pubrec/itu-r/re ... !PDF-E.pdf

short read but - yikes, a lot to think about, but VERY INFORMATIVE.

So I implemented the coefficients from the link above and cooked up so I could be sure I had a precise filter. Then I could compare it to the 2 I was already dealing with... then boom in the fine print:

"These filter coefficients are for a sampling rate of 48 kHz. Implementations at other sampling rates
will require different coefficient values, which should be chosen to provide the same frequency
response that the specified filter provides at 48 kHz."

I then looked down realized I was at 96khz sampling rate on my interface, aside from my usual 44.1khz (old school feel :lol: ) I had been working in earlier in the week...

now I lack confidence in not only this set, and the various filters that I have been cooking up, but the ones laying in my toolbox...

SO THAT BEING SAID IF YOU ARE STILL HERE 8-)

I have since implemented 48khz SR and compared my transfer function to pictures online and I am sure I have a rock solid k weight filter AT THE 48KHZ SAMPLING RATE using the coefficients above... and the previous LWR kweight, and my makeshift martin shelf k weight come super close...

but this has opened pandoras box, I've dug around for a solution, but to no avail.....

TLDR;

HOW DO WE CREATE A TOOL THAT ALLOWS FOR ACCURATE TRANSLATION OF COEFFICIENTS?
I want to input coefficients and the sample rate they were written for, and specify the sample rate I am working at, like a matrix or something.... and out the other end comes the correct coefficients for the filter... this could be valuable at building filters like the one above, using formulas that are standard, but can modulate their parameters to fit the user's sample rate... or for different direct form filter types... and in addition calculate an inverse filter for those coefficients...
I know I can calculate coefficients from freq and res with some prims... but what about translators like what I suppose above..
Does this already exist in a simple to use format? Am I once again misinterpreting how things work??

Hope your bored..... lol...

!!! :lol:

~that guy
User avatar
guyman
 
Posts: 207
Joined: Fri Mar 02, 2018 8:27 pm

Re: Accurately Adjusting Filter Coefficients For SampR(quest

Postby martinvicanek » Sat Apr 25, 2020 2:11 pm

Here is a biquad coefficient converter. It takes the coefficients b0, b1, b2, a1, a2 at 44.1 kHz nominal sample rate and converts them to coefficients at the current sample rate.
Attachments
BiquadCoefficientConverter.fsm
(25.94 KiB) Downloaded 802 times
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Accurately Adjusting Filter Coefficients For SampR(quest

Postby guyman » Sat Apr 25, 2020 6:06 pm

8-) So Casual.

Thank you!!!
User avatar
guyman
 
Posts: 207
Joined: Fri Mar 02, 2018 8:27 pm

Re: Accurately Adjusting Filter Coefficients For SampR(quest

Postby RJHollins » Sat Apr 25, 2020 9:58 pm

It's like 'Magic' ....
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm


Return to General

Who is online

Users browsing this forum: No registered users and 91 guests