Python Open Room Correction (PORC) - Page 2 - diyAudio
Go Back   Home > Forums > Source & Line > Digital Line Level

Digital Line Level DACs, Digital Crossovers, Equalizers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 3rd July 2012, 05:13 PM   #11
chaparK is offline chaparK  Luxembourg
diyAudio Member
 
Join Date: Apr 2010
Location: Luxembourg
Quote:
Originally Posted by greenm01 View Post
If you look in the 'data' directory on Github, you can find the measured impulse response of my system. You can run this data through the filter to produce an example. The filter output is a mono wav file. You can use 'sox' to change it to your desired format.
I don't have the required packages installed to run your code now, but it's definitely worth checking.
So the FIR coefficients are embedded in the wav file as fixed-point coefficients, is that correct?
In the example that you provide, how many coefficients are required for the processing? (and what's the sample rate?)

I also had a look at the link to the introduction where the original author models a system with a parallel structure of second order sections.

Again, I haven't been in the details of your code, but are you transforming an IIR processing into a FIR one in order to be able to use a convolution engine and because you don't have the appropriate parallel IIR structure at hand? Or is it because it's more efficient?

Also, how do you you perform the transformation from IIR to FIR? Is it an impulse response truncation?

Sorry if my questions are missing the point, I'm just discovering the algorithm.
  Reply With Quote
Old 4th July 2012, 02:25 PM   #12
diyAudio Member
 
Join Date: Nov 2011
Location: Maryland
Quote:
Originally Posted by chaparK View Post
So the FIR coefficients are embedded in the wav file as fixed-point coefficients, is that correct?
Yes. You can import the wav file into any standard convolution engine. On Windows, I like the Foobar2000 convolution plugin. On Linux, I like the jcgui (jconvolver front end) for Jack. For my main stereo system, I'm using MiniDSP's OpenDRC box.

Quote:
Originally Posted by chaparK View Post
In the example that you provide, how many coefficients are required for the processing? (and what's the sample rate?)
There is no limit on the sample rate. For my system, I'm using 48kHz to measure the impulse response of my system.

I added the '-n' flag to PORC to specify the number of output filter taps. The default set to 65536 (which is the same as DRC-FIR), but you can change it to anything. The limiting factor would be your input signal. At 48kHz my measured impulse response is above 130k samples.

The OpenDRC box has a limit of 6144 taps, thus I use -n 6144.

Quote:
Originally Posted by chaparK View Post
I...are you transforming an IIR processing into a FIR one in order to be able to use a convolution engine and because you don't have the appropriate parallel IIR structure at hand? Or is it because it's more efficient?

Also, how do you you perform the transformation from IIR to FIR? Is it an impulse response truncation?
Rather than muddy the waters in regard to algorithm, I believe you would be best served by reading Dr. Bank's papers. I'm still coming up to speed on the DSP theory myself. This one is a good place to start, although Dr. Bank has a number of good references on his webpage:

http://www.mit.bme.hu/~bank/publist/spl08.pdf

Last edited by greenm01; 4th July 2012 at 02:27 PM. Reason: editorial
  Reply With Quote
Old 6th July 2012, 09:26 PM   #13
jlo is offline jlo  France
diyAudio Member
 
Join Date: Nov 2004
Location: france
Hello, trying to use this interesting porc.py, I allways get same error :

Click the image to open in full size.

any idea ?
__________________
jl ohl
ohl about audio

Last edited by jlo; 6th July 2012 at 09:37 PM.
  Reply With Quote
Old 6th July 2012, 10:28 PM   #14
diyAudio Member
 
Join Date: Nov 2011
Location: Maryland
Quote:
Originally Posted by jlo View Post
Hello, trying to use this interesting porc.py, I allways get same error. any idea ?
That's a standard Python language error when the source code in your script is misaligned., i.e. all the tabs do not line up correctly. Did you alter the source code?

See here for an example: Python “expected an indented block”

I just checked out a fresh copy of PORC from Github and successfully ran it on both Linux and Windows 7.
  Reply With Quote
Old 7th July 2012, 01:45 PM   #15
jlo is offline jlo  France
diyAudio Member
 
Join Date: Nov 2004
Location: france
Thanks a lot,

everything is fine now with the latest version : I suppose that it was a copy/paste problem with porc.py
I did'nt know that Python was so sensitive to misalignements..
__________________
jl ohl
ohl about audio
  Reply With Quote
Old 8th July 2012, 03:16 AM   #16
diyAudio Member
 
Join Date: Feb 2009
Location: Brisbane, Australia
For anyone wondering, I've tested in OSX and appears to work.

System:
-OSX 10.7.4
-Python 2.7.3 (installed via homebrew because the Python packaged with OSX is never up to date and needs sudo to install any python libraries and I don't agree with that on principle)
-Latest version of all dependencies from pip.

I've tested inside an iPython 'notebook' because that's my preferred way to work with python code and I can get matplotlib graphs output to the same window. I'd expect it to all work as intended from the command line.
Attached Images
File Type: jpg porc_testing.jpg (103.4 KB, 476 views)

Last edited by hochopeper; 8th July 2012 at 03:22 AM.
  Reply With Quote
Old 8th July 2012, 04:35 AM   #17
qusp is offline qusp  Australia
diyAudio Member
 
qusp's Avatar
 
Join Date: Oct 2009
Location: Brisbane, Australia
sweet, I knew I picked a good minion =) let me know if theres any tests I can do here
  Reply With Quote
Old 8th July 2012, 04:45 AM   #18
diyAudio Member
 
Join Date: Nov 2011
Location: Maryland
Quote:
Originally Posted by hochopeper View Post
For anyone wondering, I've tested in OSX and appears to work.
Good to know it's working on OSX.

I still need to install IPython myself. I still do most things via the Command Line, and enter the Python shell whenever I need to test code here and there.

Now you can measure your own speakers and let us know your listening impression!
  Reply With Quote
Old 9th July 2012, 08:47 AM   #19
anbello is offline anbello  Italy
diyAudio Member
 
anbello's Avatar
 
Join Date: Sep 2004
Location: Italy
Hi greenm01
congratulations for your work, I would like to know if you or someone other have compared the correction obtained from "Python Open Room Correction" with those from DRC <http://drc-fir.sourceforge.net/>.
Actually I have a system with FIR filter coefficients calculated by DRC and applied by brutefir <http://www.ludd.luth.se/~torger/brutefir.html> and I am pretty satisfied, when I will have the time (unfortunately not in the near future) I will try PORC + jconv.

Ciao
Andrea
  Reply With Quote
Old 9th July 2012, 01:35 PM   #20
diyAudio Member
 
Join Date: Nov 2011
Location: Maryland
Hi Andrea,

Quote:
Originally Posted by anbello View Post
I would like to know if you or someone other have compared the correction obtained from "Python Open Room Correction" with those from DRC <http://drc-fir.sourceforge.net/>
I've had good success with DRC-FIR as well. My goal with PORC is to make the script simpler to use, and also employ a filter algorithm well documented in literature. I believe the results are quite nice. Subjectively I have not vigorously compared DRC-FIR to PORC.

I'm also a Python fan and wanted to make Dr. Bank's MATLAB scripts more readily accessible. There are a number of very expensive commercial packages that offer room correction. This is a shame because there are a number of readily available Open Source tools available for the DIY inclined person.
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Introducing OpenDRC, Open Digital Room Correction engine minidsp miniDSP 19 3rd September 2012 01:37 AM
How does the BeoLab5 room correction work? boris81 Subwoofers 0 6th February 2011 06:14 PM
Is a Room correction trial possible? brianuk PC Based 7 5th October 2009 07:29 PM
I need help with digital Room-correction Radian Multi-Way 1 7th February 2007 07:10 PM
Room correction systems herodote Digital Source 0 24th July 2006 10:56 AM


New To Site? Need Help?

All times are GMT. The time now is 04:44 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright ©1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2