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..