Welcome, Guest
Username: Password: Remember me
NOTE: This forum is community powered. Please be mindful that long time community members are here to help as part of a community effort. If you have a specific issue (e.g. hardware, failure), please use our tech support portal (Support menu - > Contact Us). Thanks a lot of your help in making a better community. :-)
  • Page:
  • 1
  • 2

TOPIC: 'Convert' 44.1 KHz FIR coefficients to 48 KHz?

'Convert' 44.1 KHz FIR coefficients to 48 KHz? 1 year 1 month ago #38008

  • markbrown1685
  • markbrown1685's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
  • Karma: 0
I recently purchased an OpenDRC-DI and the plugin so that I could import my Sonarworks headphone calibration FIR curve to it via biquad coefficients that Sonarworks provided for me. The Sonarworks capture was created in 44.1 KHz and unfortunately I don't believe recapturing in 48 KHz is an option unless I ship my headphones back to them (which I'm not opposed to doing, but would like to seek other options first).

It is my understanding that sampling FIR curves at higher or lower sampling rates than what they were captured at can shift all of the filters up or down in frequency, obviously compromising accuracy. Is there any way I can take the 44.1 KHz biquad coefficients and 'convert' them to 48 KHz format so that the original accuracy will be preserved within OpenDRC? I'm open to buying reasonably priced software.
The administrator has disabled public write access.

'Convert' 44.1 KHz FIR coefficients to 48 KHz? 1 year 4 weeks ago #38093

  • devteam
  • devteam's Avatar
  • Online
  • Administrator
  • Posts: 8459
  • Thank you received: 1039
  • Karma: 156
For this application, easiest that you just ask Sonarwork to output the 48k coeff. That will be best here as you can't convert FIR taps that easily.

Hoping this info helps.

DevTeam
MiniDSP, building a DIY DSP community one board at a time.
The administrator has disabled public write access.
The following user(s) said Thank You: markbrown1685

'Convert' 44.1 KHz FIR coefficients to 48 KHz? 1 year 3 weeks ago #38121

  • Richard
  • Richard's Avatar
  • Offline
  • Expert Boarder
  • Posts: 126
  • Thank you received: 68
  • Karma: 13
It may be technically possible to convert them.
Not really familiar with the Sonarworks application, or specs, or what format they're using.
Can you somehow upload a file to post here whatever actual 44.1kHz FIR curve you're trying to convert?
Is it just a text file of coefficients? Do you know how many FFT taps that data is?
The administrator has disabled public write access.
The following user(s) said Thank You: markbrown1685

'Convert' 44.1 KHz FIR coefficients to 48 KHz? 1 year 3 weeks ago #38143

  • markbrown1685
  • markbrown1685's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
  • Karma: 0
Thank you for your replies!

I have already inquired with Sonarworks about getting 48KHz coefficients but they've told me they're unable to do that. I wonder if I could send the headphones back to them once again and see if they can re-do the measurements/calibration at 48KHz but I'd really prefer to avoid that because the international shipping will be expensive and I've already put a lot of money into this. I don't have any technical information about the software/methods for their measurements but I can try to find out that information if it would be helpful.

Richard, it is indeed text files of coefficients for each channel. Each channel/file is 4000 taps (I understand that a 48KHz curve would utilize more taps and I believe I have 2000 more to spare for each channel with the OpenDRC). I have attached the files to this post. If anyone could help me 'convert' them in some way, I would be extremely appreciative! If I can't get the proper coefficients for 48KHz then this entire thing will have been a big waste of money. :(

Another idea I had: if I'm understanding some of what I've read correctly, it might be possible to convert FIR coefficients into a .wav impulse response file. I've also read that .wav files can be saved in a RAW format and renamed to the .bin file extension and the OpenDRC plugin will accept this file format. Is there a way I can make a .wav from these coefficients, use a DAW to convert the .wav to 48KHz, and then save it as a readable .bin format?

Also, I do realize that I was incorrect in my first post for referring to FIR coefficients as "biquad" coefficients, so no need to correct me. :)
Attachments:
Last Edit: 1 year 3 weeks ago by markbrown1685.
The administrator has disabled public write access.

'Convert' 44.1 KHz FIR coefficients to 48 KHz? 1 year 3 weeks ago #38165

  • Richard
  • Richard's Avatar
  • Offline
  • Expert Boarder
  • Posts: 126
  • Thank you received: 68
  • Karma: 13
Hi markbrown1685,
Okay yes, I saw your reply and had a little look...
I was hoping maybe HOLM Impulse or something could successfully import these biquads, but sorry, I don't actually think any of the software I've got myself can do the job. Although that's not to say it can't be done!

Really just need to import the 44.1kHz biquad coefficients and render the resulting frequency response curve (amplitude and phase), then export that curve as a maybe a very high resolution 65,536 point response as text file ( freq Hz, dB, phase). That response in turn could be imported into something more friendly like rePhase which could then manually and painstakingly match the desired curve shapes, and then generate and export a new FIR filter of that as a 6144 tap 48kHz format mono ".bin" file to suit the OpenDRC, and obviously do one for left and one for right. It would take hours of work anyway, but first you need to import the biquads into something else that can read them....????

There's a few free online tools like this webpage which can plot a graph from your coefficients, but it's far to small to read anything with accuracy, and you can't download the result as a file.
You need something like a maths spreadsheet program or a dedicated FIR filter designer software that supports biquad coefficients. I don't have that, but somebody else out there reading this probably does...? Maybe they can help or advise?

Simply importing your biquad coefficients (left) straight into OpenDSP plugin gives this result, saying "You have loaded 4000 coefficients"



While you're correct in saying OpenDRC would just re-interpret these biquad coefficients at its native 48KHz rate whereas we both know they were 44.1kHz sampled, so that's wrong, but just wondering have you tried doing this for the sake of seeing how it sounds? Is this general tonal shape more or less in the ballpark of what you'd expect? It might sound vaguely better than the uncorrected response? The bumps and dips frequency centres might be slightly out, by a small percentage, and the HF response above 22kHz will doubtless be void, but maybe as this curve looks fairly gentle the slight differences won't skew it too much off target, and maybe it's even somewhat usable with your headphones for now, while you're trying to calculate the correct version 100% exactly using some more advanced software like ScopeFIR or something? Maybe worth a try to test this approximation to see if the OpenDRC workflow and performance is usuable in that context for you, or you don't like the process latency or whatever...

This message has an attachment image.
Please log in or register to see it.

Last Edit: 1 year 3 weeks ago by Richard.
The administrator has disabled public write access.
The following user(s) said Thank You: markbrown1685

'Convert' 44.1 KHz FIR coefficients to 48 KHz? 1 year 3 weeks ago #38166

  • markbrown1685
  • markbrown1685's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
  • Karma: 0
Thanks for your reply, Richard!

It's still a lot for me to digest, so I'll be revisiting this thread later in the week. :)

Yes, I've been using the coefficients I attached with OpenDRC successfully and it certainly sounds better than with no correction, but comparing the FR graph with the original Sonarworks one, the whole response is definitely shifted a noticeable amount (maybe 10-15 Hz from memory, but I haven't compared the graphs in a while). I know it may be "splitting hairs" territory, but since I paid a lot (and waited quite a long time) to send in my actual headphones to Sonarworks for measurements, I really want the most precise accuracy possible. If I wasn't so concerned about accuracy then I could have saved a lot of money and just used one of their "average" profiles for my headphone model. Although it sounds like I now may have to pay a lot for a license for pro-level software to end up doing this sample rate conversion. :(
Last Edit: 1 year 3 weeks ago by markbrown1685.
The administrator has disabled public write access.

'Convert' 44.1 KHz FIR coefficients to 48 KHz? 1 year 3 weeks ago #38167

  • dreite
  • dreite's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1251
  • Thank you received: 621
  • Karma: 82
FYI, the whole response would shift....but not by an amount like 10-15 Hz....but as a percentage of the difference in Fs. In this case 8.1%.

Your problem is fairly 'cumbersome', and I don't know of an easy solution either. :) Somebody out there might.

Dave.
The administrator has disabled public write access.
The following user(s) said Thank You: markbrown1685

'Convert' 44.1 KHz FIR coefficients to 48 KHz? 1 year 3 weeks ago #38186

  • pos
  • pos's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 345
  • Thank you received: 196
  • Karma: 39
Hi markbrown1685,

Did you find a solution to your problem?
If not, I can convert these FIRs from 44.1Hz to 48kHz when I can find the time (needs a bit of scripting, but this is straightforward)
download the last version of rephase here: rephase.org
The administrator has disabled public write access.
The following user(s) said Thank You: markbrown1685

'Convert' 44.1 KHz FIR coefficients to 48 KHz? 1 year 3 weeks ago #38189

  • markbrown1685
  • markbrown1685's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
  • Karma: 0
pos wrote:
Hi markbrown1685,

Did you find a solution to your problem?
If not, I can convert these FIRs from 44.1Hz to 48kHz when I can find the time (needs a bit of scripting, but this is straightforward)

Hi pos, that would be incredibly gracious! To be honest I was starting to hope someone might offer to do that since I'm definitely in over my head a bit, plus the license costs for some of the software seems really prohibitive for me since I just need a "one and done" conversion. :) I'd be glad to PayPal you a small donation for the trouble. Absolutely no rush, it's been a really busy time at my household anyway. Thank you so much!
The administrator has disabled public write access.

'Convert' 44.1 KHz FIR coefficients to 48 KHz? 1 year 2 weeks ago #38222

  • pos
  • pos's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 345
  • Thank you received: 196
  • Karma: 39
These appear to be linear-phase correction (ie phase info is missing).
Is it what the lab send you? Anything else like response curve or something?
Minimum-phase corrections would be much better here.
Converting these linear-phase corrections from 44.1 to 48 is easy, but I think the best move would be to also convert them to minimum phase.

This message has an attachment image.
Please log in or register to see it.

download the last version of rephase here: rephase.org
Last Edit: 1 year 2 weeks ago by pos.
The administrator has disabled public write access.

'Convert' 44.1 KHz FIR coefficients to 48 KHz? 1 year 2 weeks ago #38223

  • markbrown1685
  • markbrown1685's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
  • Karma: 0
pos wrote:
These appear to be linear-phase correction (ie phase info is missing).
Is it what the lab send you? Anything else like response curve or something?
Minimum-phase corrections would be much better here.
Converting these linear-phase corrections from 44.1 to 48 is easy, but I think the best move would be to also convert them to minimum phase.


Thanks again for looking into this!

That's odd, I specifically requested minimum phase coefficients from Sonarworks since having near zero latency is critical to me since I plan on using the DSP while recording and doing real-time monitoring.

When they originally sent me the coefficients, they didn't match up very closely with the FR curve shown in their software (and I don't just mean an overall shift by ~8% of the sampling frequency, but I mean the cuts and boost amounts and shapes seemed significantly off). After I told them about this, they sent me new sets of coefficients and they seem to mostly match up as expected (other than the overall offset because of the SR discrepancy). I wonder if maybe the new ones (which I previously attached) are linear phase but perhaps the ones they originally sent were minimum phase (but for whatever reason OpenDRC didn't process them correctly). I have attached the original coefficient files to this message in case they prove useful.

By response curve, do you mean simply an image of the curve? Here's what each channel's curve should look like:



And here's what the phase should look like in minimum phase mode:



Let me know if any more info would help! :)
Attachments:
Last Edit: 1 year 2 weeks ago by markbrown1685.
The administrator has disabled public write access.

'Convert' 44.1 KHz FIR coefficients to 48 KHz? 1 year 2 weeks ago #38232

  • pos
  • pos's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 345
  • Thank you received: 196
  • Karma: 39
I am afraid these corrections you attached are still linear-phase, and they are indeed completely different from the first set you attached.

Left channel, "edited" version from post #38143 in blue, original version from post #38223 in green :


Same for right channel:


Latency is 44ms

This message has attachments images.
Please log in or register to see it.

download the last version of rephase here: rephase.org
Last Edit: 1 year 2 weeks ago by pos.
The administrator has disabled public write access.

'Convert' 44.1 KHz FIR coefficients to 48 KHz? 1 year 2 weeks ago #38244

  • pos
  • pos's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 345
  • Thank you received: 196
  • Karma: 39
Let me state the obvious here, but from what I understand these corrections are a direct inversion of measurements taken using a headphone measurement fixture.

I don't know much about headphones measurement/correction as I have never practiced it myself, but a few things have me surprised when looking at these corrections:
- The difference between left and right corrections is pretty high, with for example a sharp Q 7dB difference around 7kHz. I'd expect good quality headphones to have better matching than that, and I wonder if these sharp Q high frequency differences might vary with measurement conditions and exact position or the measurement fixture.
- Using sharp Q corrections is only beneficial when you can be sure what you are correcting comes from the device under test, and is not a measurement artifact (including position variations). When unsure it is better to not use such high Qs (or in the context of a measurement use frequency averaging/smoothing).
- The rise in the UHF range (almost+6dB of boost between 19kHz and Nyquist, with again a very sharp Q) will introduce unnecessary ringing (from the correction itself as well as from SRC and DAC filters). That will clearly show in impulse measurements. It can be argued that it is probably not audible because of the combined lack of music signal and human acuity in this range, but then why boost it in such a way in the first place?
- Corrections do peaks at around +5.5dB in LF and almost +8dB around 3kHz. Depending on the way the volume is handled it might generate severe clipping on music signals
- Linear-phase is good for (acoustical) crossovers, but not for EQ type corrections (not in a sound reproduction context at least). Not only does it imply latency (44ms here), but it also introduces preringing. If what has to be corrected is minimum-phase then only minimum-phase corrections have to be used, and if it is not minimum-phase then it is better to leave it untouched...

All in all if it were my headphones and if I trusted these measurements, I would still tend to lower the Q of some corrections, let the UHF response drop instead of correcting it, attenuate the general volume of the correction (or attenuate inside the convolution device) by at least -8dB, and of course make sure the final correction is minimum-phase.
Easier said than done of course, but doable nonetheless.
download the last version of rephase here: rephase.org
Last Edit: 1 year 2 weeks ago by pos.
The administrator has disabled public write access.
The following user(s) said Thank You: denver8me4dinner, markbrown1685

'Convert' 44.1 KHz FIR coefficients to 48 KHz? 1 year 2 weeks ago #38251

  • markbrown1685
  • markbrown1685's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
  • Karma: 0
You're definitely right about linear phase! I just tried monitoring in real-time (direct guitar signal in my DAW, using ASIO drivers and very small buffer size) and there's considerably latency with the OpenDRC FIR filter section engaged, but any latency is imperceptible when it's bypassed. I'll send a message to Sonarworks and reiterate the minimum phase part of the request.

I'm probably one of the least knowledgeable people on these forums, but everything I've read about Sonarworks and their headphone measurements/corrections has been overwhelmingly positive. Admittedly I haven't spent much time looking through it, but this appears to be the patent they've filed for their measurement process and integrating it with their target response curve. I'd be really surprised if their techniques were very susceptible to significant variations/errors. But I could certainly be wrong. :)

As for gain, yes, I am attenuating the signal via the OpenDRC's input gain by 8dB, which is about what the Sonarworks software calculated was necessary to avoid clipping (-7.8dB). In case my repeated mentions of their software are confusing, I'll clarify: it simply loads their FIR curves (in their own proprietary file format) and applies the EQ to the audio device's output signal. It does not have any FIR editing or exporting functionality. My reasons for wanting to use OpenDRC instead are to offload the required processing power from my computer and to also have a bit more capability to tweak the bottom end with OpenDRC's IIR parametric EQ.

Based on what I've read and most FR charts I've viewed, unfortunately it seems like even moderately expensive headphones such as these don't always have extremely closely matched drivers, so I don't necessarily doubt these measurements. The consistent exception seems to be Sennheiser, especially the really top tier stuff like the HD700 and above -- those seem to always be nearly perfectly matched based on many FR measurements I've seen.

I noticed that large ~19 KHz boost as well and was a bit confused by that, especially since on the original Sonarworks software curve, it looks like that boost is just a hair over 3 Hz instead of ~6 Hz from the coefficients. Could this perhaps be an aliasing error? I agree, I wouldn't mind having the response "natural" there since I obviously can't hear up there. :)

I'll let you know what I hear from Sonarworks and hopefully I can get my hands on a set of minimum phase coefficients!
Last Edit: 1 year 2 weeks ago by markbrown1685.
The administrator has disabled public write access.

'Convert' 44.1 KHz FIR coefficients to 48 KHz? 1 year 2 weeks ago #38257

  • pos
  • pos's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 345
  • Thank you received: 196
  • Karma: 39
markbrown1685 wrote:
I noticed that large ~19 KHz boost as well and was a bit confused by that, especially since on the original Sonarworks software curve, it looks like that boost is just a hair over 3 Hz instead of ~6 Hz from the coefficients. Could this perhaps be an aliasing error? I agree, I wouldn't mind having the response "natural" there since I obviously can't hear up there. :)
I presume you mean 3 and 6 dB instead of Hz here.

The response curves you posted in post #38223 only goes to 20kHz, whereas the 6dB peak is above 20kHz
download the last version of rephase here: rephase.org
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: devteam