How can I adjust dbfs level?

Quickmcj

New Member
Thread Starter
Joined
Feb 3, 2023
Messages
15
Hi all

This is about dbfs and not SPL.

I have tried different options but I must be missing a setting somewhere:

I have done "measurements" which I use as filters in camilladsp. I export these measurements as impulse responses either txt or wav and I normalize to peak.

Measurements are inverted real near field driver measurements combined with Harmon target curve.

Problem is that the measurements and the export impulse response is offset by +40dB on the dbfs scale in REW. This offset is embedded into the export impulse response even when normalizing for peak. It is such a large offset that REW can't entirely show the plot, as REW dbfs axis stops at 40dB.

How can I adjust the dbfs level for a measurement in REW?
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,342
If you export an impulse response with the option to normalise selected the highest value in the export will be 0 dBFS. To comment beyond that you'll need to post an mdat file with an example of your original measurement data and an explanation of the steps you go through to generate the result you wish to export.
 

Quickmcj

New Member
Thread Starter
Joined
Feb 3, 2023
Messages
15
If you export an impulse response with the option to normalise selected the highest value in the export will be 0 dBFS. To comment beyond that you'll need to post an mdat file with an example of your original measurement data and an explanation of the steps you go through to generate the result you wish to export.
Hi John

I have attached the mdat with input and output measurement files, the impulse export in txt and a screenshot of the problem.

Creating inverted filters for speaker drivers.

Steps to reproduce:

1. Measure driver near field, result in something 90dB peak SPL, -30 peak dbfs
2. Create target curve in EQ, based on harman curve loaded as house curve in REW, with added LP and LP LR8 filters
3. Use Trace arithmetic, Target curve measurement (A) divided by near field driver measurement (B), no regularisation

Here I get the problem, as the A over B results in +40 dbfs, and I cannot seem to find the place where I need to make adjustments, so that the result will not go beyond 0 dbfs. I would imagine I would need to somehow align the driver measurement towards 0 dbfs, before doing arithmetic (or do the arithmetic in a slightly different way).

4. Create minimum phase version of A/B
5. Export impulse response of MP version, default selected "Normalise samples to peak value", I also gate the impulse in time and select "Apply IR window before Export".

The export impulse response contains the +40 dbfs, I see this if I reload the export into REW or CamillaDSP.

Setup: REW 5.20.13 on Fedora 37, using UMIK-1 with calibration file (though it says that UMIK is not a recognized USB mic, and will not use the Sens Factor entry in the file)

Kind regards
Michael
 

Attachments

  • dbfs40.mdat
    12.8 MB · Views: 11
  • dbfs40ex.txt
    663.2 KB · Views: 5
  • dbfspic.jpg
    dbfspic.jpg
    55.2 KB · Views: 6

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,342
The impulse response export is correctly normalised, the largest (magnitude) value in it is -1.0. As this is a low bandwidth signal the corresponding frequency response has a high amplitude. The arithmetic is correct, given the response (in dBFS) is between 53 and 33 dB below the target. I'll mull over whether I can change the way the division works to take into account the relative SPL of the measurements and scale the result IR accordingly rather than just adjusting the SPL offset figure for the result as it does currently. REW doesn't provide a control to scale the IR data, doesn't CamillaDSP have a way to adjust the gain of the IR?

REW will not recognise the mic if neither the input device name, input name nor the source description of the input contain a recognised mic name. On Linux device names are not particularly helpful for that as they are so abbreviated, so the source description of the input is used, but you don't appear to have selected an input for the mic. Does Fedora not offer input choices?
 

Quickmcj

New Member
Thread Starter
Joined
Feb 3, 2023
Messages
15
The impulse response export is correctly normalised, the largest (magnitude) value in it is -1.0. As this is a low bandwidth signal the corresponding frequency response has a high amplitude. The arithmetic is correct, given the response (in dBFS) is between 53 and 33 dB below the target. I'll mull over whether I can change the way the division works to take into account the relative SPL of the measurements and scale the result IR accordingly rather than just adjusting the SPL offset figure for the result as it does currently. REW doesn't provide a control to scale the IR data, doesn't CamillaDSP have a way to adjust the gain of the IR?

REW will not recognise the mic if neither the input device name, input name nor the source description of the input contain a recognised mic name. On Linux device names are not particularly helpful for that as they are so abbreviated, so the source description of the input is used, but you don't appear to have selected an input for the mic. Does Fedora not offer input choices?

I can fiddle around with the mic and the IDs to likely have REW find it, I will work that out. It does see it in some ways, and it works just fine it seems. I have added some pictures so you can see what is going on, but it is no biggie at all.

" As this is a low bandwidth signal the corresponding frequency response has a high amplitude." That is beyond my scope of understanding, I do not see the reasoning for a high amplitude, when having low bandwidth. I will not challenge that statement though :)

I can adjust the gain of the filter in CamillaDSP, either as a built-in preamp gain on that particular channel, or by adding a "gain" filter manually. My problem is that I worry about dynamic compression of the music, because I have to apply something like -60dB gain in some of them, to have the IR filters run at below 0 dbfs to avoid digital clipping. -60dB is 10bit lost? It might be okay, I am not sure on the inner workings of the DSP when doing so. If it is taking the bits purely from the internal 64 bit float it is operating in, I guess it is fine. If it affects the music bit depth, not so much.

"The arithmetic is correct, given the response (in dBFS) is between 53 and 33 dB below the target."
I tried minimizing that distance, as I thought that was the culprit, but did not find any way of doing so. I initially tried lowering the target curve down to the response, but target curves will always stay at around 0 dbfs it seems, as adjustments are affecting SPL.

I tried importing the IR into Rephase, to have it somehow adjust the dbfs of the measurement (and then export to IR again), but Rephase do not export the measurement, only any adjustments made in rephase itself.

If adding -60dB gain is all good and we have plenty of bits to spare, when running inside the DSP engine, I can totally live with that route. I am just not sure if it affects the bit depth of the music signal or not.

Edit: I think it would be nice to have some option when doing the arithmetics in REW as you mention, as I guess those operations, are mostly used by people doing filters (and they would want those at below 0 dbfs for ease of use).
 

Attachments

  • Screenshot from 2023-02-17 11-44-04.png
    Screenshot from 2023-02-17 11-44-04.png
    7.4 KB · Views: 6
  • Screenshot from 2023-02-17 11-42-01.png
    Screenshot from 2023-02-17 11-42-01.png
    2.9 KB · Views: 7
  • Screenshot from 2023-02-17 11-41-22.png
    Screenshot from 2023-02-17 11-41-22.png
    4.6 KB · Views: 6
  • Screenshot from 2023-02-17 11-19-11.png
    Screenshot from 2023-02-17 11-19-11.png
    2.4 KB · Views: 6
Last edited:

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,342
There's no issue with applying attenuation in CamillaDSP, it just compensates for the gain in the impulse response and will not affect sample resolution.

I have made a change in the latest 5.20.14 builds to revise the IR scaling for division results so they should be useable directly without scaling or normalisation. Those builds should also fix the "unrecognised mic" error on Linux.
 

Quickmcj

New Member
Thread Starter
Joined
Feb 3, 2023
Messages
15
There's no issue with applying attenuation in CamillaDSP, it just compensates for the gain in the impulse response and will not affect sample resolution.

I have made a change in the latest 5.20.14 builds to revise the IR scaling for division results so they should be useable directly without scaling or normalisation. Those builds should also fix the "unrecognised mic" error on Linux.
That is amazing John, thank you very much, will get installed right away.

(Edit: Installed, working wonderfully, thanks a lot)

Kind regards
Michael
 
Last edited:
Top Bottom