A convolution based alternative to electrical loudspeaker correction networks

Minimizing furniture reflections will help to get a cleaner speaker measurement, but if you then go and put the furniture back the correction will have done nothing to take account of those variables.

If the reflection is close DRC can be quite successful in making it better, if it's not in the measurement it won't know it exists.

This is a case of the advice having some truth in it but not necessarily being correct in every situation.

I can almost guarantee that a correction based on a bare room measurement will not be optimum if there is then a significant amount of furniture placed back in the room.

Somewhere in between might well give the best results but would need some trial and error.
 
DRC-Designer Linux

Hi here all, hope you are all well!

I was entitled to look in this thread while i am learning room correction stuff :)

I will skip right into it, while using the Linux version i cannot find where to put my REW / Sox generated files. What i did for a quick start is ::
sox R_Vector_Avg.wav -t f32 RightSpeakerImpulseResponse48000.pcm
sox L_Vector_Avg.wav -t f32 LeftSpeakerImpulseResponse48000.pcm
My REW measures was generated in 48Khz, therefore i did convert them to 48Khz

These files are supposed to go into the sample folder as instructed by this guide :
Dropbox - DRC Sweep Guide.pdf - Simplify your life
Like this ::
Rename the left and right files as
LeftSpeakerImpulseResponse44100.pcm and
RightSpeakerImpulseResponse44100.pcm, manually
moving these files to the folder in DRC called “sample”
located inside the folder “drc-3.2.x” of the DRC app.

But this folder doesent exist in Linux ?

Anyone used the Linux version?

Rgds; Jesper.
 

Attachments

  • Screenshot from 2020-04-26 07-34-13.png
    Screenshot from 2020-04-26 07-34-13.png
    24.4 KB · Views: 250
That looks like the Linux version of DRC Designer, I have not used that front end but I would start here

Digital Room Correction Designer Help

You can run gmad's folder structure in windows, wine or a virtual windows it will work well.

Linux Mint has straight DRC FIR available via apt if that helps.

Mixing Gmad's instructions and DRC Designer together will likely confuse you, pick one or the other :)
 
That looks like the Linux version of DRC Designer, I have not used that front end but I would start here

Digital Room Correction Designer Help

You can run gmad's folder structure in windows, wine or a virtual windows it will work well.

Linux Mint has straight DRC FIR available via apt if that helps.

Mixing Gmad's instructions and DRC Designer together will likely confuse you, pick one or the other :)

Yes running it under wine is good enough, but allways prefer running native if is, but who cares :D

I now i have to "record" at the right samplerate (44100, 88200, 96000 etc...) into REW
But for a test i ran it with the 48000 i allready had.

sox L_Vector_Avg.wav -t f32 LeftSpeakerImpulseResponse48000.pcm
sox R_Vector_Avg.wav -t f32 RightSpeakerImpulseResponse48000.pcm

sox Stereo48000STRONG.wav -t raw - | sox -t raw -e signed -b 32 -c 2 -r 44100 - out.wav

sox out.wav L.wav remix 1
sox out.wav R.wav remix 2

Then transfer them to my DSP_Engine, and testing :)
--- It's working :: running very low cpu usage!
/home/tc/DSP_Engine/camilladsp -p3011 /home/tc/DSP_Engine/filters/test_2_44100.yml
/mnt/mmcblk0p2/tce/squeezelite-custom -n DSP_DAC -o squeeze -a 160 4 1 -b 10000 20000 -r 44100 192000 2500 -U -U -z

It's look like a really really nice program...

So a few quistion's (not that i didn't research myself) :

1. I recorded with an UMIK-1 in REW with calibration file, should i use calibration file in DRC-Designer also ?

2. I have an USB (Amanero based) DAC, should i use this as "soundcard" along with the UMIK mic. when recording in REW (offtopic i know!) - I used my laptop only for the first set of meassures i took.

Thank's guy's

Jesper.
 
Greg's scripts are good because you can embed all the sox commands and file movements into them so the output of the program is converted and put where you want it. Eventually you will want to do more than DRC designer will let you do without editing the configuration files yourself.

If you can run linux you can edit a text file so why limit yourself?

1. Yes you need to use the mic calibration file with DRC, the file needs to be quite specific in format or DRC will fail. Only numbers no text, and they need to be single space separated in two columns, Frequency then amplitude. You can use excel or another linux spreadsheet to format the data correctly if it's not right or more labour intensive find/replace in a text editor.

Code:
0 0.0
20 -0.01
20.5 -0.02
20.9 -0.03
21.4 -0.03
21.9 -0.04
22.4 -0.05

This is an excerpt from mine, a single double space or wrong character will cause trouble.

2. Yes I would use the amanero and an external DAC for measuring over a laptop soundcard. Ideally you should use the exact setup of DAC amp and speaker that you intend to use so the transfer function of the whole system is measured.
 
Greg's scripts are good because you can embed all the sox commands and file movements into them so the output of the program is converted and put where you want it. Eventually you will want to do more than DRC designer will let you do without editing the configuration files yourself.

If you can run linux you can edit a text file so why limit yourself?

1. Yes you need to use the mic calibration file with DRC, the file needs to be quite specific in format or DRC will fail. Only numbers no text, and they need to be single space separated in two columns, Frequency then amplitude. You can use excel or another linux spreadsheet to format the data correctly if it's not right or more labour intensive find/replace in a text editor.

Code:
0 0.0
20 -0.01
20.5 -0.02
20.9 -0.03
21.4 -0.03
21.9 -0.04
22.4 -0.05

This is an excerpt from mine, a single double space or wrong character will cause trouble.

2. Yes I would use the amanero and an external DAC for measuring over a laptop soundcard. Ideally you should use the exact setup of DAC amp and speaker that you intend to use so the transfer function of the whole system is measured.

Thank's fluid, you are really helpfull on my path :)

This is snip from my mic.
"Sens Factor =1.691dB, SERNO: 70xXxXx"
10.054 -3.4719
10.179 -3.3206
10.306 -3.1725
10.434 -3.0275
10.564 -2.8857
10.696 -2.7471
10.829 -2.6116
10.964 -2.4791
11.1 -2.3496
11.238 -2.2231
11.378 -2.0996
11.52 -1.9791
11.663 -1.8614
...
..
etc...

I guess i can make it work.

Regarding using my usbdac as soundcard i will have to hook it up and make it work as expected.
Good thing is that i allready made me some scripts located at the same DAC on a buildin Raspbetty pi4 where the camilladsp dspengine and the player also lives.
With these scripts i can enable/disable & try differents filters real easy :cool:

Also when and if i can make my DAC work in the meassure chain, i can meassure when filters are applied to see if it behaves like it's supposed to.

Jesper.
 

Attachments

  • IMG_5691.jpg
    IMG_5691.jpg
    38.5 KB · Views: 237
Hallo here, hope all are well...

I finally recieved my mic.-stand, so taking measurements is now done with great care.
I took the following measurements with the UMIK-1 (48Khz native) microphone.
The mic. is connected through usb at my Linux laptop, and the output is through my Amanero DAC. (DAC is showing the right samplerates btw.)

At sweetspot (1L & 1R) i took 1M REW sweep at 48Khz (Left & Right seperated)
At sweetspot (1LR) i took 1M REW sweep at 48Khz (Left & Right at same time)

I also did the parallel-piped 9 measurements (Left & Right separated) when i had it all setup.

So before getting further now i need to resample the 48Khz measurements into what i need
Could be (44100, 48000, 88200, 96000, 192000 etc...) as what is wrote in the DRC manual.
4.5 Sample rate conversion

If you have the impulse response sampled at a different rate than the one needed for the final filter, you need to convert the sample rate before creating or applying the filters. For example you might have a 48 kHz impulse response but you may need to filter standard CD output at 44.1 kHz. In this situation you can either convert the impulse response to 44.1 kHz before feeding it to DRC or you can convert the resulting filters to 44.1 kHz after DRC has created them. I generally prefer the first procedure, which leads to exact filter lengths in the DRC final windowing stage, but in both cases you need a good quality sample rate converter, which uses, for example, band limited interpolation. A reasonable choice, free both under Linux and Win32, is SoX, which may be downloaded at:

Denis prefer to do the resampling before using DRC, so i would prefer to do it that way to :)

But there are so may way's doing this, and figuring the right way of doing it is very difficult for me.

So before i go further, maybe some kind here could help me out?
I Assume i should use SoX?

Thanks all, and hey what nice scripts and program this is :p

Jesper.
 

Attachments

  • 1L_1R_FDW.jpg
    1L_1R_FDW.jpg
    78.3 KB · Views: 187
  • 1L_1Vavg.jpg
    1L_1Vavg.jpg
    81.1 KB · Views: 182
  • 1R_1Vavg.jpg
    1R_1Vavg.jpg
    80.1 KB · Views: 181
But there are so may way's doing this, and figuring the right way of doing it is very difficult for me.

So before i go further, maybe some kind here could help me out?
I Assume i should use SoX?
For this task I usually use Audacity as I also use that to output the raw pcm for DRC. Audacity uses the sox resampling library and it is as simple as changing the project sample rate to the value you want before exporting, you could have it done in less than 5 minutes after installing the program.

Sox can do it on the command line or you can try it with Camilla DSP as Henrik has written a very nice resampling algorithm into which looks to be about as good as can be done.

In the long term I would look to try an analog mic with an audio interface with mic preamp. This will allow you to record the impulses at whatever rate the card can handle. Not essential but better than being stuck at 48K with the Umik.

I use the Sonarworks mic that I got from Thomann, individually calibrated and really quite cheap but well built.

I would also recommend a bit of manual pre EQ be applied to the measurement to deal with the low end as that is quite a lot higher than the rest and will give DRC a hard time unless you really up the filter gain which can have unintended consequences.
 
Last edited:
fluid :)

I actually looked at that Sonarworks mic. som time ago, but decided to buy the UMIK-1 instead. Nevermind another time perhaps.

I would also recommend a bit of manual pre EQ be applied to the measurement to deal with the low end as that is quite a lot higher than the rest and will give DRC a hard time unless you really up the filter gain which can have unintended consequences.

So i could do some target in REW and use that EQ on DRC?
I actually had this in my mind, but i throught that making the targetcurve (B&K3, deep tilt etc...) did the same thing?

I guess i am wrong here, or what do you mean manuel EQ applied to measurements?

Jesper.

Installing Audacity btw.
 
The idea is to use some IIR filters separate to DRC (you would set these in Camilla as well as using the DRC correction filter) to bring the response closer to your intended target before you run DRC. (Looking at your measurement I would probably start with a low shelf with negative amplitude and a couple of PEQ's at the mode peaks). This always gives a better DRC correction for me as there are controls on the amount of filter gain and peak dip compensation allowed. Setting these to a high level to cope with the differences in the base measurement usually gives a worse result than setting them to smaller values. PL Max gain in the DRC text file is one of them.

When I do this myself I use REW to show me the effect of the filters on the measurement, then I transfer the settings into PEQ in Jriver then I measure the speaker with the pre EQ in place. This is then the base for DRC.

You can do it virtually if you want to but sometimes there are differences between the PEQ algorithms and Q definitions which give different results.

To do it virtually you can get REW to export the EQ filters response as an impulse and convolve this with the measurement using A*B, with a level reduction this is then the base measurement. After running DRC convolve this EQ impulse with your DRC filter to embed it into the final correction. Both work but measuring works a little better for me in the long run.

I also like to make DRC flatten the response (flat target) and use a set of shelving filters after to form the target curve. I have drawn that many target curves it is not funny, but it is quite useful to be able to tweak the shelves in real time to your preference, small changes there can make quite a large difference in preference. I have posted the values and an image in my array thread not sure if you have seen it.

Make more sense?
 
The idea is to use some IIR filters separate to DRC (you would set these in Camilla as well as using the DRC correction filter) to bring the response closer to your intended target before you run DRC. (Looking at your measurement I would probably start with a low shelf with negative amplitude and a couple of PEQ's at the mode peaks). This always gives a better DRC correction for me as there are controls on the amount of filter gain and peak dip compensation allowed. Setting these to a high level to cope with the differences in the base measurement usually gives a worse result than setting them to smaller values. PL Max gain in the DRC text file is one of them.

When I do this myself I use REW to show me the effect of the filters on the measurement, then I transfer the settings into PEQ in Jriver then I measure the speaker with the pre EQ in place. This is then the base for DRC.

You can do it virtually if you want to but sometimes there are differences between the PEQ algorithms and Q definitions which give different results.

To do it virtually you can get REW to export the EQ filters response as an impulse and convolve this with the measurement using A*B, with a level reduction this is then the base measurement. After running DRC convolve this EQ impulse with your DRC filter to embed it into the final correction. Both work but measuring works a little better for me in the long run.

I also like to make DRC flatten the response (flat target) and use a set of shelving filters after to form the target curve. I have drawn that many target curves it is not funny, but it is quite useful to be able to tweak the shelves in real time to your preference, small changes there can make quite a large difference in preference. I have posted the values and an image in my array thread not sure if you have seen it.

Make more sense?

It's make perfect sense, but some complicated; need some time to figure it all out through :p -

I attached an .zip file download link with all my 9 LEFT, 9 Right & LEFT&RIGHT 48Khz measurements. The measurements was taking as i wrote earlier parallelpiped. (See picture evt...)

The files are saved with FDW, the measurements are "raw" e.g. not EQ'ed in any form.

Lykkedk_48khz
 

Attachments

  • IMG_6657.jpg
    IMG_6657.jpg
    96.3 KB · Views: 171
I'll add that I'd measure a little more on the front side of the couch, not as far back as seen in these pictures. That leaves the measurements used for averages closer together while the whole couch gets to enjoy those corrections.
If I were to add more measurements, i'd stay within an area of ~50 cm wide at the sweet spot at all times. The correction would be a little less averaged and gains some resolution in the sweet spot.

I actually measure in front of the couch. Yet at the couch I still enjoy the same/similar sound. I do so because of the wall being close behind my couch. The measurements done there work less than when done just in front of the couch. I tried both.
 
It's make perfect sense, but some complicated; need some time to figure it all out through :p -

I will give you a head start and send through some rephase files of EQ that you can try.

Here is an example based on your measurement file, I used the central measurements as wesayso suggested, used the 15 cycle FDW you had, smoothed to 1/6 of an octave on each measurement and then frequency averaged the combined set (Average the measurements in All SPL tab). I didn't vector average at this point as it will weight the dips more, and you have a lot of dips in your measurements.

I used a target in REW that is quite close to the one I prefer and let REW auto EQ it based on where I set the target level.

This is the result

attachment.php


To test it generate the rephase filters when I send them through and measure again to confirm. This sort of pre correction is more detailed than needed and could well be used on it's own to good effect.

Some dips have been filled here and that may not work out as well in reality as it looks on this graph, hence the need to check.
 

Attachments

  • Avg to Target.jpg
    Avg to Target.jpg
    97.8 KB · Views: 664
wesayso, fluid... thanks a lot :)

I really appreciate it, really...

I generated the .bin filters in rePhase and when i got home i will try it out.
Looking at the curves and phase in rePhase (se pictures), i never accomplished to make such nice one myself (YET!!!) ;)

So i am looking forward to hear it later today.
(Pictures LEFT / RIGHT / LEFT&RIGHT)

I learned now, that with my usb-mic i had to "only" meassure at 48khz and then resample everything to whatever i need upto 96khz i guess for a start.

wesayso suggest to meassure in front of coach duo to rearwall issues, my wall is close to back of coach so i will also try that, also having only 5 measurements within 50cm from sweetspot seems like a good idea.

Jesper.
 

Attachments

  • LEFT_RIGHT_RP.PNG
    LEFT_RIGHT_RP.PNG
    83.4 KB · Views: 60
  • LEFT_RP.PNG
    LEFT_RP.PNG
    82.4 KB · Views: 67
  • RIGHT_RP.PNG
    RIGHT_RP.PNG
    79.1 KB · Views: 55
To test it generate the rephase filters when I send them through and measure again to confirm. This sort of pre correction is more detailed than needed and could well be used on it's own to good effect.

I forgot... will ofcause remeasure...
But first i will take a listning.

Btw. : Which kind of gear do you guy's use for measure (mic./mic-preamp. etc...)

Jesper.
 
Listening is important :) Your speakers do not have controlled directivity so in room EQing can be more hit and miss. It should be a good start if nothing else and I would like to know if you like the sound.

I use the Sonarworks mic and a Focusrite 18i20 to measure with myself.
 
Hello here ;)

I did some listning yesterday with my older son, which have been within this process from the start (younger ears!)...
I must say i like much of it, but i really need some more listning before i get used to it also.
The boy (23years old good kid btw.) would prefer some more power in the bass region, but not near as much as without filters.
I will try another "housecurve" later in progress but still need some more time with this "fluid" (thanks) filter. Also i look forward to see the result when doing some measure.

will be back!

Jesper.