Old 01-12-2018, 05:30 AM   #1
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,766
Default Room analyzing tool

I have an idea for a tool that I might want to implement, unless something like this already already is available.

I intend to send pink noise (or whatever signal) to an audio output channel (Loudspeaker) and receive audio from an audio input channel (Microphone), do some analyzing and adjust a ReaEQ until the spectrum of the input signal is appropriately similar to that of the noise.

I do know that hardware devices are available that do such stuff. I learned that these devices take a loooong time for the analyzing procedure, hence it seems it is not just measuring the input spectrum and then setting the EQ appropriately.

I did a manual test and after the spectrum of the EQed signal was rather flat (I set the spectrum analyzer "tilt" so that directly measured pink noise created a flat curve), the sound of the system was abysmal to my ears.

Does anybody know a good scientific article describing what those devices exactly are doing ?

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 01-12-2018, 08:08 AM   #2
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 2,682
Default

I use speaker correction software (used to use IK ARC2 - and now Sonarworks).

Both systems use a fast sine full spectrum sweep - sounds like a blip - for analysis.

The reason it takes a long (well 10 minutes or so with sonarworks) time to set up is that you move the microphone around to different positions - and I guess it takes an average across all readings (having worked out where the mic is with respect to the speakers and weighting the results appropriately with regard to the specified listening position).

ARC system has a set pattern that you need to position the microphone in for each room analysis. Sonarworks is way easier - it actually works out the location of the mic from the captured audio itself (this saves a lot of time and appears to be very accurate).

I can't see how pink noise would work particularly well - without using complex filtering on the signal captured to identify room resonance peaks and dips.

If you were planning on using just one capture position - then that would only be good for that exact location - a few inches either way and the captured curve could (and most likely will) sound very different - especially in a normal room.
__________________
Projects - Reascripts - Lua:
LBX Stripper | LBX Chaos Engine | LBX Floating FX Positioner | LBX SRD Smart Knobs
Donate via Paypal
lb0 is offline   Reply With Quote
Old 01-12-2018, 08:41 AM   #3
JHughes
Human being with feelings
 
JHughes's Avatar
 
Join Date: Aug 2007
Location: Too close to Charlotte, NC
Posts: 3,264
Default

Before rolling your own solution please consider Room EQ Wizard. It's free.
https://www.roomeqwizard.com/
__________________
You can only Reverse, Switch, Invert or Flip POLARITY, not "PHASE".
JHughes is offline   Reply With Quote
Old 01-12-2018, 11:00 AM   #4
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 3,354
Default

First you need a microphone that's actually reasonably flat at least out to the limits of what your speakers can do, or at least one that's been analyzed and has a compensation curve available.

Then you remember that (as the others above have been hinting), a simple EQ can't do anything about ringing and decay times. You can turn down a given frequency so that it's resonance isn't so much louder than other freqs, but it'll still last longer for a given impulse - very much like frequency specific reverb. More sophisticated software does...something...to help with that I think, but of course the right answer is proper acoustic treatment.

If you could trust the room itself, and had a flat mic, then you could compensate for your speaker's inherent response curve. Whether or not that's worth it is another question. Now pending more info about the mic and the room, I'm willing to bet that when you got it to "flat" it wasn't actually anywhere near flat AND it was smeared from ringing at certain frequencies AND if you got real deep into with ReaEQ you were also smearing relative phase all over the place. But even if you have got a good room and mic and did get the speakers good and flat, we're just not used to hearing things that way. So I'm not the least bit surprised that it wasn't particularly pleasant.

If you haven't treated your room (and it's not like huge so that it doesn't matter at the mix position) then you should try and get that done. Then, you'll be much better served actually just learning your monitors. Listen to everything through them as often as possible. I am lucky enough that my mix room is also the living room, and my monitors are also my "entertainment system", so about everything I listen to at home is through that system...

...except there's an area of overlap between my main monitors and my subs. I can't adjust the crossover point on either set of speakers. On my studio machine, I have a ReaEQ in monitor FX to compensate, but when I flip over to the "living room" machine, I don't have that, so everything I listen to there is a little fuller in the bass region. It makes the booms on the Netflix movies that little bit more dramatic and gives music a little bit more oomph and is just a little bit more like a typical hyped playback system. But I know that's there, and I know where I'm at when I'm mixing.
ashcat_lt is online now   Reply With Quote
Old 01-12-2018, 11:11 AM   #5
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 22,484
Default

Quote:
Originally Posted by ashcat_lt View Post
If you haven't treated your room (and it's not like huge so that it doesn't matter at the mix position) then you should try and get that done. Then, you'll be much better served actually just learning your monitors.
All good info, just adding the pedantic remark that I think he's wanting the info because he was considering writing a tool rather than fixing his own room.
karbomusic is online now   Reply With Quote
Old 01-12-2018, 11:20 AM   #6
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 3,354
Default

Quote:
Originally Posted by karbomusic View Post
All good info, just adding the pedantic remark that I think he's wanting the info because he was considering writing a tool rather than fixing his own room.
I can write a script that will tell you to treat your room and learn your monitors pretty quick and easy.
ashcat_lt is online now   Reply With Quote
Old 01-12-2018, 02:22 PM   #7
jcjr
Human being with feelings
 
Join Date: Dec 2015
Location: SE TN USA
Posts: 71
Default

I wouldn't discourage writing of a tool, but wish to add recommendation for numerous merits of Room EQ Wizard. The author is highly educated in acoustics and has written a wonderfully complete and functional tool, especially amazing for software which is basically free unless you decide to voluntarily contribute.

Am just saying, other functionality or purpose could be written, but to reinvent the wheel and duplicate the quality and features of Room EQ Wizard would be the result of man-years study and programming. So for the sake of laziness and efficiency, anything which Room EQ Wizard can accomplish, it might be wasted effort to duplicate. IOW, one would want to write features which REW cannot accomplish.
jcjr is offline   Reply With Quote
Old 01-13-2018, 05:34 PM   #8
cyrano
Human being with feelings
 
cyrano's Avatar
 
Join Date: Jun 2011
Location: Belgium
Posts: 3,085
Default

REW is good, but has one major disadvantage: it's written in Java. That's why I use ARTA. ARTA is not free, but like REAPER, it is very affordable. It's Windows only, but runs fine under Wine. For simple stuff, I use Fuzz Measure. I also use RME's Digicheck, but that only works with an RME interface.

For most simple stuff, like room correction, I would certainly welcome a REAPER solution. It can be a real pita running other tools simultaneously as they seem to influence each other somehow.
__________________
“Political correctness is fascism pretending to be manners.” George Carlin
cyrano is offline   Reply With Quote
Old 01-13-2018, 06:28 PM   #9
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,766
Default

Quote:
Originally Posted by lb0 View Post
I can't see how pink noise would work particularly well - without using complex filtering on the signal captured to identify room resonance peaks and dips
Complex filtering is easy in JSFX by FFT.

Simply do an FFT of both inputs and divide the absolute of the "bins" for each frequency and you have the would-be correction curve. (Bus as we learned her, applying same does not really make sense.)

-Michael
__________________
www.boa-sorte.de

Last edited by mschnell; 01-14-2018 at 12:36 AM.
mschnell is offline   Reply With Quote
Old 01-13-2018, 06:29 PM   #10
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,766
Default

Quote:
Originally Posted by JHughes View Post
Before rolling your own solution please consider Room EQ Wizard. It's free.
https://www.roomeqwizard.com/
Great !

I'll have a decent look at this !
-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 01-13-2018, 06:32 PM   #11
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,766
Default

Quote:
Originally Posted by ashcat_lt View Post
, but of course the right answer is proper acoustic treatment ... So I'm not the least bit surprised that it wasn't particularly pleasant.
Yep. So maybe the endeavor is just in vain.

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 01-13-2018, 06:36 PM   #12
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,766
Default

Quote:
Originally Posted by karbomusic View Post
All good info, just adding the pedantic remark that I think he's wanting the info because he was considering writing a tool rather than fixing his own room.
Both. Writing the tool would be fun, and having a Reaper solution would be rather useful, but if there is no chance to test it for good results, the fun is very limited.

-Michael
__________________
www.boa-sorte.de

Last edited by mschnell; 01-13-2018 at 06:46 PM.
mschnell is offline   Reply With Quote
Old 01-13-2018, 06:55 PM   #13
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 22,484
Default

I do agree with others on REW, that's what I use as well.
karbomusic is online now   Reply With Quote
Old 01-13-2018, 07:05 PM   #14
jcjr
Human being with feelings
 
Join Date: Dec 2015
Location: SE TN USA
Posts: 71
Default

Quote:
Originally Posted by cyrano View Post
REW is good, but has one major disadvantage: it's written in Java. That's why I use ARTA. ARTA is not free, but like REAPER, it is very affordable. It's Windows only, but runs fine under Wine. For simple stuff, I use Fuzz Measure. I also use RME's Digicheck, but that only works with an RME interface.

For most simple stuff, like room correction, I would certainly welcome a REAPER solution. It can be a real pita running other tools simultaneously as they seem to influence each other somehow.
I have not tried numerous analysis programs because REW seemed to work good for my purposes. Surely there are many good softwares. Had a couple of email discussions with the author John Mulcahy, who so far as I can tell is sufficiently expert that the functions are correct and he is not "guessing about it". Am just saying, the topic of acoustics is complex enough that there is plenty of room to make conceptual, math, or programming mistakes yielding results that might "look correct" to a user but still be wrong, wrong, wrong.

Which is somewhat different from writing a sequencer, notation, or DSP program-- Though "no mistakes" would be a laudable goal in any endeavor, it is possible to get quite a few things accidentally wrong in a sequencer or DSP plugin and maybe the results are still fit for some purposes regardless that "it isn't quite right". Maybe in some cases flawed sequencer or plugin functions giving "more interesting" results than an academically sterile program that does every little bit correct. But IMO it is desirable that an acoustic analysis tool would be as academically correct possible. Maybe there are numerous analysis tools as good or better than REW. I don't know.

The java code runs "fast enough" on computers and audio interfaces I've used, though maybe it is too slow on some systems? So long as it runs "fast enough" and functions correctly, does it matter what language it is written in? I maintained fairly large music programs in object pascal + asm + some C++, cross-platform mac and windows, about 18 years. Java would have been too slow for what I was doing especially on early slow hardware but was a nightmare maintaining and adding new features cross-platform between Mac and PC.

Today maybe it would be easier with something like JUCE (I'm retired so haven't tried it). But being able to run nearly all the same code on both platforms, only having to write small pieces customized for Mac vs Windows, seems a very strong advantage to me for java so long as it is fast enough for the purpose. Writing a program once is fun. Essentially writing the same program twice is no fun at all and basically cuts the creative lifetime output in half. One half involved in creating something new, and the other half dull monkey work getting it to run on the other platform. Java seems a "wise decision" for cross-platform long-term maintainability to my ignorant point of view, but I've not written much in java and maybe am all wrong about that.

Apologies I only write long rambling pointless messages-- In my hobby room treatment and sound system tweaking, used REW to measure the effect of added room treatment and to help diagnose what further treatments might help. And after the small room treatment was as good as I could figure out how to get it, used REW to guide final sound system tweaking.

I did not want crossover and EQ tweaking dependent on the computer. The mixer drives a Driverack into a triamp system into 18" subwoofer and 12" coax speakers. I want system tweaks applied all the time, not just when audio is coming out of one of the PCs. If I have multiple PCs, hardware synths, guitar, bass, tape machine, radio or whatever plugged into the mixer, I want the system tweaks always in effect.

My driverack doesn't have MIDI or ethernet adjustability so I would repeatedly test with REW then manually adjust the crossovers in the driverack and amps, and manually adjust the EQ in the driverack, then test again with REW. And then listen to a wide variety of music for days or weeks, and then maybe do another loop of test-and-manually-tweak, until after awhile it seemed about as good as it was gonna get and either my ear was numb to the room faults, or it had been adjusted good enough that there wasn't much in the sound that bugged me anymore. Since then I haven't tweaked the crossovers and EQ for a year or two and it still seems OK.

Just saying, REW has some "auto eq" features I haven't used because I've been tweaking sound systems for decades and it was just as easy for me to look at a peak or null in the REW room plot, and know about what frequency, Q and boost/cut to punch into the driverack.

But the REW "auto eq" features can send control codes to some DSP devices, and it can also "auto eq" suggest frequency, Q, and boost/cut on the screen for bands to flatten a response. So REW could provide a table of EQ band specs that could be manually typed-in to any equalizer plugin. Of course, an equalizer plugin which is "scientifically precise" would probably work best. For instance if REW tells you to cut 102 hz, Q=2.1, -1.2 dB, then if you type that into an EQ plugin which actually has some frequency other than 102, some Q other than 2.1, or some cut other than -1.2 dB, then the actual EQ result wouldn't work as good as REW's theoretical predictions.

I haven't explored the auto-eq, but possibly you can talk REW into writing a disk data file of the required EQ adjustments, in which case one could write an EQ plugin to read the data file to set itself up "automatically".

I think you can also talk REW into making FIR correction filters which could be loaded into convolution plugins, but I haven't looked at REW for a year or two and may be remembering that wrong.

Just saying, maybe REW could be used as analysis front-end to setup EQ or convolution plugins on the Reaper master bus or whatever bus would make the most sense if you want to tweak the speakers from within Reaper?

I think if I was gonna get rid of the driverack and the crossovers in the amps in favor of "all pc" speaker tweaking, I think I would dedicate a PC and multi-output interface to do the crossover and EQ tasks and nothing else, so that the speakers would always be tweaked the same regardless of the audio source. In other words, replace the driverack with a fairly fast laptop with maybe a 6 or 8 output audio interface, and just use that PC as dedicated speaker processor and fancy real time analyzer display.
jcjr is offline   Reply With Quote
Old 01-14-2018, 12:44 AM   #15
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,766
Default

Quote:
Originally Posted by jcjr View Post
I Java would have been too slow for what I was doing
I recently watch a video by a guy who created a Java framework that seems to work similar to the JSFX/EEL framework provided by Reaper and allows for Java code to be used as realtime DSP application. I suppose with his framework, the Java code is compiled to a VST (PC and Mac).

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 01-14-2018, 12:59 AM   #16
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,766
Default

As said above, it would be easy to create a JSFX that displays a would-be "room spectrum" or "room correction" curve by doing an FFT of the signal sent to the loudspeakers and an FFT of the signal received by a microphone, do a rather long time average of the absolute of all bins, divide the two sets of bins and show ther quotient as a graphic.

But I do suppose something like this already is available (supposedly as part of Room EQ Wizard, but a free VST would be nicer in a Reaper environment than a stand alone software).

When using pink noise as an input, this would work in theory. Calculating EQ parameters from such a curve is a kind of math I would be able to do in software, be the result useful or not).

Using arbitrary input signals, mathematically would require missing values for frequencies that do not provide enough power. Doable, as well.


-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 01-14-2018, 11:53 AM   #17
jcjr
Human being with feelings
 
Join Date: Dec 2015
Location: SE TN USA
Posts: 71
Default

Quote:
Originally Posted by mschnell View Post
I recently watch a video by a guy who created a Java framework that seems to work similar to the JSFX/EEL framework provided by Reaper and allows for Java code to be used as realtime DSP application. I suppose with his framework, the Java code is compiled to a VST (PC and Mac).
Hi Michael. I haven't plans to write any more commercial code but wish that VST or SOMETHING would get carved in stone and used forever more as an audio plugin format. Any plugin format has to do certain things, and it always seemed to me a foolish re-naming adventure when people or companies would devise some new plugin format which does exactly the same as all the others, but follows different rules, and offers no obvious advantage, and requires fruitless rewriting of perfectly good old code just to get it to run on the "new improved plugin format".

It almost looks like VST might succeed as such a "perpetual standard" but will probably eventually get overturned by adventurers who can't leave well enough alone and want a new format just for the novelty of something new.

Writing big applications which are added-to and refined over years, where the source code gets so big it is hard to remember the pieces of code you yourself wrote a decade ago-- And that old code still works down in the guts of the program, and if a creaky piece of old code has to be torn out for some reason then somebody will have to write new code that does the same thing to take the place of the old assassinated code. After the source code gets big enough, then if ms or apple changes too rapidly you end up having to spend all your time just rewriting old broken code rather than adding new features.

Maybe not a big deal with only a few menus, dialogs and menus to update. Applications which have been "carefully cultivated like a bonsai tree" for decades develop characteristics such as dozens of main menus, hundreds of sub-menus, and possibly thousands of menu items. If apple or ms decide to change how menus work, then you have a big problem on your hands. Big mature applications tend to grow literally hundreds of dialogs, many of which are non-trivial and interact with the user, for instance clicking one control changes the state or available choices of other dialog controls. If you have hundreds of dialogs and ms or apple decides that dialogs will now work a new-and-better way then you have a big problem.

Problems of rewriting previous man-years of work just so the program will keep on running. Crossplatform frameworks such as Juce can help, but the poor fellas who write the frameworks have to keep the frameworks updated, and I've seen cases of frameworks dying on the vine after years of vitality, and grumbles of programmers who have to re-write not because of OS changes, but because of framework "improvements".

Am just saying, for a big crossplatform application with lots of menus, windows and dialogs, crossplatform maintained by a single programmer or small team, if the java you wrote 5 years ago will still run today, and run on both Mac and pc and possibly other platforms, then that does not sound like a bad thing so long as the java runs fast enough for purpose. But I am ignorant of java and maybe java programmers have it just as bad as programmers who are enslaved to objective-c or C# by the chains of man-years of their own code.
jcjr is offline   Reply With Quote
Old 01-14-2018, 01:33 PM   #18
jcjr
Human being with feelings
 
Join Date: Dec 2015
Location: SE TN USA
Posts: 71
Default

Quote:
Originally Posted by mschnell View Post
As said above, it would be easy to create a JSFX that displays a would-be "room spectrum" or "room correction" curve by doing an FFT of the signal sent to the loudspeakers and an FFT of the signal received by a microphone, do a rather long time average of the absolute of all bins, divide the two sets of bins and show ther quotient as a graphic.

But I do suppose something like this already is available (supposedly as part of Room EQ Wizard, but a free VST would be nicer in a Reaper environment than a stand alone software).

When using pink noise as an input, this would work in theory. Calculating EQ parameters from such a curve is a kind of math I would be able to do in software, be the result useful or not).

Using arbitrary input signals, mathematically would require missing values for frequencies that do not provide enough power. Doable, as well.
I did a couple of crude analyzer displays many years ago but am quite ignorant of it.

REW's "primary" analysis mode is playing a sine sweep thru speakers while recording the measurement microphone. There are "well known" math methods of turning the sine sweep information into frequency/phase plots, impulse responses, waterfalls and spectrograms, etc. Have read about the math some time or the other enough to know it exists, but never tried it myself.

A freq response chart from a sine sweep, "raw" is more-similar to white noise analysis than pink noise analysis. The FFT bins need scaling x vs y to show pink noise as a "flat frequency response" as one would see in an elderly analog pink-noise real time analyzer display, most of which used analog bandpass filterbanks rather than FFT. But white noise is too risky to tweeters, and caution is in order about the amplitude of even sine wave sweeps to protect the tweeters.

Various "chirps" are also commonly used for room analysis, in addition to sweeps and various kinds of noise, but I don't recall REW using chirps.

REW also has an "RTA" mode and noise generator with many options. One of the more interesting combinations syncs a repeating pseudo-random pink noise generator to the same FFT frame length of the REW RTA display window, so that if nothing is changing in the room, mic not being moved, no knobs twiddled, nobody walking around in the room-- The RTA display in this synced mode is rock-solid with no gradual "wavyness" that we usually see in pink noise RTA.

Usually all the RTA bands are jiggling a little up and down in response to the noise not being in perfect sync with the analysis, even with analog filterbank analyzers. So usually you have to develop eye practice of visually averaging the slow random wavyness of the RTA display to decide what the average level of each frequency would be. Either that, or average the display time so slow that maybe it takes a minute to see the change every time after you have tweaked an EQ setting, which gets frustrating.

That REW RTA synced pseudo-random pink noise mode is nice, because it is rock solid with lots of detail, but it changes very fast to a new rock-solid display if you move the mic or tweak an EQ or crossover or whatever. So you get both the stable display and also fast response to changes.

Some analysis thangs could be judged "either right or wrong" but there seem "many different ways to do it right". By analogy some people play music better by sticking to maybe only one or two guitars, or one favorite sax or whatever, learning the one instrument very well.

For many years I had an old analog RTA in easy view in the home studio and after years I got so looking at that particular RTA display was very informative because I knew how different music would look in the display from long practice. But a few years ago I looked at several analyzer plugin displays and such. Maybe some of them are simply "wrong wrong wrong" or maybe most of them are mostly right but just different enough that skill in reading one display doesn't help in reading another display. Maybe one display is faster than another, or even silly stuff like one display is tall but the other display is wide. Maybe other eyes better-adapt to differences, but to me I could put several analyzer windows on-screen and play music and to me none of them looked like they were displaying the same thing.

So unless typical people have more flexible perceptual systems, it would probably be a good idea to find a display format that "seems informative" and then use that favored same format long enough that the visual information is useful rather than meaningless eye-candy.

I don't use it for room analysis, but as a mastering aid, the last few years played with voxengo span on the master bus long enough, certain time and slope settings, certain window dimensions, so that the information is useful after some practice. Span probably does "most of it right" but regardless whether strictly right or wrong with some practice is a useful tool. Just saying, other tools similar to Span are probably "as right as is Span" but the display looks different-enough that one would have to practice with the other tool for awhile before it would be useful. At least to me. Just saying, unless someone has really good perceptual system, flitting between many similar but different tools might prevent getting good with any one of them.

Just saying, it is a weird problem but maybe not as weird when calibrating speakers as trying to get additional hints about music frequency balance. It is just "quite possible" that you could measure your room with several different tools and get different frequency plots. Maybe they are all "equally right" so which one do you believe for tweaking the speaker EQ?

It also goes into "how deep do you want to go" in the acoustics. I'm woefully ignorant of acoustics and everything else. So far as I can see many people present themselves as acoustic experts but fewer people seem to actually know what the hell they are doing. Maybe you could get 20 conflicting expert opinions, and how do you decide which opinion is least nonsensical?

But the people who seem to me "most likely to seem to know what the hell they are doing" seem more concerned with time response in the room than with frequency response in the room. But of course time and frequency response are two sides of the same coin, and any EQ will change the time response and vice-versa. Just seems the guys that seem smartest to me, won't necessarily mind if the frequency response is a little weird if the time response is as good as they can get it. So from the judgement of such a practitioner, obsession with flat frequency response is putting the cart before the horse. Or something like that.

I admit to paying closer attention to frequency response but am not an expert.
jcjr is offline   Reply With Quote
Old 01-15-2018, 10:58 AM   #19
Philbo King
Human being with feelings
 
Join Date: May 2017
Posts: 832
Default

I did some in-depth reading on the REW stuff, and experimented with REW till 1:30 last night.

One of the incredibly useful features it does is deriving a graph of all the 'minimum phase' frequencies, and, more importantly, those frequencies which are not. The ones that are not cannot be fixed by equalization. As I understand it, these frequencies are caused by room modes or other resonances (such as those within a speaker cabinet).

Another really great item is calculating the freq, Q, and gain of filters that would be needed to correct a given measurement. I even implemented a correction filter on my Monitor FX in Reaper using ReaEQ. It required that I come up with the math to convert Q to Octaves, which I built into an Excel spreadsheet for future use. The math is fairly non-trivial, so I didn't want to have to reinvent it again someday...

I considered using the phase-linear option in ReaFIR to do the EQ, but it was much simpler to enter it into ReaEQ... I can't say it sounds better or worse; I'll have to switch it in and out while mixing for a while to see if it is beneficial. I suspect it will be.

REW had a room mode simulator that showed my front and side walls are in need of treatment. (It lets you enter your room dimensions, listener position, speaker positions, and the sound absorption coefficient for each room surface. As these are tweaked, the program calculates an estimation of the response curve for the listening position.) Pretty cool!
When the weather here warms enough to use my wood shop, I plan to make some panels for acoustic treatment and restart from scratch.
Philbo King is online now   Reply With Quote
Old 01-15-2018, 12:03 PM   #20
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 22,484
Default

Quote:
I'll have to switch it in and out while mixing for a while to see if it is beneficial.
Probably a good idea to do a mix with the corrections in place (without switching between the two) and see how it turns out.
karbomusic is online now   Reply With Quote
Old 01-15-2018, 06:31 PM   #21
Philbo King
Human being with feelings
 
Join Date: May 2017
Posts: 832
Default

Quote:
Originally Posted by karbomusic View Post
Probably a good idea to do a mix with the corrections in place (without switching between the two) and see how it turns out.
Yeah, maybe so. I'll definitely have to do all my translation tests (how it sounds in the car, on the garage boombox, thru cellphone earbuds, etc.) regardless.
Philbo King is online now   Reply With Quote
Old 01-15-2018, 10:26 PM   #22
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,766
Default

Quote:
Originally Posted by karbomusic View Post
Probably a good idea to do a mix with the corrections in place (without switching between the two) and see how it turns out.
Listening to same where ???
-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 01-16-2018, 10:37 PM   #23
jcjr
Human being with feelings
 
Join Date: Dec 2015
Location: SE TN USA
Posts: 71
Default

Quote:
Originally Posted by Philbo King View Post
I did some in-depth reading on the REW stuff, and experimented with REW till 1:30 last night.

One of the incredibly useful features it does is deriving a graph of all the 'minimum phase' frequencies, and, more importantly, those frequencies which are not. The ones that are not cannot be fixed by equalization. As I understand it, these frequencies are caused by room modes or other resonances (such as those within a speaker cabinet).

Another really great item is calculating the freq, Q, and gain of filters that would be needed to correct a given measurement. I even implemented a correction filter on my Monitor FX in Reaper using ReaEQ. It required that I come up with the math to convert Q to Octaves, which I built into an Excel spreadsheet for future use. The math is fairly non-trivial, so I didn't want to have to reinvent it again someday...

I considered using the phase-linear option in ReaFIR to do the EQ, but it was much simpler to enter it into ReaEQ... I can't say it sounds better or worse; I'll have to switch it in and out while mixing for a while to see if it is beneficial. I suspect it will be.

REW had a room mode simulator that showed my front and side walls are in need of treatment. (It lets you enter your room dimensions, listener position, speaker positions, and the sound absorption coefficient for each room surface. As these are tweaked, the program calculates an estimation of the response curve for the listening position.) Pretty cool!
When the weather here warms enough to use my wood shop, I plan to make some panels for acoustic treatment and restart from scratch.
Yes to me playing with REW and the documentation was very educational. I like hobby woodwork and such, had fun a couple of years studying and treating a small room in the house. For a long time I had a fairly big one-room studio in a separate building near the house, which was sloppily and ignorantly treated decades ago but it sounded pretty good anyway.

So after retirement when I wanted to scale down to a convenient small room in the house I had never learned that small rooms are very difficult to make sound good, and big rooms can be rather forgiving in that regard even if you don't know much about acoustics.

If I had known more before I started, I would have picked a bigger room in the house, with fewer windows and doors, but it is an old house and all the rooms have lots of big windows. Following the "studio building" section on gearslutz.com, my initial mistake and mistakes a lot of beginners seem to make, was to under-estimate the amount of treatment necessary to get a good result. Some people giving "expert" advice that only a few thin absorbers are necessary, and others claiming the necessity of heroic thick full-room treatment viewed as proposing "unrealistic overkill solutions".

So there is the temptation to build or buy a few small thin absorbers as a first test. And then when room measurements show little or no improvement, build or buy a few somewhat bigger absorbers, and then room measurements STILL show little or no improvement. Doing it that way by stages, a gradual escalation because it takes awhile fooling with small thin absorbers before becoming convinced that the "overkill" is necessary-- It ends up taking a lot of time gradually filling the room with more and bigger absorbers until significant improvement can finally be measured. Would be quicker to build big absorbers right away and not even bother to test until the room is just about fully treated.

Tis doubtful I'll set up another room, but if I were to set up another room-- I would find a room at least 2 feet bigger in length and width than I need for the equipment. For the "first stab" of treatment I would cover all practical wall surfaces, floor to ceiling with a 12" depth of unfaced fiberglass attic insulation. Plus whatever ceiling treatment seems reasonable. And then if necessary to improve low bass trapping, would thicken the fiberglass depth to at least 24" square, floor-to-ceiling in room corners. Pro studios often have much thicker treatment, but I think the above-described would be a good "first step" for a good sounding amateur room.

There are many materials and strategies more complicated / expensive than thick attic fiberglass. The fancier materials and strategies might be much smarter way to go if prescribed by an acoustician who actually knows what the hell he is doing. But the "fancy" techniques won't work if applied incorrectly by an amateur or "fake expert". On the other hand, all the walls treated floor-to-ceiling with 300 mm thick fluffy fiberglass, with porous breathable cloth facing, will "always work". Maybe something else would have worked better, but that much fluffy fiberglass will definitely make a rather well-behaved room, and even in those "full coverage" quantities the fluffy fiberglass is not a real expensive material.

That is if you like a flat-frequency response "dead" room. I like flat dead rooms. Some people want "lively" reflective rooms. If you want an excellent-sounding "lively" room there are many respected design theories (live end/dead end etc) and you would either study and experiment a lot, or unless the topic is interesting enough to deserve months/years study, just hire a reputable acoustician to build you a room according to whatever theory sounds like a good idea at the time.
jcjr is offline   Reply With Quote
Old 01-17-2018, 04:04 PM   #24
jcjr
Human being with feelings
 
Join Date: Dec 2015
Location: SE TN USA
Posts: 71
Default

Quote:
Originally Posted by Philbo King View Post
I even implemented a correction filter on my Monitor FX in Reaper using ReaEQ. It required that I come up with the math to convert Q to Octaves, which I built into an Excel spreadsheet for future use. The math is fairly non-trivial, so I didn't want to have to reinvent it again someday...

I considered using the phase-linear option in ReaFIR to do the EQ, but it was much simpler to enter it into ReaEQ... I can't say it sounds better or worse; I'll have to switch it in and out while mixing for a while to see if it is beneficial. I suspect it will be.
I've enjoyed ReaEQ for a couple of years for amateur mastering old songs. Also practiced with ReaFIR for awhile but finally found it easier for me to get "predictable results" or easier to achieve what I wanted with ReaEQ.

It may be a rather common use of ReaEQ, but the concept fairly "new to me" to stack and overlap peaking filter bands, rather than use a few bands "fairly separate from each other except overlapping band boundaries" as one would use a multi-band hardware parametric EQ or graphic EQ.

If stacking and overlapping numerous bands one would be cautious of the cumulative phase response maybe getting so extreme that it somehow affects the quality of the music. But sometimes the phase plot can get very weird indeed without (to my ear) adversely affecting the music.

For instance (amateur mastering example)-- If bass below 100 Hz needs a bit of overall boost but near 80 Hz too strong and near 44 Hz unusually weak (though 44 Hz signal does exist in the music and therefore can be boosted)-- Using the first peaking filter, raise the entire bass level a bit with a 1 to 2 octave wide slight boost centered perhaps 63 Hz. Then bring up the low bass a little more with a second narrower peaking filter at about 40 or 44 Hz. Then control the too-strong signal around 80 Hz (made even worse with the first two mild boosts) with a third peaking filter fairly narrow cut around 80 Hz.

I first expected such "overkill" of overlapping peaking filters would do more damage than good, but used carefully conservatively seems easier to get good results than trying to keep each EQ band "fairly non-overlapping except at the boundaries". I used similar methods straightening out errant mids or highs.

Its been awhile since looking at REW auto-EQ output, but think I recall that REW will similarly sometimes prescribe overlapping EQ bands.
jcjr is offline   Reply With Quote
Old 01-17-2018, 04:10 PM   #25
jcjr
Human being with feelings
 
Join Date: Dec 2015
Location: SE TN USA
Posts: 71
Default

There may be a little guesswork or "cut to fit" in setting a DSP room correction filter constructed out of numerous series peaking filters-- A process of setting "best first guesses" then re-test with the filter in-place, and then further refine the EQ settings, possibly adjusting center frequencies, bandwidths and amount of boost/cut.

Reiterative refine and re-test until the test results seem as good as its gonna get. It is also a compromise because sometimes the "best test results" come from such overkill EQ audio mangling that a less-processed result which tests worse, might happen to sound better to the ear.

One source of the "guesswork" could be the wide variety of "quite reasonable" ways to design a peaking filter. Non-oversampled IIR filters work fine all the way to Nyquist, but in the top couple of octaves the response shape deviates from an "idealized analog filter". Some designers try to make the high-frequency amplitude shape "more similar to analog" by sacrificing a high-frequency phase response "less similar to analog". Some designers just oversample the EQ. Some designers just leave well enough alone and let the digital IIR filter work the way it naturally wants to work at high frequencies.

There are also many valid ways to design a DSP peaking filter, defining what the filter bandwidth really means. For instance one way would define the peaking filter bandwidth between the two frequencies where the peaking filter boost or cut is half of the maximum. Therefore if you ask the filter to have a 1 octave width, and set the filter to +15 dB max center boost, then the filter's +7.5 dB points will be 1 octave apart. But if the filter is set to +1 dB boost, there is 1 octave between the +0.5 dB frequencies. And if the filter is set to -5 dB cut, there is 1 octave between the -2.5 dB frequencies. The "actual Q" of the underlying filter is automatically adjusted to make the peaking filter behave in that fashion, so the "bandwidth by that definition" stays the same but the Q down inside the filter is adjusted according to the peaking filter boost/cut in order to make it behave thataway.

And there are alternate perfectly reasonable ways to define a peaking filter's bandwidth, so you could have different EQ plugins, each one "quite correct" but each plugin requiring different settings in order to achieve the same EQ results.
jcjr is offline   Reply With Quote
Old 01-17-2018, 05:48 PM   #26
jcjr
Human being with feelings
 
Join Date: Dec 2015
Location: SE TN USA
Posts: 71
Default

A peaking filter doesn't follow the same rules as a simple bandpass filter but I have used some simple analog bandpass filter definitions for "first wild guess" estimation of bandwidth or Q, try to get the peaking filter somewhere in the ballpark for further refinement. Maybe there are far superior ways to do it.

Second-order bandpass filter definitions gleaned from an old analog book, "Active Filter Cookbook" by Don Lancaster.

FC: The center frequency, loudest part of the bandpass response.
FU: The frequency higher than FC where the amplitude is -3 dB below max (FC) gain.
FL: The frequency lower than FC where the amplitude is -3 dB below max (FC) gain.

If we know FU and FL then FC is the geometric mean of FU and FL: FC = sqrt(FU * FL)

If we know FC and FL, then FU = FC * (FC / FL)
If we know FC and FU, then FL = FC / (FU / FC)

Given some multiplier M: FL = FC / M and FU = FC * M

Bandwidth in Hz = FU - FL

Normalized bandwidth (setting so that the center frequency is always 1.0 Hz): NormBW = (FU - FL) / FC

Normalized bandwidth is also the second-order bandpass Damping figure. Q is the inverse of Damping.

NormBW = Damping = 1 / Q
_______________

For example if we have a room plot with a "somewhat-symmetrical peak" FL = 200 Hz and FU = 360 Hz-- We can estimate the filter center frequency at sqrt(200 * 360) = 268 Hz. Because room responses are complex, the actual peak frequency in the room plot might be somewhere else. But if trying to adjust the peak according to its width, we pick the center as the geometric mean of the lower and upper bounds. The response won't be "perfect" before the eq and won't be "perfect" afterward either. Just we hope somewhat improved.

If our equalizer wants a Q setting, we can first-guess Q = 268 / (360 - 200) = 1.68

If our equalizer wants octaves, we might first-guess the ratio between FU and FL. A ratio of 2 would be 1 octave. A ratio of 4 would be two octaves. The actual ratio in this case is 360 / 200 = 1.8. Which can be converted to octaves using log2(): Octaves = log2(FU / FL) = log2 (360 / 200) = 0.85 Octaves

The first-guess probably needs further refinement after being entered into the peaking filter, because the peaking filter doesn't follow quite the same rules as a simple bandpass.
_________________

If we know FC and Q but do not know FU and FL, and we need Octaves, the following should work. It is slightly involved implying maybe there is a simpler solution I'm too dumb to see. Or maybe it is even incorrect. My math was never very good.

Recall Normalized Bandwidth could be written (some multiplier M): ((FC * M) - (FC / M)) / FC

Simplifying: NormBW = 1 / Q = M - (1 / M)

A little algebra: M = 0.5 * (Q^-1 + (Q^-2 + 4)^0.5)

Octave = log2(M / (1 / M)) = log2(M / M^-1) = log2(M^2)

So expressed as a single calculator line--
Octave = log2((0.5 * (Q^-1 + (Q^-2 + 4)^0.5))^2)

Checking against the previous example Q of 1.68, I get Octave = 0.85, the same answer calced in another fashion in the first example.
____________________

If we know octave and want a rough initial guess at Q, maybe this would work as good as any, or perhaps there is a better more direct way--

The FU/FL ratio = 2 ^ Octave

M = (2 ^ Octave)^0.5

Q = (M - M^-1)^-1
jcjr is offline   Reply With Quote
Old 01-17-2018, 11:07 PM   #27
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,766
Default

"Nonlinar approximation" (curve fitting) is a rather complex, but well known numerical algorithm (i.e. software program). (I once crafted such a software from scratch.)

Here a function

y = F(x) = sum ( an * fn(bn, cn, dn, ...)(x) )

is defined, and we search for the set of parameters an, bn, ... that provided the best fitting of a given curve

(xm/ym) <-> (xm/F(xm).

The software is best done as a "two step" iterative algorithm:

- use a "reasonable" initial guess for bn, cn, dn, ...
- start repeat
- exactly calculate all an (a linear curve fitting is a straight forward algorithm)
- use (e.g.) a multi-linear approximation of Fn to find a better guess for all bn, cn, dn ....
- repeat until the fit provides a predefined small deviation.


Here, with an n band PEQ, "an" obviously is the gain of the band, Fn is the Filter curve of each band, defined by the frequency "bn" and the bandwidth "cn".

The curve to fit can be the response of the "room" (e.g. got by a measurment using pink noise (or any signal containing as many frequencies as possible) ).

With this, theoretically a single measuring step should provide "the optimum" PEQ parameters, and should reproduce rather similar values with any appropriately complex test signal, and with any "reasonable" initial guess for the an and bn values.

But it is know that any nonlinear curve fitting algorithm can go rather wild, e.g. depending on the initial parameter guesses.

-Michael
__________________
www.boa-sorte.de

Last edited by mschnell; 01-17-2018 at 11:15 PM.
mschnell is offline   Reply With Quote
Old 01-18-2018, 10:18 AM   #28
jcjr
Human being with feelings
 
Join Date: Dec 2015
Location: SE TN USA
Posts: 71
Default

Thanks Michael. Maybe I'm a luddite but generally prefer to manually adjust my own EQ settings, buit it is more a matter of taste. I'm ignorant of acoustics but think that room treatment, speaker and other studio furniture placement, crossover and speaker gain setting if relevant, would all be optimized "as good as one can afford to do it" before starting on DSP correction. The DSP correction being the last-ditch-chance to POSSIBLY wring a little more improvement out of the room after everything else has been done as good as one has time money and patience to do it.

There are some very sophisticated correction tools which I've read about but don't know much about and have not tried. Was just mentioning that one might get different responses from equally well-made equalizers because the filters are defined or implemented correctly but differently.

In your iterative curve fitting, am guessing that your "interative match test" would probably want to go thru the exact same EQ algorithm that you use to apply the final correction. If your DNA solver has a different definition of filter bandwidth or shape than the plugin used to apply the correction, then the solver's output would only be a "best first guess" for setting the plugin used to apply the correction.

I'm so ignorant of the more sophisticated methods of DSP room correction, but rooms can have very complex behavior. It is perhaps "most predictable" to identify the most-significant peaks in room response and attenuate the peaks. The peaks typically some kind of energy buildup NEAR THE LISTENING POSITION caused by one or multiple overlapping reinforcements or resonances-- So that if you attenuate the amount of energy at those frequencies then the peaks might respond about as you expect. For instance if it looks like you can flatten a peak with about a -3 dB cut, then maybe your initial -3 dB cut won't really cut the room peak by the expected amount, but the cut will at least be "in the ballpark" of what was expected, and can be further refined.

On the other hand it is less predictable to electronically boost room acoustic nulls. Especially the deep nulls. Nulls can have various cause. Sometimes a "non-resonant" destructive interference where 2 or more reflections cause a null, but there is not "resonant recycling of the energy" over a long decay time. Other nulls do build-up significant acoustic energy stored in the room, where maybe a certain band of bass is completely lacking at the listening position, but it is "stored up" and incredibly loud in some corner of the room where you can't hear it.

Just saying, a -20 dB bass null, you would need a very powerful speaker to boost the bass +20 dB without distortion or speaker damage. And even worse, the null whittles away your 20 dB correction boost with the same mechanism which causes the -20 dB null in the first place. So you would have to pour "arena concert level" amplitude into a deep null to fix it with EQ, and even that isn't satisfactory because the room is probably storing up most of that extra energy somewhere else in the room, messing things up when the bass notes stop coming from the speaker but the room doesn't stop resonating to the note.

In the case of "slight nulls" you can sometimes help with modest boosts. If you have a -3 dB partial null then maybe you can boost enough to overcome the null without making things sound worse not better. But it will take more than a +3 dB boost, because you are working against the acoustic mechanism of the null. The null will "eat up" part of your +3 dB boost just like it ate up half of the room power at the null frequency, so you will have to pump enough extra energy into the partial null to reach +3 dB correction AFTER the null has taken its tax from the extra energy you added with your boost.

Anyway, I just enjoy manually setting the EQ and crossover and such. But it is a set-measure-adjust-measure manual loop rather than an automated loop, with the actual correction EQ and the actual room in the manual successive-approximation loop. Because the "first guess" that a certain band needs X dB cut/boost at Y frequency, the room responds more complex and so a second or third refined guess can get closer to the best solution.

My dbx driverack has third-octave graphic EQ pink noise auto-eq function that works pretty good, though lately I'd rather set it manually. You plug in the measurement mic, engage the auto-eq, and it plays pink noise thru the speakers, and you can hear the pink noise tone change while the auto-eq keeps experimenting with the third-octave graphic EQ settings. When the auto-eq algorithm decides it has adjusted as good as its gonna get, the noise turns off and the task is done.

While listening to the driverack pink noise auto-eq working, hearing the changes in noise timbre as it hunts for the "best" setting-- Different bands will momentarily get a lot louder than needed or a lot quieter than needed as it is seeking the solution. Maybe that is a partially-random search for the most optimized setting, the algorithm trying to decide if the result is flatter with 63 Hz band boosted and both its neighbors cut, versus other combinations.

Or maybe the search algorithm is smarter than that, and the "sudden jumps and drops" of various bands are "testing the stiffness of the room response" at different frequencies? Maybe part of the algorithm tries to determine how much each band of the room can practically be changed via EQ, to set limits on its iterative matching? Maybe if the algorithm decides that 80 Hz is a "lost cause" in the room, then it is smart enough to leave 80 Hz alone rather than stupidly boost it +12 dB and risk the speaker without gaining any improvement?
jcjr is offline   Reply With Quote
Old 01-18-2018, 04:06 PM   #29
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,766
Default

I don't claim, that the "algorithmic curve fitting from a response measurement" method will yield any usable results.

I tried to do some manual EQ tweaking in a similar way and the result was horrible.

I just wanted to explain my thoughts about a possible software implementation.

So I agree with the previous suggestions to primarily get the room acoustics in a decent state and the maybe impose an adapted EQ.

-Michael
__________________
www.boa-sorte.de

Last edited by mschnell; 01-19-2018 at 11:48 AM.
mschnell is offline   Reply With Quote
Old 01-19-2018, 09:12 AM   #30
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 263
Default

Quote:
Originally Posted by jcjr View Post
If stacking and overlapping numerous bands one would be cautious of the cumulative phase response maybe getting so extreme that it somehow affects the quality of the music. But sometimes the phase plot can get very weird indeed without (to my ear) adversely affecting the music.
An interesting property of minimum-phase filtering (which is what everything uses, except for "linear" EQs like FIR, or explicit phase-delay filters) is that the phase response is completely linked to the amplitude.

That is: it doesn't matter if you stack filters, overlap them, etc. - if the resulting amplitude response is the same, the phase is also the same. This is why if you add a boost/cut pair that cancel each other out in ReaEQ, the phase is also flat. In a very hand-wavey sense, strong phase-shifts happen when you have sharp cutoffs in amplitude.

There's even a way to take an amplitude response, and calculate the phases from it -
at which point you can even generate the minimum-phase impulse response (FIR kernel). I implemented this a few months ago for a (now abandoned) effect - I'm happy to dig this up if it's useful for anything. Now I think about it, perhaps I could use this to export a minimum-phase "correction kernel" from Spectrum Matcher...

(This minimum-phase-kernel is one method for constructing reverb impulses from sine sweeps - you assume that real impulse response is minimum-phase, which is somewhat reasonable, and reconstruct it from the magnitude response alone. The long tail corresponds to extremely fine-grained details in the amplitude response which are linked to extreme shifts in phase.)

Quote:
Originally Posted by mschnell View Post
"Nonlinar approximation" (curve fitting) is a rather complex, but well known numerical algorithm (i.e. software program). (I once crafted such a software from scratch.)
Learning EQs like this is a hell of a problem, yeah. Finding a solution is definitely possible, but the challenge is getting it consistent in the face of small changes.

For my Spectrum Matcher, you give it a "model" to learn from, and then play it an input, and it compares the spectra. (The model doesn't have to be white or pink noise - I've mostly used it to timbre-match vocal takes recorded months and miles apart. Veto explained how to use it better than I did.)

It can also try to correct the difference using EQ. I originally had wanted to generate this EQ using an optimisation method, a bit like what you describe (mine was just naive hill-walking).

I still would like to do this at some point, but the lazier option was essentially to use 30 shelf filters (or however many bands you specify for the analysis), which is slower than a well-chosen 6-band EQ would be.

Last edited by geraintluff; 01-19-2018 at 09:25 AM.
geraintluff is offline   Reply With Quote
Old 01-19-2018, 11:56 AM   #31
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,766
Default

Quote:
Originally Posted by geraintluff View Post
strong phase-shifts happen when you have sharp cutoffs in amplitude.
That is why you don't want to use a GEQ, even though the setting of the gains would be much easier to manage manually or by software. With a GEQ, the amplitude curve for a wide belly is not as smooth as it could be, but features a kind of "steps" and accordingly the phase function is a lot wilder than with a similar amplitude correction by a PEQ.

Quote:
Originally Posted by geraintluff View Post
For my Spectrum Matcher, ...
Interesting stuff !!

-Michael
__________________
www.boa-sorte.de

Last edited by mschnell; 01-19-2018 at 12:22 PM.
mschnell is offline   Reply With Quote
Old 01-23-2018, 06:18 AM   #32
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,766
Default

Obviously there are three basic ways to do an automatic EQ in Software as a (JSFX) plugin:

- a GEQ (Multiple band filters with fixed frequencies and Qs)

- a FIR Filter (using FFT)

- a parametric EQ

Each of these provides certain pros and cons.

IMHO, a PEQ would be the most flexible and (with optimal parameters) best sounding and no latency product, but finding the "best" parameters is extremely challenging.

Supposedly a GEQ will provide the easiest way to go.

Hence, as a proof of concept project, I might want to do an automatic GEQ by JSFX.

See some more threads in this forum: "GEQ in JSFX" -> https://forum.cockos.com/showthread.php?t=202333 and "Remote controlling a GEQ VST by a JSFX" -> https://forum.cockos.com/showthread....40#post1944240, and also -> https://forum.cockos.com/showthread.php?t=202278 .

-Michael
__________________
www.boa-sorte.de

Last edited by mschnell; 01-23-2018 at 06:32 AM.
mschnell is offline   Reply With Quote
Old 01-23-2018, 06:48 AM   #33
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 263
Default "Well, actually..."

Quote:
Originally Posted by mschnell View Post
IMHO, a PEQ would be the most flexible and (with optimal parameters) best sounding and no latency product
A typical FIR filter only has latency because it's convolving with a linear-phase kernel. A minimum-phase kernel would add only as much latency as an IIR (PEQ/GEQ). You can taper/truncate to make it shorter, and you should be able to apply it using one FFT per block.

BTW, Spectrum Matcher's current implementation sounds extremely similar to your GEQ option, did you check it out? It plots the phase, and the Q is adjustable so it can be smooth if you want.

Last edited by geraintluff; 01-23-2018 at 07:56 AM.
geraintluff is offline   Reply With Quote
Old 01-23-2018, 09:21 AM   #34
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,766
Default

Quote:
Originally Posted by geraintluff View Post
BTW, Spectrum Matcher's current implementation sounds extremely similar to your GEQ option, did you check it out? It plots the phase, and the Q is adjustable so it can be smooth if you want.
I'll take a look.
"Spectrum Matcher" sounds like FFT.
While I already did do FFT in JSFX (works like charm) I would like to avoid the complexity for a proof of concept implementation.

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 01-23-2018, 03:37 PM   #35
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 263
Default

Quote:
Originally Posted by mschnell View Post
"Spectrum Matcher" sounds like FFT.
It's not - neither in its analysis, nor in its correction/EQ. It splits the audio into 30 bands (using 30 IIR/biquad filters), measures the cumulative energy for each band, and then (if correction is enabled) uses a 30-band GEQ-like setup to adjust it.

I wouldn't say this is simpler - I think using an FFT would be more straightforward, and rather more efficient. However, I wanted it to be able to react to peaks (instead of just averages), and this was the way I could see to have fine-grained time resolution in the high bands without losing frequency resolution in the low ones.
geraintluff is offline   Reply With Quote
Old 01-23-2018, 10:31 PM   #36
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,766
Default

So might indeed be exactly what I have in mind, and maybe very similar to "EQuivocate", that Tod suggested here -> https://forum.cockos.com/showthread.php?t=202278 .

Has it beed tested for Room auto EQing ?

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 01-24-2018, 01:16 AM   #37
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 263
Default

Quote:
Originally Posted by mschnell View Post
So might indeed be exactly what I have in mind, and maybe very similar to "EQuivocate", that Tod suggested here -> https://forum.cockos.com/showthread.php?t=202278 .

Has it beed tested for Room auto EQing ?

-Michael
Yeah, sounds similar to EQuivocate, although that seems to be FIR / linear phase according to the description. There also might be some difference in how it calculates the levels - Spectrum Matcher pays more attention to peaks (although for sustained inputs like pink noise there shouldn't be a difference), but I don't know what EQuivocate does.

I haven't used it for room EQing - it was written for a different purpose, although I am currently setting up a studio and might give it a go when things are in place.
geraintluff is offline   Reply With Quote
Old 01-24-2018, 07:08 AM   #38
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 5,766
Default

Geraint, Thanks for your contribution !

Do you claim the filters used in Spectrum Matcher are appropriate for doing an EQ that will not do as little harm to the signal as possible ?

I in fact pictured a plugin with side-chain input for the metering mic so that the measuring / curve fitting can be done "online", instead of doing a "learn" phase.

I suppose I could add such a mode (of course needing (at least) a second channel for the filter bank). I'm not sure if there would be be a huge benefit for such a mode.

What do you think ?

Is there any description on what exactly Spectrum Matcher does.
What exactly do the different curves show ?
What exactly happens when hitting the buttons provided ?
Where are the values (learned stuff) and results (final EQ gains) stored ?

If I finally really understand, I could
- add a MarkDown "about" description to the source code to be used by ReaPack
- maybe do an "online mode" extension

-Michael
__________________
www.boa-sorte.de

Last edited by mschnell; 01-24-2018 at 07:33 AM.
mschnell is offline   Reply With Quote
Old 01-24-2018, 07:42 AM   #39
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 263
Default

Quote:
Originally Posted by mschnell View Post
Do you claim the filters used in Spectrum Matcher are appropriate for doing an EQ that will do as little harm to the signal as possible ?
Assuming you're talking about phase response: yes, I'd say so. I'd be as bold as to say that using a stack of high-shelf filters produces a smoother curve and therefore less phase disruption (compared to the peak-filters discussed in your other GEQ threads, which can have noticeable ripples).

Quote:
Originally Posted by mschnell View Post
I in fact pictured a plugin with side-chain input for the metering mic so that the measuring / curve fitting can be done "online", instead of doing a "learn" phase
I can see how that would work, yeah. To explain the current design:

I was expecting the reference sound to not change a lot - be it pink noise, a sine sweep, or a snare that had a great punchy timbre. You analyse this once, store it as a reference (using the Learn window), and save it as a preset, then use it for a bunch of different inputs.

Having it as a two-stage analysis where the result is saved offline has two benefits: (1) you don't have to re-do the analysis on the reference sound the whole time, and (2) you don't have to keep track of the original sound - in the example of my nice punchy snare-sound, I don't have to re-import that snare sound into every project, because all the data I want is in a preset.

Quote:
Originally Posted by mschnell View Post
I suppose I could add such a mode (of course needing (at least) a second channel for the filter bank). I'm not sure if there would be be a huge benefit for such a mode.
At the moment the reference sound is analysed using exactly the same code as the input sound. It could be done separately, which would allow it to either work the way it currently does, or as you propose. It's not a trivial change (and would use twice the CPU when running), but is possible.

If you're testing your room with pink noise each time, how much more convenient would it actually be to do the multi-channel routing to give it simultaneous reference/input, as opposed to learning pink noise once and saving it as a preset for all future uses?

Quote:
Originally Posted by mschnell View Post
Is there any description on what exactly Spectrum Matcher does. (What exactly do the different curves show, what exactly happens when hitting the buttons provided ? Where are the values (learned stuff) and results (final EQ gains) stored ?
You got me there - my documentation is a bit light. I find it hard to explain using words and pictures, so I keep hoping to make a couple of video walkthroughs which I think would explain it better.

The only description is on the general project page.

Briefly: the bottom pane is the analysis - green for current spectrum, yellow for the long-term trend (biased towards peaks, not a simple average - can explain more if it's useful). Blue is the reference spectrum - if the reference/input are the same, the yellow and the blue would be identical.

The top pane is the correction - the red lines are the difference between the blue and the yellow, i.e. the correction that should be applied. Hovering with your mouse should give you numbers. If you hit "Correct", you see a white curve (actual correction EQ), and a dotted brown curve (phase, same as ReaEQ display). "Freeze" stops the correction curve from updating, and displays the "frozen" values in blue.

If you click "Learn" in the corner, you get taken to a different view, where you can change analysis parameters, reset the analysis, and save the currently-analysed input as the new reference.

The reference spectrum, and any frozen correction values are stored in the preset / project file. If you load a different preset, it should update the reference curve but leave the input analysis untouched.

Does that help at all?

Last edited by geraintluff; 01-24-2018 at 07:52 AM.
geraintluff is offline   Reply With Quote
Old 01-24-2018, 10:26 AM   #40
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 11,879
Default

Hi geraintluff, I just checked out your Spectrum Matcher and am surprised. I used stereo tracks for both the destination and source tracks and I'm assuming stereo is okay?

I've got the Spectrum Matcher on it's own bus track, so I also assume I can just save it as a preset and then load it onto the destination track?

I see there is a bandwidth control and it's set to 1.0, would that be 1 octave?

"Safety Limit", is that just an output control, I noticed it added quite a bit of gain to the destination track so I assume this control is more for matching.

So there's 30 bands, that's great, is the logarithmic scale you have totally accurate with the bands you show?

I'm the guy who Michael refereed to as having used EQuivocate in the Montitor FX. A couple of days ago I was using EQuivocate to match one acoustic guitar to another and it dawned on me, using the flat pink noise as a source and my acoustic room mic as a destination, it should tend to flatten it out. I kind of liked it, but in all honesty, I've got it bypassed, especially when I'm mixing, and only turn it on occasionally for a check-see.

I'm in the middle of mixing an album for one of my clients and I'm excited about using this.

Thank you much geraintluff.
__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums -|- Elk Video Productions -|- Tod's Music
Tod is online now   Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT -7. The time now is 04:17 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.