Hi, list,
I put together a few abstractions I wanted to share. These are just
basic operations for complex arithmetic (I left out conjugate,
addition, and subtraction, since I thought they were too basic).
cmult~
-- multiplies two complex signals; inlets are ordered from left to
right: sig1-real, sig1-imaginary, sig2-real, sig2-imaginary (this is
consistent for all the rest too)
conj_mult~
-- multiplies sig1 by the complex conjugate of sig2
cnorm~
-- computes sqrt(real^2+imag^2), Would this be more efficient using expr?
cnormsq~
-- computes real^2+imag^2. Same question as cnorm~
cdiv~
-- divides sig1 by sig2. Wherever sig2 is zero, the result is zero
rather than undefined. It is still not advised to use cdiv~ unless
you have a signal that you know has all of its frequencies
cdiv_thresh~
-- accepts a threshold argument, and divides sig1 by sig2 whenever the
complex norm squared of sig2 is greater than the threshold. Returns
zero otherwise.
Later,
Chuck