Arithmetic with impulse response

Discussion in 'Official REW (Room EQ Wizard) Support Forum' started by keantoken, Jan 12, 2019.

  1. keantoken

    keantoken Member
    Thread Starter

    Joined:
    May 31, 2018
    Messages:
    17
    Likes Received:
    0
    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.
     

    Attached Files:

  2. keantoken

    keantoken Member
    Thread Starter

    Joined:
    May 31, 2018
    Messages:
    17
    Likes Received:
    0
    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.
     

    Attached Files:

  3. John Mulcahy

    John Mulcahy REW Author

    Joined:
    Apr 3, 2017
    Messages:
    1,129
    Likes Received:
    182
    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.
     
  4. keantoken

    keantoken Member
    Thread Starter

    Joined:
    May 31, 2018
    Messages:
    17
    Likes Received:
    0
    Here is the file.
     

    Attached Files:

  5. John Mulcahy

    John Mulcahy REW Author

    Joined:
    Apr 3, 2017
    Messages:
    1,129
    Likes Received:
    182
    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.
     
  6. keantoken

    keantoken Member
    Thread Starter

    Joined:
    May 31, 2018
    Messages:
    17
    Likes Received:
    0
    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)
     
  7. John Mulcahy

    John Mulcahy REW Author

    Joined:
    Apr 3, 2017
    Messages:
    1,129
    Likes Received:
    182
    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.
     
  8. keantoken

    keantoken Member
    Thread Starter

    Joined:
    May 31, 2018
    Messages:
    17
    Likes Received:
    0
    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.
     
    #8 keantoken, Jan 12, 2019
    Last edited: Jan 12, 2019
  9. John Mulcahy

    John Mulcahy REW Author

    Joined:
    Apr 3, 2017
    Messages:
    1,129
    Likes Received:
    182
    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.
     
  10. keantoken

    keantoken Member
    Thread Starter

    Joined:
    May 31, 2018
    Messages:
    17
    Likes Received:
    0
  11. John Mulcahy

    John Mulcahy REW Author

    Joined:
    Apr 3, 2017
    Messages:
    1,129
    Likes Received:
    182
    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.
     
    bmx likes this.

Share This Page