Arithmetic with impulse response

keantoken

New Member
Thread Starter
Joined
May 31, 2018
Messages
62
I have an impulse response measurement for my microphone and would like to use arithmetic to remove the microphone response from the measurement. The problem is, I can import it as an impulse response but REW treats it as a frequency response, therefore the arithmetic just results in a slanted frequency response. Thoughts?

IR image attached.
 

Attachments

  • Mic-IR.png
    Mic-IR.png
    14.3 KB · Views: 10

keantoken

New Member
Thread Starter
Joined
May 31, 2018
Messages
62
Well, I used Audacity to do a lowpass filter on the impulse response and loaded it into REW as audio data. That seems to work. However Audacity doesn't seem to do a good job with the lowpass filter, it seems to be a format resolution problem.

But now I have a new problem. REW lets me compensate for the mic response this way, but it hangs or gets real buggy when it tries to compute the waterfall plot or spectrogram of the compensated responses.

Here is the REW file.
 

Attachments

  • Stock vs Modified mic-step 2.mdat
    14.8 MB · Views: 3

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,314
Can you attach the original mic impulse response WAV? You might need to zip it.

I've fixed the bug that prevents waterfalls and spectrograms being generated for the results of trace arithmetic on imported audio data. In the meantime just import as an impulse response, the only significant difference is how the IR windows are set up - for audio data imports they span the whole data length, for impulse responses they use the default window settings around the peak of the imported data. Every impulse response has a corresponding frequency response.
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,314
That's a very short impulse response with quite a high noise floor, but REW is correctly showing you its frequency response. You need a better measurement of the mic.
 

keantoken

New Member
Thread Starter
Joined
May 31, 2018
Messages
62
But if I import it as an impulse, I should be able to divide another response by it's frequency response, not by it's impulse response. Otherwise I have to do a lowpass in some other program and then import it.

Yes the noise floor is high, it's the high frequencies I mainly care about, plus I'm just trying to see whether what I want is possible.

BTW, I'm still using REW in WINE because the Linux version can't play sound (although it can record)
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,314
Frequency response = FFT(impulse response)
Impulse response = invFFT(frequency response)

They are just two ways of representing the same information, one in the time domain, one in the frequency domain. If that is really the response of that mic, it is broken, but I'd guess the problem is more likely to be with its measurement than with the mic itself.
 

keantoken

New Member
Thread Starter
Joined
May 31, 2018
Messages
62
The mic is recording an impulse, not a step or a sweep. Frequency response should be overall flat within 1-10kHz if it is interpreted correctly as an impulse (as implied by "import impulse response"), not as a step or a sweep.

EDIT: Okay, maybe I see the light... What I recorded is a doublet, so the time derivative of an impulse. So REW is working right, and I must find a way to apply the lowpass filter without losing resolution.
 
Last edited:

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,314
Directly generating an acoustic impulse that is pure enough (i.e. with a sufficiently wide, flat spectrum) to measure a response is somewhere in the range beyond extremely difficult. Approximations to an impulse (balloon bursts, pistol shots, ...) are often used to measure decay times in large spaces, but for that purpose it doesn't matter that the spectrum of the pseudo impulse is far from flat, only that there is enough energy in each frequency band to measure its rate of decay. To characterise your microphone you would be better off renting or borrowing a reference microphone and characterising it against that.
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,314
That method used the theoretical spectrum of the pressure N-wave to derive the mic frequency response and averaged many attempts to remove noise, the captured response to the doublet cannot be used directly. If you can generate and import the theoretical response you could use trace arithmetic to extract the microphone response.
 
  • Like
Reactions: bmx
Top Bottom