Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/greenm01/porc
Python Open Room Correction (PORC)
https://github.com/greenm01/porc
Last synced: 7 days ago
JSON representation
Python Open Room Correction (PORC)
- Host: GitHub
- URL: https://github.com/greenm01/porc
- Owner: greenm01
- Created: 2012-06-30T02:29:00.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2023-11-20T05:07:10.000Z (12 months ago)
- Last Synced: 2024-08-01T15:32:10.428Z (3 months ago)
- Language: Python
- Size: 2.44 MB
- Stars: 95
- Watchers: 14
- Forks: 26
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Python Open Room Correction (PORC)
==================================PORC now includes mixed-phase compensation (see below)!
DSP Loudspeaker-Room correction filter wizard; transfer function modeling and equalization
by fixed-pole parallel filters. Algorithm ported to Python by Mason A. Green, based on the work
of Dr. Balazs Bank: http://home.mit.bme.hu/~bank/parfilt/More details about Dr. Bank's parallel filter can be found in the papers:
Balazs Bank, "Perceptually Motivated Audio Equalization Using Fixed-Pole Parallel
Second-Order Filters," IEEE Signal Processing Letters, 2008.http://www.acoustics.hut.fi/go/spl08-parfilt
Balazs Bank, "Direct Design of Parallel Second-order Filters for
Instrument Body Modeling," International Computer Music Conference,
Copenhagen, Denmark, Aug. 2007.http://www.acoustics.hut.fi/go/icmc07-parfilt
Mixed-Phase Compensation references:Alberto Carini, et al, "Mixed Time-Frequency approach for Multipoint
Room Response Equalization," AES 45th International Conference, 2012
Defrance & Polak, "Measuring the mixing time in auditoria," Acoustics
Paris 2008
Required Python dependencies:1) Python 2.7
2) Scientific Python: SciPy, Numpy, & MatplotlibThe easiest install method on Windows is simply to install the continuum.io Anaconda package.
Measurement
===========One needs to measure the log-frequency impulse response of your speakers with a
calibrated Electret Measurement Microphone, e.g. Dayton Audio EMM-6. Software
such as Room EQ Wizard (REQ), Holm Impulse, or Arta may be used for this purpose:
http://www.hometheatershack.com/roomeq/Usage
=====porc.py [-h] [--mixed] [-t FILE] [-n NTAPS] [-o OPFORMAT] input_file output_file
python porc.py -t tact30f.txt -n 6144 -o bin l48.wav leq48.bin
Use the -h flag for help!
PORC has been tested successfully on both Linux and Windows 7 with Python 2.7. Linux depenency
install is fairly straightforward. Windows install packages are available for all dependencies.Target Response
===============The default target curve for PORC is flat. Included in the data directory are a number
of target curves. Experiment to suit your listening preferences. Use the [-t] flag to load a target
file.One may also target a flat curve, and then use separate parametric equalization for bass boosting
and other pschoaccoustic preferences.For further reference, the B&K House Curve is a good place to start. Read "Relevant loudspeaker
tests in studios in Hi-Fi dealers' demo rooms in the home etc.," Figure 5:
http://www.bksv.com/doc/17-197.pdfMixed-Phase Compensation
==============To use mixed-phase compensation, one needs to specify the [--mixed] flag. One also needs to modify
the Room Impulse Response (RIR) to remove leading silence (zeros) before the main impulse. You can
easily do this with Audacity or REQ.Example:
python porc.py --mixed -t tact30f.txt -n 6144 -o bin l48.wav leq48.wav
Have some patience with this method. The convolution takes a few CPU cycles.PC Convolution
==============Suggestions:
Windows (foobar2000 convolver)
Linux (jconvolver w/ jcgui & Jack)You may need to merge left and right channels into a single stereo .wav
sox -M le148.wav req48.wav equalizer.wav
OpenDRC Convolution
===================Use -o bin flag to set binary 32bit IEEE floating point mono file format output for OpenDRC.
TODO
====Implement algo to automatically remove leading silence (zeros) from RIR.
Add a GUI Frontend (pretty interactive graphs, drawing target curve, etc...)
Update this page with better documentation!Contact
=======Complaints, suggestions, bugfixes: mason dot green at gmail