[PD] help with rfft~ (fwd)
Mathieu Bouchard
matju at artengine.ca
Wed Nov 30 01:44:55 CET 2005
mail lost? resending...
---------- Forwarded message ----------
Date: Tue, 29 Nov 2005 18:44:52 -0500 (EST)
From: Mathieu Bouchard <matju at artengine.ca>
To: thewade <pdman at aproximation.org>
Cc: Georg Holzmann <grhPD at gmx.at>, pd-list <pd-list at iem.kug.ac.at>
Subject: Re: [PD] help with rfft~
On Tue, 29 Nov 2005, thewade wrote:
> So which is better for convolution: polar or rectangular? Some processing must
> happen for convolution, because just multiplying the real outputs of two rfft~
> objects and the two complex outputs makes for very poor convolution. Do most
> convolution tools (PD or otherwise) convert to polar, multiply the
> frequencies, divide by niquist (I have no idea here), then use one of the the
> signal phases and convert back to rectangular for rifft~, or is there some
> oter way?
excuse me? multiplying the frequencies? i think you mean, for each
frequency, multiply the amplitudes together.
multiplication of two complexes x+y*i and x'+y'*i in cartesian
representation is:
x'' = x*x' - y*y'
y'' = x*y' + y*x'
Then with a polar representation:
x = r*cos(a)
y = r*sin(a)
It becomes as easy as:
a'' = a+a'
r'' = r*r'
Or even easier in complex log representation:
s+a*i = log(x+y*i)
s = log r
a'' = a+a'
s'' = s+s'
However, it only makes sense if you are going to make many multiplications
between polar forms. If not, then the sin,cos conversions and their
inverses r=sqrt(x*x+y*y),a=atan2(y,x) become more of a burden than a
shortcut.
____________________________________________________________________
Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
Freelance Digital Arts Engineer, Montréal QC Canada
More information about the Pd-list
mailing list