Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Impulse Responses for Dummies

  1. #1

    Impulse Responses for Dummies


    I'm trying to understand the impulse responses in order to use them, but it doesn't come easy .

    All the impulse responses I've found are coming in a form of wav file (which sounds like a quick «phfshk»).
    The audio library filter takes an array of coefficients. The initial key question: how to get the coefficients from that wav file?

    Also, the way I understand the IR, it's a much more granular EQ. But then I've found an IR reverb wav file (which is quite large, by the way). I've seen a thread where @WMXZ was posting a link to the untested code which is supposed to do the thing. He was also asking for the wav files, I have this link:, it contains the files. I'm looking for the missing (missing in my head) pieces to connect these wav files with the actual sound. I've got Teensy 3.6 and Teensy 4.0. I suppose the second one should do a better job.

    Could somebody explain the IRs in a more stupid/friendly terms than the Wikipedia does?

  2. #2
    Senior Member
    Join Date
    Jul 2014
    Let me try
    Assume you are in a cathedral, and you transmit a loud but very short impulse (ideally 1 sample), then what you hear is a lot of reverberation, that is a lot of echoes that come back from different walls and other features. All the echoes for your original pulse describe the impulse response of the cathedral. If the room is very large the echoes may come back over a long time (couple of seconds), so the recoded impulse response file may be very large. Impulse response is simply a file that contains all multipath (i.e. due to reflections) of the sound propagation media and may be determined not only within rooms, but also in towns (between houses, etc), in open landscape (e.g. echoes in Mountains), and in the ocean.
    The impulse function not only depends on the environment and its boundaries, but also on the locations of sender and receiver, which may be, and usually are different.

    Why need impulse response? knowing the impulse response of the sound propagation media let you to simulate what the receiver may hear.

    For this you convolve the transmitted sound with the impulse function between transmitter and receiver. This is typically a FIR method.

    I personally have only worked with FIR method, but thinking about it, it could be possible to use IIR or ARMA models to describe the impulse function. I have to think about it. The FIR method definitely leads to very large convolution methods, typically too large for MCUs (e.g. Teensy) a 10 s impulse response file is 440kB.

  3. #3
    Thanks! The theoretical part makes more sense to me now!

    Now I need to figure out how to load that wav file into the filter...

    Sounds like Teensy 4.0 having more memory would help.
    Apart from the files from my link above (which are quite large), I have a Celestion speaker IR and it's only 66194 bytes (44.1 kHz/500ms). I also have a Taylor guitar IR file and it's less than 3000 bytes. So I suppose there is enough memory to use those even in Teensy 3.6.

  4. #4
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Central Europe
    You could also have a look here, Brian has done something useful for the Teensy 3.6:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts