Hello all, My name is Siebe, I'm a MT-student from the Netherlands. I've just started experimenting with ChucK on Windows XP a bit and I really liked how quickly I was able to get things working. For my study I might be interested using ChucK for music and audio analysis. I'm currently trying to figure out how to 'manually' work with an FFT-class, by using .transform(float[]) instead of .upchuck(). But as far as I can see, the transform function for the FFT does nothing, in contradiction with the .transform(complex[]) function for the IFFT class, which seems to work fine. Here are two examples to clear up my point: The working IFFT code: http://pastebin.com/f9b762ad The not-working FFT code: http://pastebin.com/f7a8aae08 My question is, am I doing it right? Since both examples are pretty much the same, my guess is that both should work. Is this a bug in the i386 version? Or are users with another OS experience the same? Any help would be much appreciated. _________________________________________________________________ See all the ways you can stay connected to friends and family http://www.microsoft.com/windows/windowslive/default.aspx
My name is Siebe, I'm a MT-student from the Netherlands.
Hi, Siebe! Welcome on board, IMHO there is a great shortage of Dutch ChucKists so it's good to see you here. My question is, am I doing it right? Since both examples are pretty much the
same, my guess is that both should work.
Yes, well, they are indeed quite close when we look at the text in the files, but one of them deals with a array of floats while another deals with complex numbers. As FFT expects to deal with complex numbers it's not so surprising that the one using floats doesn't work. When you order french fries and I instead serve you fried potato slices you'll most likely be able to deal with that. Sadly bits of ChucK code aren't so flexible and will complain if they don't get what they expected. The one exception is when a float is expected and we "serve" a int, in that case ChucK will imagine the infinite series of zero's aftter the decimal dot is actually there (behind the scenes it actually casts them to a float). To ChucK a complex number is quite different from a float and ChucK is unwilling to "imagine" there is a second number there. In a way ChucK is quite picky (which can be anoying) and will force you to clearly speciffy what you mean (which can often be a good thing). I hope that clarifies? Yours, Kas.
participants (2)
-
Kassen
-
Siepie