Python Open Room Correction (PORC)

Hi all,

before trying PORC on my speakers, I did a simulation.
Hereunder are :
my home left speaker without correction / same speaker with DRC-FIR normal correction / convolved response with PORC

compar14.png


Step responses as above, DRC corrects phase response but PORC doesn't
compar15.png


Phase responses compared ( the blue is DRC-FIR corrected)
phase10.png


As PORC doesn't have microphone curve compensation, please forget response above 12kHz (I couldn't compensate for this yet)
Nice work, PORC seems very promising. I'll have to take time to listen and compare now.
 
Last edited:
DRC corrects phase response but PORC doesn't
Can you please explain how the DRC-FIR phase response is a correction, based on these graphs? There exists no convenient test that delivers an easily understood quality rating for phase. Given our insensitivity to phase, the real question should be: does it matter in a normal listening environment?

As PORC doesn't have microphone curve compensation, please forget response above 12kHz (I couldn't compensate for this yet)
I didn't include mic compensation in PORC becuase the software I use (Room EQ Wizard) already compensates for it.

Nice work, PORC seems very promising. I'll have to take time to listen and compare now.
Thanks. I would like this to be a community project; open to improvements and suggestions.
 
Can you please explain how the DRC-FIR phase response is a correction, based on these graphs?
The step response in the middle is the one corrected with DRC-FIR and shows a corrected phase response. In the lower picture, the blue curve is the DRC-FIR phase and it is mostly flat, showing correction compared to the uncorrected green one.
But I agree with you, phase response is far less important than amplitude response.

I didn't include mic compensation in PORC becuase the software I use (Room EQ Wizard) already compensates for it.
Does it mean that REW can export with mic compensation ?

I would like this to be a community project; open to improvements and suggestions.
Sometime ago I did a GUI for DRC-FIR, so I just added PORC calculation, but, sorry, only for Windows and no real manual : http://www.ohl.to/audio/downloads/align2.zip
 
Last edited:
The step response in the middle is the one corrected with DRC-FIR and shows a corrected phase response.
How do you know that the DRC-FIR "correction" is true to the uncorrected input? Based on the second graph, neither PORC nor DRC-FIR look like (visually) the uncorrected phase.

Does it mean that REW can export with mic compensation?
Yes.

Sometime ago I did a GUI for DRC-FIR, so I just added PORC calculation
That's interesting. I've used some of your VST plugins before and I like your GUI. I haven't had time to look your PORC plugin, but that would be great if PORC had a user friendly front-end. It would be even better if it was a standalone package without having to manually install all the Python dependencies.
 
Hello Greenm01,
Just received my OpenDRC and made some tests.
I use Align2 as a GUI frontend http://www.ohl.to/audio/downloads/align2.zip, and I use the target files of DRC-FIR.
Everything works with PORC but not the target function. With mostly flat curves, no problem, but when you try to compensate for mic correction or choose curves with some boost in low frequencies, then you can get strange results, ie here is PORC with bk-3-subultra-spline-48.0.txt
subult10.png

Any clue ? (I'm not a Python user but I will try to understand).
Anyway, with PORC, you've brought us a very nice tool..
 
error/bug

Any clue ? (I'm not a Python user but I will try to understand).Anyway, with PORC, you've brought us a very nice tool..

I purposly did not include microphone compensation in PORC because I already have it included with my recording software (Room EQ Wizard).

In regard to the target curve error there may be a bug or improvement that I can make to my spline function in Python. Thanks for pointing this out. Will you please post 'bk-3-subultra-spline-48.0.txt' so I can test it myself?
 
Hello,

here is a test target where I'd like to keep a bit of boost in lower frequencies :
30 -6
40 0
50 4
400 0
3000 0
10000 -2
18000 -6
here is the result !
target10.png



now a bit modified
10 -60
30 -6
40 0
50 4
400 0
3000 0
10000 -2
18000 -6
20000 -60

it gets better but the bass boost is nowhere :
target11.png


Spline curve calculations are allways tricky : would it be possible to avoid splines ?
 
Administrator
Joined 2004
Paid Member
JL, I did a bit of experimenting with PORC and with "by hand". Both seemed to work pretty well.

To do the correction by hand, I took a measurement with HOLMImpluse then combined that (in HOLM) with my target response. I don't remember which math function I used.
Once that done, I exported a 1/6 octave FR, then re-imported it so that that the FR had the smoothing built in. Not sure that step as necessary, it might not be.
From there I exported the impulse wave for use in a convolver. It worked well. Basically it's doing the same thing as PORC, but with a simple 1/6 octave smoothing. You could choose other smoothing, of course. More steps to go thru than PORC, of course.

Can't say which was better, I didn't do enough listening or measuring. But they did sound similar.
 
I just had a quick review of scipy docs and seems that an equivalent to matlab's pchip doesn't exist.

A while back this was posted this to a sourceforge mailing list for matplotlib but I've not had time to review it thoroughly to know if it still works or is of use directly in porc without rework I did see some discussion on merging it to mpl but I'm not sure if this has happened or not.

Interesting discussion guys, when I get home from in a few hours I'll have a read and post up anything I can find.
 
I just had a quick review of scipy docs and seems that an equivalent to matlab's pchip doesn't exist

Octave, the open source version of MATLAB, has a pchip function. See attached script from the Octave code base. It's just a matter of porting the function over to Python.

I'll try to set aside some time within the next few days to get it done.... unless someone else beats me to it :spin:
 

Attachments

  • pchip.zip
    2.3 KB · Views: 67
target curve fix

I believe the target curve problem is fixed. Interpolation is not an ideal solution but it seems to work fairly well. If I'm not mistaken this is also the method DRC-FIR employs?

Another option is to simply target a flat curve and use parametric equalization further down the chain. I know this is fairly trivial if one uses OpenDRC or MiniDSP.

Please let me know if anyone finds any other problems or bugs.
 
It appears the latest version of Scipy moved the fft and ifft functions into the scipy.fftpack package. I still have 0.9 installed on my machine where it's located in scipy.signal

I made the update and pushed the revision to Github. It works on my end. Please let me know if you have any other version issues.
 
I believe the target curve problem is fixed. Interpolation is not an ideal solution but it seems to work fairly well. If I'm not mistaken this is also the method DRC-FIR employs?

Another option is to simply target a flat curve and use parametric equalization further down the chain. I know this is fairly trivial if one uses OpenDRC or MiniDSP.

Please let me know if anyone finds any other problems or bugs.


I just noticed in the update to SciPy 0.11 (released today) that there is some improvements/additions to the interpolate tools - SciPy 0.11.0 Release Notes — SciPy v0.12.dev Reference Guide (DRAFT)

Actually that link is a bit odd - try this - http://docs.scipy.org/doc/scipy/reference/release.0.11.0.html

Also note that there is change to behaviour of the univariate spline in 0.11, it now returns an array, I haven't had a chance to test how this might affect current porc code but worth pointing out that people not wanting to get their hands dirty shouldn't upgrade to 0.11 until that is tested.
 
Last edited: