# Convolution via FFT

Started by January 25, 2007
Hi guys,

I just added convolution via FFT to my audio program so I can convolve
two arbitrary signals (sounds), I have a few questions.

In Numerical Recipes in C it says to setup the response in wrap-around
order, in other tutorials I don't see that being done. Should I be doing
that ?

Also, if I convolve two signals both in the range [-1.0,1.0] is it
normal for the result to be outside that range ? Mine always are and I
have to normalize them, which is fine. But maybe I'm doing something
wrong and they shouldn't be out of range to begin with ?

Thank you,
Robert A.

"Robert A." <invalid@invalid.org> writes:

> Also, if I convolve two signals both in the range [-1.0,1.0] is it
> normal for the result to be outside that range ?

It is possible depending on what the signals are. Let f1(t) and f2(t)
be your two signals. Then f1(t) may in general undergo a maximum
magnitude change of \int_{-\infty}^{\infty} |f2(t)| dt.  The
worst-case "gain" occurs when f1(t) = sgn(f2(t)), where sgn(x) is the
sign of x - in other words, when f1(t) has maximum magnitude and sign
of f2(t).
--
%  Randy Yates                  % "Though you ride on the wheels of tomorrow,
%% Fuquay-Varina, NC            %  you still wander the fields of your
%%% 919-577-9882                %  sorrow."
%%%% <yates@ieee.org>           % '21st Century Man', *Time*, ELO