A convolution based alternative to electrical loudspeaker correction networks

Ho Ho..

I was inventing my own problems trying to get the .wav's behave in camilladsp.
Camilladsp don't accept .wav's (Sherlock jesper :mafioso:)
- But somehow i had some running, but i have to forget about using that format for now :)...

Makes sense now, BUT i learned a lot of for sure...

fluid did wrote somewhere (i can't find again) that i can set the Gmad's script to output .pcm or like instead of .wav's. - I will look again, hope this is possible.

Jesper.
 
Greg's batch scripts include sox commands to convert the native pcm output from DRC to wav files to import to REW.

I have highlighted the relevant parts of the script file for you to see.

The yellow highlight shows the Post Filter Output File name so this file which will be saved in the sample folder is the one you want.

Change the extension from pcm to bin and you have your working filter for camilla.

Below in the Red box are the sox and file commands.
By Commenting out or removing the del commands the original pcm filter will be left in the sample folder but sox will still convert it to a wav file for use with REW or other programs.
 

Attachments

  • Script.jpg
    Script.jpg
    233.2 KB · Views: 168
Greg's batch scripts include sox commands to convert the native pcm output from DRC to wav files to import to REW.

I have highlighted the relevant parts of the script file for you to see.

The yellow highlight shows the Post Filter Output File name so this file which will be saved in the sample folder is the one you want.

Change the extension from pcm to bin and you have your working filter for camilla.

Below in the Red box are the sox and file commands.
By Commenting out or removing the del commands the original pcm filter will be left in the sample folder but sox will still convert it to a wav file for use with REW or other programs.

Cool...

I downloaded the Room Correction to my work pc here, and found it.
I can move on now i guess :)

I understand the scripts, glad i didn't have to learn that also :eek:

Jesper.
 

Attachments

  • DRC-1.PNG
    DRC-1.PNG
    27.4 KB · Views: 150
Been listening to bunches of music with the 7 standard filters and they all sound great (even the Insane Filter!), but then I think my speakers sound pretty good without equalization (2-ways with ScanSpeak drivers and a 12" sub). Was able to hear some pre-echo, but only on the Soft Filter (has the worst pre-echo impulse response), and only if listening to tone-bursts. The tonal balance improves slightly when I switch in any of the filters, and maybe the phantom center tightens a bit with the more aggressive filters, but apparently my ears are too dull to be bothered by any artifacts.

I compared the filter config files line by line (imported to spreadsheet) and was surprised that the main difference (albeit important) is the frequency dependent windowing; other parameters like max boost/cut stay the same. So I think a this point I am bold enough to start creating some custom filters of my own. Despite my limited success, I am definitely having fun! :)
 
I should also mention that none of the filters had the near one-second delay of the initial filter I created using DRC-Designer. Not sure what is different, but the delays ranged from under 10ms to around 40ms for the Insane Filter. Watching video with the filters did not cause noticeable sync issues.
 
So hey now :)

Things are working now. Camilla is no longer making uproar :D
I tried the Normalfilter.bat and it actually work's...
Didn't had a chance listning yet through.
Left side attachments

My workflow is like this : (comments are very welcome)
1. Measure at 1M sweep (rew), create target and make .bin filters in rePhase.
2. Apply it to convolver (camilladsp) pipeline
3. Apply -6dB gain to pipeline

4. Remeasure at 1M sweep (rew)
5. Remove [FDW]
6. Save as impulseresponse .wav / 32bit float, mono (no normalize no IR window) as per instructed in Gmad's instructions.
7. Import to Audacity, Export as RAW(header-less), 32bit float
8. Rename to LeftSpeakerImpulseResponse.pcm etc..

9. Run through modified Gmad's script
10. Rename the finished .pcm files to .bin (L+R)
11. Apply to pipeline in camilladsp
12. Listning (Done!) - Working :p

Finally my journey can start into DRC-FIR... Thanks all!

Code:
Set DRC_DIR=\Room Correction\drc-3.2.2\sample
Set CONVOLVER=\Room Correction\Convolver Filters

cd %DRC_DIR%
drc.exe --MCFilterType=M --MCPointsFile="C:\Mic\umik.txt" --BCInFile=LeftSpeakerImpulseResponse.pcm --PSOutFile=LeftSpeaker-NormalFilter.pcm normal-44.1.drc
pause
drc.exe --MCFilterType=M --MCPointsFile="C:\Mic\umik.txt" --BCInFile=RightSpeakerImpulseResponse.pcm --PSOutFile=RightSpeaker-NormalFilter.pcm normal-44.1.drc
pause
sox.exe -t raw -e float -b 32 -r 44100 -c 1 LeftSpeaker-NormalFilter.pcm -e signed -t wavpcm LeftSpeaker-NormalFilter.wav
sox.exe -t raw -e float -b 32 -r 44100 -c 1 RightSpeaker-NormalFilter.pcm -e signed -t wavpcm RightSpeaker-NormalFilter.wav
sox.exe -M LeftSpeaker-NormalFilter.wav RightSpeaker-NormalFilter.wav -e signed -t wavpcm NormalFilter.wav
move /y NormalFilter.wav "%CONVOLVER%
del "LeftSpeaker-NormalFilter.wav"
del "RightSpeaker-NormalFilter.wav"

About the mic. calibration i use, does not end with 22050, but with 20016.816, don't know if it means anything. The script are using it so no errors. (mic cal file attached)
make sure that the starting and ending frequencies of the microphone calibration file are 0 and 22050 respectively
 

Attachments

  • 7055756.txt
    9.8 KB · Views: 52
  • spl.jpg
    spl.jpg
    123.2 KB · Views: 124
  • impulse_prefilter_normalfilter.jpg
    impulse_prefilter_normalfilter.jpg
    93.5 KB · Views: 120
  • impulse_prefilter.jpg
    impulse_prefilter.jpg
    90.8 KB · Views: 122
Could you show the IR with a time spanning 10 ms instead of the 1.98 ms you show now?
I think we're zooming in pretty far, though i don't like the the shape of the pré-filter+Normalfilter just yet. It should have looked more like the pré-filter but cleaner.

Not sure yet what is happening and the zoom on the first two milliseconds might make it look worse than it is.

You'll still have to (re)balance the results with a target EQ, I wouldn't be surprised if pré-filter by itself sounds more pleasant than the pré-filter + Normalfilter as it has a better room balance.

What's the 1M sweep? Is it measured at 1 meter from the speaker or is it the one minute sweep within REW. Better to ask :).
 
Could you show the IR with a time spanning 10 ms instead of the 1.98 ms you show now?
I think we're zooming in pretty far, though i don't like the the shape of the pré-filter+Normalfilter just yet. It should have looked more like the pré-filter but cleaner.

Not sure yet what is happening and the zoom on the first two milliseconds might make it look worse than it is.

You'll still have to (re)balance the results with a target EQ, I wouldn't be surprised if pré-filter by itself sounds more pleasant than the pré-filter + Normalfilter as it has a better room balance.

What's the 1M sweep? Is it measured at 1 meter from the speaker or is it the one minute sweep within REW. Better to ask :).

Hey wesayso...

Iam not home before evening but will post as you demand :)
The 1M sweep is the sweep lenght you set in REW (around 22sec.@44100)
I don't think i understand what you mean saying i still have to rebalance with a target EQ?

I just did this normalfilter quick to see if everything was working, i im not yet there to tweak things yet... I just started with drc-fir now, as i had problems getting my convolver work right.

Jesper.
 
Something is not working right. Check through the DRC commands as they are on the screen and see if the Mic Cal is working.

I have attached you a new Mic Cal file to try I have added the 22050 and changed your zero value to the same as the first value. I would put this in the sample folder then you don't need to write the full path to it in the script.

The uplift at the high frequencies looks reminiscent of a cal file shape.
You have got a lot of low frequency boost going on there to be flat to 15Hz I do not suggest running it like that.

I don't think greg uses a flat target in any of the scripts by default?

The brown impulse looks pretty good the green one is all over the place is that after DRC?
 

Attachments

  • 7055756DRC.txt
    9.8 KB · Views: 50
Last edited:
Hello...

So i ran the Normalfilter again and i zoomed out so that impulseresponse is not so detailed.
I ran it with the mic. cal. file fluid created. I attached the original calibration file for ref. here.

Again, this was just a quick run i did to see if the filters would run, and to see if i was converting etc.. the right way.
I havent got to the point where i begin to tweak the scripts yet :)

The .zip file contains ::
The measured response with Prefilter applied.
The exported (from REW) .wav's (also them measured with prefilter applied)

measure
 

Attachments

  • 7055756.txt
    9.8 KB · Views: 53
  • preonly_1.jpg
    preonly_1.jpg
    89.3 KB · Views: 210
  • preandDRC_1.jpg
    preandDRC_1.jpg
    85.8 KB · Views: 210
  • filterDRC_1.jpg
    filterDRC_1.jpg
    118.9 KB · Views: 336
  • filesystem.png
    filesystem.png
    13.5 KB · Views: 205
  • NormalFilter.bat.txt
    917 bytes · Views: 57
This is what I get. All of the standard templates are using a virtually flat target so the output should look flat.

With psychoacoustic smoothing it is mostly flat. With FDW of any kind it is not flat. I didn't add your cal to REW so it would look a little better if I did.

attachment.php


The corrected impulse looks good. This is done in REW by using A*B on the original measurement and the DRC filter. This is a virtual combination and should be what you get when you measure it.

attachment.php


As your impulse is weird something is going wrong. I would say either the conversion to raw pcm (but I doubt it) or camilla is not handling the file properly or it doesn't like it.

To test that run the A*B in REW with your test filter and base measurement if you get what I did then it is a playback issue if not it is a measurement conversion issue.
 

Attachments

  • Normal Test.jpg
    Normal Test.jpg
    112.9 KB · Views: 349
  • Normal Test Impulse.jpg
    Normal Test Impulse.jpg
    95.5 KB · Views: 355
:)

To test that run the A*B in REW with your test filter and base measurement if you get what I did then it is a playback issue if not it is a measurement conversion issue.

I did this with the L channel of the measurement i took when my Pre-filter was applied, the impulse look's the same to me.

I'am not sure i explained myself correct sry...
The measurements i sended before as a .zip was the measurement i took with my prefilter applied.
I did not take any measurements with the DRC filter applied.
I only took screenshots of the rew imported impulse response from the NormalFilter i ran with my mic cal. file.

So i don't understand how this could be something to do with camilla (sry.. i really try to understand)

I attached my folder with the rePhase and REW data for my Prefilters.
here :Pre_filter
Jesper.
 

Attachments

  • compare.jpg
    compare.jpg
    76.5 KB · Views: 63
Ah... I whish we knew that before (lol)...

So what we were looking at was the correction file with it's IR. Phew...

848699d1590838052-convolution-based-alternative-electrical-loudspeaker-correction-networks-filterdrc_1-jpg


Looking at it with that knowledge suddenly makes the light bulb go on :D.

Both Fluid and I thought we were seeing a corrected IR, that was not the case...
I could have guessed just by seeing the level of that file. I'd still use normalised on output of the IR to prevent these silly boosts that need to be reduced before use. 120 dB for a correction file that only needs to equalize is silly. If it were centered around 0 dB, it would still do it's job properly and not adjust/change the SPL level of the pré-EQ-ed input.
I'd suggest convolving the pré EQ with the DRC correction and level matching of that correction file to the pré EQ.
 
Last edited:
Hi..

I took a measurement and it looks simulair ::
So things are working!

It's very impressive that you can convolve A*B in REW and see the same impulse :)
That it's so close to real measurement's :D

Leason learned again again again !!! :grouphug:

Jesper
 

Attachments

  • StupidME.jpg
    StupidME.jpg
    98.4 KB · Views: 69
Ah... I whish we knew that before (lol)...
lol indeed
120 dB for a correction file that only needs to equalize is silly. If it were centered around 0 dB, it would still do it's job properly and not adjust/change the SPL level of the pré-EQ-ed input.
I'd suggest convolving the pré EQ with the DRC correction and level matching of that correction file to the pré EQ.
That might be a little tricky to get right with raw pcm files as they can be a pain to edit, more so that wav.

Greg advises not to normalise so you preserve the relative level differences between channels. This can be useful to get the levels corrects between left and right by seeing the Computed RMS gain of each channel in the DRC command line output. This difference can be applied to whichever channel needs it to make them more similar, it does work very well.

You could preserve the relative channel differences and still normalise in Audacity by creating a stereo file of the left and right measurements and normalise them together then export the left and right channels separately to raw pcm.

I have attached a target file to try with the different corrections, I prefer this over a BK curve if I am not listening overly loud. BK sounds better the louder it gets. Closer to the pre EQ target. You can import it as a frequency response in REW to see what it should look like and then use that as an overlay to compare the result after correction.
 

Attachments

  • Custom2-var.txt
    148 bytes · Views: 64
Morning :)

I assume i did it right, changing the target section in the normalfilter .drc file.
The results are a slightly more tilted target.
Picture shows Custom2-var vs. standard target generated with Normalfilter.

I didn't listning to it yet.

I ofcause added offsets to the graphs for them to show at same level!

Jesper.
 

Attachments

  • Screenshot from 2020-05-31 07-37-03.png
    Screenshot from 2020-05-31 07-37-03.png
    150.1 KB · Views: 86
  • Targets.jpg
    Targets.jpg
    116.1 KB · Views: 75