• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Room correction - Linux

fluid

Addicted to Fun and Learning
Joined
Apr 19, 2021
Messages
691
Likes
1,196
There are three places to adjust the end frequency depending how you want the filtering to be done, as said above the window lengths and exponents would be quite different.

MPEndFreq​

EPEndFreq​

ISPEEndFreq​

Both EP and ISPE need to be adjusted together to avoid DRC erroring.

Usability often has as much to do with familiarity. A GUI can help as all the options are exposed but anything worth using will be too complicated for some.
I recently made some filters for another member and had forgotten how to do it myself, small amount of head scratching and it all came back to me :)
 
OP
Lilith

Lilith

Active Member
Joined
Mar 28, 2021
Messages
267
Likes
79
I calibrated my KH120 today and this is the measurement in red for the left speaker and the green line is the filter I got with DRC-FIR. To apply the filter to the measurement I first thought that I have to subtract it, but I think multiplying it is correct, right? The blue is what I get when multiplying and correcting the SPL (with Aligh SPL in the options)

This is with these parameters:

drc --BCInFile=/home/marco/DRC_room_correction/rew_ir_48_left_220605_KH120.pcm --PSOutFile=/home/marco/DRC_room_correction/filter_48_left_220605_KH120.pcm --PSPointsFile="/usr/share/drc/target/48.0 kHz/pa-48.0.txt" --MCFilterType=M --MCPointsFile=/home/marco/DRC_room_correction/35R586_cal_0degree.txt --PLMaxGain=1.1 --PSNormFactor=0.65 "/usr/share/drc/config/48.0 kHz/minimal-48.0.drc"
caJZL1g.png
 
Last edited:

fluid

Addicted to Fun and Learning
Joined
Apr 19, 2021
Messages
691
Likes
1,196
I first thought that I have to subtract it, but I think multiplying it is correct, right? The blue is what I get when multiplying and correcting the SPL (with Aligh SPL in the options)
Multiplication is correct A*B with a corresponding level drop. A time domain convolution is the same as a frequency domain multiplication.
https://www.dspguide.com/ch9/3.htm
 
OP
Lilith

Lilith

Active Member
Joined
Mar 28, 2021
Messages
267
Likes
79
Multiplication is correct A*B with a corresponding level drop. A time domain convolution is the same as a frequency domain multiplication.
https://www.dspguide.com/ch9/3.htm

Thank you , I also just realized that I'm boosting the range 20 Hz upwards which makes no sense as the KH 120 have a low pass filter of 30 Hz; 6 dB/Okt. Is it necessary to adjust this or can this be ignored? I use "--PLMaxGain=1.0" and even with this the filter is still boosting around 2.5 dB. For the target I used pa-48.0.txt
 

fluid

Addicted to Fun and Learning
Joined
Apr 19, 2021
Messages
691
Likes
1,196
In your case you can ignore it because you aren't boosting anything. The 120dB line represents zero so all the EQ is reductive. You just need to adjust your blue line down a little and it will overlay the red one much more. Once the area under 50Hz lines up you have the correct offset.
 
OP
Lilith

Lilith

Active Member
Joined
Mar 28, 2021
Messages
267
Likes
79
In your case you can ignore it because you aren't boosting anything. The 120dB line represents zero so all the EQ is reductive. You just need to adjust your blue line down a little and it will overlay the red one much more. Once the area under 50Hz lines up you have the correct offset.

Thanks. Still not clear to me :) . Here is the measurement in red and two filters. The green one was generated with --PLMaxGain=1.0 and --PSNormFactor=1. So in my understanding there should be no boost. At 30 Hz it's at around 90 dB SPL. Shouldn't I expect 120 dB then?The orange curve is with --PLMaxGain=4.0 and --PSNormFactor=1, so I allow considerable boosting.

MtpFRTG.png



When I change the scale to dBFS it makes more sense to me: For the green the maximum boost is around 1.3 dB, although I set --PLMaxGain=1.0 and I wouldn't expect any boost with this setting. For the orange curve there would be a lot of boost with 10 dB at 30 Hz which might affect the signal. In that case one should adjust the bass drop for the filter, right? Is there any best practice how to do this?

VSLVkU9.png
 
OP
Lilith

Lilith

Active Member
Joined
Mar 28, 2021
Messages
267
Likes
79
looks like that this is the right keyword:

6.12.7 PSPointsFile (*)​


File containing the post filter frequency response definition. This file should contain PSNumPoints lines, each line in the form “Frequency Gain”, with the gain expressed as a linear gain or in dB depending on the PSMagType parameter value. The following examples are in dB. The first line must have a frequency equal to 0, the last line must have a frequency equal to BCSampleRate / 2 . A post filter definition file must have the following format:

0 -40 18 -20 20 0 20000 0 21000 -40 22050 -100
This is for a 44.1 kHz sample rate.

The post filter stage is usually used to prevent overcompensation in the subsonic or ultrasonic range, but may be used also to change the target frequency response from linear to a more euphonic one.

Starting from version 2.0.0 DRC lets you specify the phase for the target post filter stage. Phase specification should be placed after the amplitude specification and should be expressed in degrees. Following the example above:

0 -40 0 18 -20 45 20 0 90 20000 0 180 21000 -40 90 22050 -100 0
If not specified a value of 0 is assumed. Setting a phase different than 0, i.e. flat, is useless within normal HiFi systems in almost all circumstances. Furthermore the phase specification is used only if the PSFilterType is L, else any phase specification is wiped out by the minimum phase filter extraction.
 

fluid

Addicted to Fun and Learning
Joined
Apr 19, 2021
Messages
691
Likes
1,196
Certainly it is not a simple matter to judge these things by trying to compare then in REW. There can be an overall gain change like the 1.3 dB you see without there being an EQ boost. A boost is something above the determined RMS level of the input. The postfilter settings will also have an effect on this too. A flat line at 90 or 120dB just represents a different voltage level. Most convolution plugins have a normalizing feature to avoid any excessive gain or cut from the filter.

If you can tell me what you want to happen it might be easier to explain how to achieve that directly.
 
OP
Lilith

Lilith

Active Member
Joined
Mar 28, 2021
Messages
267
Likes
79
Certainly it is not a simple matter to judge these things by trying to compare then in REW. There can be an overall gain change like the 1.3 dB you see without there being an EQ boost. A boost is something above the determined RMS level of the input. The postfilter settings will also have an effect on this too. A flat line at 90 or 120dB just represents a different voltage level. Most convolution plugins have a normalizing feature to avoid any excessive gain or cut from the filter.

If you can tell me what you want to happen it might be easier to explain how to achieve that directly.

I'm using Jconvolver which has a gain setting which I currently set to 0.6 to prevent clipping. In the FR below there are some issues that I want to correct. I think the dip at 100 Hz I can't correct with boosting as this is cancellation (floor bounce maybe). The range at around 800-1000 Hz is lower because of cancellation from my huge table. I think boosting also makes not much sense here, but let's say I want to allow boosting the region above 50 Hz or 100 Hz by 5 dB, but nothing below, how to do that? Will also read is diy-audio and in the mailing list of drc-fir to learn more.

MtpFRTG.png
 

fluid

Addicted to Fun and Learning
Joined
Apr 19, 2021
Messages
691
Likes
1,196
The 100Hz dip is most likely boundary interference from the wall behind the speaker, but depending on how the speakers are positioned and distances it could be something else.

These problems need to be solved acoustically having a big hole at 100Hz is not good. Try moving the speakers closer to the wall behind them as this will normally push that dip up higher where absorbents are more effective. Have a look at the spectrogram to see where in time the dip occurs this can help you track it's source.

To get a shelving boost you define a target response in a text file that has the shape you want. That can be opened in REW to see how it looks. You need to check the target curve interpolation options as they give completely different results to the same target coordinates. The target can be a bass boost or a treble cut the result is the same apart from gain change. What I tend to do is define the bass rolloff I want in the target file and then use PEQ to get close to that in REW. DRC will then leave it alone as is. Upping the PLGain to 4 might be needed to get the target to match depending on how you set it up.
 

dasdoing

Major Contributor
Joined
May 20, 2020
Messages
4,209
Likes
2,674
Location
Salvador-Bahia-Brasil
there is a trick to tweak the resulting graph. just tweak it with manual EQ in REW, export the filter to a txt, and join it with your DRC target file in a text editor. than you DRC again with the new target file and the result will be what you want
 
OP
Lilith

Lilith

Active Member
Joined
Mar 28, 2021
Messages
267
Likes
79
The 100Hz dip is most likely boundary interference from the wall behind the speaker, but depending on how the speakers are positioned and distances it could be something else.

These problems need to be solved acoustically having a big hole at 100Hz is not good. Try moving the speakers closer to the wall behind them as this will normally push that dip up higher where absorbents are more effective. Have a look at the spectrogram to see where in time the dip occurs this can help you track it's source.

To get a shelving boost you define a target response in a text file that has the shape you want. That can be opened in REW to see how it looks. You need to check the target curve interpolation options as they give completely different results to the same target coordinates. The target can be a bass boost or a treble cut the result is the same apart from gain change. What I tend to do is define the bass rolloff I want in the target file and then use PEQ to get close to that in REW. DRC will then leave it alone as is. Upping the PLGain to 4 might be needed to get the target to match depending on how you set it up.

Thanks a lot! I'll play around with this. Regarding the Frequency Response I'l reply in this thread to not flute the thread here:

 

topas

New Member
Joined
Aug 24, 2022
Messages
2
Likes
1
I don't like the DRC-desginer. Align 2 gives more control for tweeking. afair DRC-designer doesn't even let you switch of the psychoacoustic target computation which is default in the code and isn't realy working imo
I always used DRCDesigner in the past. The french (only?) documentation of Align always kept me away from it and I like that DRCDesigner is cross platform. (Mostly, there is a binary that is platform dependent)

One day DRCDesigner didn't work anymore. Some error related to missing libraries.
I also thought about creating a script for drc and the measurement (or taking over the provided script), but I think a gui program is always more convenient than a script.
That is why I created an issue at the
Github repository of DRCDesigner. I also fixed the issue by a pull request.

What I want to point out with all this is that it would be nice to continue the development of the already existing gui, rather than using scripts that everyone maintains on their own.

So @dasdoing and all others, if you find some time, create issues for what you don't like at DRCDesigner to let others at least know the state of the project. If development really gets back on is something unknown.
 
Last edited:

topas

New Member
Joined
Aug 24, 2022
Messages
2
Likes
1
There is so much to say.
First it is up to every individual how much effort one wants to spend. If it is too much effort to report issues you have with a software you're interested in - that is fine. Really. I do that, too - sometimes. Though, most of the time I try to reach the devs.

As an addition: I personally think that open source depends on everyone's small efforts.
And development is not very likely to start without a problem (something is wrong with DRCDesigner or even the need for an entire new app) in the first place.

That is why I wanted to just remember the possibility to make DRCDesigner better, instead of just saying it doesn't do things you would like it to do somewhere in a forum.
But it is not a must. :)
 

dasdoing

Major Contributor
Joined
May 20, 2020
Messages
4,209
Likes
2,674
Location
Salvador-Bahia-Brasil
There is so much to say.
First it is up to every individual how much effort one wants to spend. If it is too much effort to report issues you have with a software you're interested in - that is fine. Really. I do that, too - sometimes. Though, most of the time I try to reach the devs.

As an addition: I personally think that open source depends on everyone's small efforts.
And development is not very likely to start without a problem (something is wrong with DRCDesigner or even the need for an entire new app) in the first place.

That is why I wanted to just remember the possibility to make DRCDesigner better, instead of just saying it doesn't do things you would like it to do somewhere in a forum.
But it is not a must. :)

I actualy use the GUIs only as a starting point. as mentioned Align2 serves me better for that (I will than copy the comand from the comand line and add further options). no gui will ever cover all the possibilities of the software. I must say though that I study Denis's documentation since 2011 and it took me many years to understand it lol. So a GUI is certainly a good idea. the problem is that there is not much interest in general for the software. on a sidenote: I rember Denis writing in the mailing-list that he prefers his software to be complex and that he has no intrest in a widespread use of his software.
 

johnp98

Active Member
Joined
Jan 29, 2021
Messages
133
Likes
201
I actualy use the GUIs only as a starting point. as mentioned Align2 serves me better for that (I will than copy the comand from the comand line and add further options). no gui will ever cover all the possibilities of the software. I must say though that I study Denis's documentation since 2011 and it took me many years to understand it lol. So a GUI is certainly a good idea. the problem is that there is not much interest in general for the software. on a sidenote: I rember Denis writing in the mailing-list that he prefers his software to be complex and that he has no intrest in a widespread use of his software.


That is really too bad that he did not want DRC-fir to get a GUI or more widespread use as it does seem very powerful.

I followed this thread that had amazing scripts for running DRC-fir and was actually quite good and efficient at making filters but also generating predicted responses that you could see in REW and allowing for full line by line customization.

Sadly it has been a good year or two since I have used it, and I suspect I have forgotten much of how to use it and thus I am not sure I will start all over again.... but it would be great if it was more accessible for sure.
 

ernestcarl

Major Contributor
Joined
Sep 4, 2019
Messages
3,106
Likes
2,313
Location
Canada
That is really too bad that he did not want DRC-fir to get a GUI or more widespread use as it does seem very powerful.

I followed this thread that had amazing scripts for running DRC-fir and was actually quite good and efficient at making filters but also generating predicted responses that you could see in REW and allowing for full line by line customization.

Sadly it has been a good year or two since I have used it, and I suspect I have forgotten much of how to use it and thus I am not sure I will start all over again.... but it would be great if it was more accessible for sure.

Why not just use plain REW + rePhase?

Both are easier to use (and remember how to use) with their GUI. Those pretty much are all that I use together with JRiver on Linux now. I don't believe the learning curve could be any more difficult than working with Denis's DRC. Plenty of possibilities to go wrong either way, but some (or lots of) trial and error is kind of to be expected whichever software you pick.
 

dasdoing

Major Contributor
Joined
May 20, 2020
Messages
4,209
Likes
2,674
Location
Salvador-Bahia-Brasil
If one understand the concept, one can phase correct in REW.
create minimum phase and excess pahse versions of you meassurements and play around with the new regularisation factor for trace inversion.
use FRW for the phase.

I'm planning to write a tutorial one day, but not in my priorities atm
 

ernestcarl

Major Contributor
Joined
Sep 4, 2019
Messages
3,106
Likes
2,313
Location
Canada
If one understand the concept, one can phase correct in REW.
create minimum phase and excess pahse versions of you meassurements and play around with the new regularisation factor for trace inversion.
use FRW for the phase.

I'm planning to write a tutorial one day, but not in my priorities atm

I had played around with some of the new trace arithmetic features in REW. Interestingly, I have noticed even more new additions/changes now from last I checked. However, there are several missing convenient features that I prefer to use in rePhase that REW does not have. Like tap limiting for creating quite economic/efficient filters — though, I think you’d probably not really need or care for that…
 
Top Bottom