Showing posts with label current projects. Show all posts
Showing posts with label current projects. Show all posts

Dynamic lin. phase EQ..some trials..

Linear phase EQ, part 1

First let's talk about EQ in general:

A few decades of running a sound-rental left me with a huge collection of superfluous copies of several brands of 31b. graphic EQ's
My personal favorite was such a KT DN360-->

 

What was (still is??) the purpose of a 31b. EQ inserted in the mains of our PA's?

Often people start jabbing about room EQ, tuning a system to a room or other semi scientific nonsense never leaving out to mention phase issues..

Once you grow to be a bit more aware about what you are doing you will realize that the use of such a graphic has (had) two purposes: 

1. you will use it in the creative process of doing your mix

2. you will try to correct problems you are experiencing with the current program material, the system (and the level)

The first one is not at debate here, let's investigate the second topic.

Loudspeaker systems in general are giant distortion generators (as compared to electronics). To elaborate on the cause or specify what distortion would lead way to far in this article, just bare with me and do understand that we are not talking about rattle and buzzes but the harmonic distortion as we sometimes also appreciate.

So with this in mind we could agree that the tweaking in the 2-4kHz region on your graphic might be triggered by the perceived distortion.. NOT the level..

If you remember: you dipped that frequency because it was 'ugly' not because it was 'loud' 

All analog EQ's and the mayor part of it's digital counterpart are min. phase. Meaning: yes, every EQ setting will affect the phase in that region in a way as is associated with it's magnitude response. Law of physics. Mostly no problem as in the thing you are correcting will be min. phase too.

The example above: using your EQ to dip those ugly distortion will affect phase in a way you don't want. Maybe that's the reason you keep tweaking in that region during a 'difficult' show.

 

Another reason why you keep changing the EQ settings in that region could be Fletcher + Munson.  Everybody knows these equal-loudness contours. The 'loudness' button on your '70's hifi amp is a direct consequence.

Look closely in the 2-4kHz region, not only your hearing is more sensitive in that aria (duh) : 

Also that sensitivity changes with level both in freq. and amount. Go from 80 to 100 dB to get an idea.


We do have tried different solutions for this. I never was happy with any dynamic EQ or desser function on any compressor of any of the shelf product.

Multiband compressor techniques are more something I could appreciate. True lin. phase that is! Here is an example of a way I did this using a free programming platform like BSS soundweb:

The signal is split in two pathways by using lin. phase FIR filters. Great care has been taken those filters when recombined don't affect the signal in any other way then adding in some delay. Both paths are compressed with different settings for attack, release, rating and so on. The compressor is made more 'sensitive' for the freq. of interest by using an EQ on the side chain (having its split feed before the FIR will give it some 'look ahead')

Still not quit happy as in you don't want a 'compressor' action, you want 'EQ' action.

So recently I started to experiment with my home brewn DSP boards. I took a metal horn driver combo, despite the felt damping it will have a ringing-bell associated distortion, certainly if it is not mounted firmly in a box. (still a really nice, controlled top end, though)



..soon more




Dynamic lin. phase EQ..some trials..

Linear phase EQ, part 2

 

The fun in coding your own DSP  is you quickly learn this Egg of Columbus, once you free your mind of thinking in the frequency domain (paraphrasing Moroder):

Everything you dream up about multiplying functions in the frequency domain like applying dynamic EQ can in fact be a rather simple arithmetic operation in the (discrete sampled) time domain.

So EQ can work out as follows: apply  the reverse filter to the signal stream on a sample per sample base. Subtract that stream also on a sample per sample base from the original stream. Take care you do your calculation on the correct sample!

Mind boggling to realize that every single sample is a representation of the music playing (right at that moment in time)


void doProces(q15_t* Lin, q15_t* Rin, q15_t* Lout, q15_t* Rout)
{

	  arm_sub_q15(Rin, Lin, Mono, n);
	  arm_q15_to_float(Mono, Monofl, n); /*adding balanced input to mono signal*/

	  arm_fir_f32(&SLF, Monofl, Low, n);
	  arm_fir_f32(&SHF, Monofl, High, n);
	  arm_fir_f32(&SEQ, Monofl, EQout, n); /*several FIR filters*/

/*RMS treshold + attack//release: blocksize=48, sample freq=48kHz --> 1 mSec per callback*/
	  arm_rms_f32(EQout, n, &rms);
	  if ((rms > 0.005) && (gainEQ<=0.8))
			  {
		  	  gainEQ = gainEQ+0.1;
			  }
	  if ((rms < 0.005) && (gainEQ>0))
	  	  	  {
		  	  gainEQ = gainEQ-0.005;
		  	  } 

/*scaling + actual EQ substraction*/
	  arm_scale_f32(EQout,gainEQ, EQout, n);
	  arm_sub_f32(High, EQout, Result, n);

/*revert float back to signed int. Lout = low, Rout= high */
	  arm_float_to_q15(Low, Lout, n);
	  arm_float_to_q15(Result, Rout, n);

}

That is a very crude bit of code to run the tests, basically I use some FIR filters to split the stream in 3 parts: high to feed the HF horn, low to feed the speaker. And a bell shaped EQ stream around 2200Hz to do the magic. Totally mocked up out of thin air (and some prior listening).

If you are really interested you can work out the attack//release timing and chosen gain slopes (also derived with some listening)

Now for the promising conclusions:

Yes. 

EQ-ing with dynamic linear phase EQ does help to create a loudspeaker that is way more versatile in that you can play it more dynamical (read louder) without being annoyed with that ripping horn distortion.

But.

Care should be taken in not to overdo the processing because it sounds like that; over processing. Also: as (live-) sound engineers we are totally used to how a all these elements like loudspeakers and/or microphones behave and in fact make use of the nonlinearities in the creative process.

 

More research is required..

Here is some food for thought: underlying is a measurement of the first 2 distortions of the HF horn under test.  We all know: 2nd harmonic is ok, 3th is bad, right? Now look where I choose (by ear) that EQ point: right at 2.2k where that 3th bumps up. (and 2nd goes down!)


Brown = SPL 1e harm.

Red = SPL 2e harm.

Yellow = SPL 3e harm.






Yet one more thing i would like to add: 

In my discussions with my great audio friend prof. dr. SA (you who you are) he once coined the phrase: equal-group-distortion. Naturally this is nothing, what he was saying is: it is the discontinuities and bumps in distortion patterns that make us jump into action..