I am implementation a convolution reverb method for audios array in Python using scipy.signal.convolve. I choose the fft mode, which essentially a product of the rfft of the two signals then ifft back.

What I am not sure is how to perform the convolution without changing the amplitude of the original signal. My audio sample is normalized to -1. to 1.0. And the impulse response (ir) is not normalized but has a peak value near 1.0.

A direct convolve(signal, ir) will result a new signal that has the amplitude of over -6.0 to 6.0. This of course results in a massive clipping during playback. Of course I can reduce the amplitude of the ir to bring down the level. However, I don't know what is the mathematical relationship here in order to achieve the same amplitude.

Thank you in advance for your advice.

  • $\begingroup$ (very, very, very many questions when you search for [fft] normalization or [fft] scaling on this site. I just picked the first one.) $\endgroup$ Jun 30 '20 at 18:54
  • $\begingroup$ IR normalized in time domain doesn't ensure the same energy after convolution. In fact, it's hardly a case. $\endgroup$
    – jojek
    Jun 30 '20 at 19:02
  • $\begingroup$ @jojek, the IR is not normalized. It is just happen the room ir I downloaded has a peak value near 1. $\endgroup$
    – J_yang
    Jun 30 '20 at 19:04
  • $\begingroup$ Treat IR as a filter where 0 dB is anechoic environment. Then, assuming that your original recordings have reference SPL levels, you have the right result. Otherwise, your best choice is to guess how loud would be that signal in this acoustic space. Anyway, depending on your application, normalizing the output might be enough. $\endgroup$
    – jojek
    Jun 30 '20 at 19:12
  • $\begingroup$ @jojek As this is intended as a general method, I cannot anticipate what the reference SPL level might be. So is it ok to just take the max(abs(original_signal) then multiply by the normalized(result) ? $\endgroup$
    – J_yang
    Jun 30 '20 at 19:28

Browse other questions tagged or ask your own question.