On Nov 22, 2007 12:33 PM, Chuckk Hubbard badmuthahubbard@gmail.com wrote:
On Nov 22, 2007 1:34 AM, Mathieu Bouchard matju@artengine.ca wrote:
FFT can also be defined to only use real numbers, but the formulas are more complicated and the data layout is slightly irregular. Pd does not support those: it supports real-to-complex hybrids, just to avoid the
If I run two rfft's from the same signal, and multiply the imaginary outputs, do I get negative squares? I'll see...
[osc~]
|
[rfft~]
|
[*~]
|
[tabsend~ foo]
gives all positive results...
-Chuckk
On Thu, 22 Nov 2007, Chuckk Hubbard wrote:
If I run two rfft's from the same signal, and multiply the imaginary outputs, do I get negative squares? I'll see...
Pd does not support Complex numbers directly, and so any Complex signal is represented as two Real signals, in which you have to do all the Real operations yourself. It's worth making abstractions that do it for you, but you still have to connect twice the cables.
If Pd supported Complex numbers directly, there would be only one inlet and one outlet in plain [fft~], and you'd be able to use [*~] or perhaps a new [complex*~] to handle this multiplication with one inlet and one outlet.
A single-object way to make the complex product is:
[expr $v1*$v3-$v2*$v4;$v1*$v4+$v2*$v3]
And then you can see that only plugging the same value in both imaginary inputs ($v2 and $v4) gives a real output of minus the square, and an imaginary output of 0.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada