fft without fftin~ question.

Sep 15, 2006 at 11:18am

fft without fftin~ question.

I have some pfft patches which do not have a fftin~, they play a buffer~
and pass the result to fftout~.
Now I want to use some processes which I would normaly syncronize with
the right outlet of fftin~. Is there a special vector sample counter
available? or should I just use fftin~ square without connecting the two
first outlets.
My concern is processing power. A fft which I don’t need should just not
run…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#27643
Sep 15, 2006 at 11:55am

count~ will be fine if you get it to start by default and set it to count between 0 and (fftsize / 2) – 1 (note count never reaches limit so to do this we set the limit to fftsize / 2). Probably worth turning autoreset on a well just in case (see help file), so your object for a 1024 point FFT would look like:

[count~ 0 512 1 1]

I have this solution in a pfft~ that needs to count samples in relation to the fft without an fftin~ and it works perfectly.

Regards

Alex

#83790
Sep 15, 2006 at 12:02pm

BTW – you wouldn’t want [fftin~ square] anyway as this still performs the fft which is the expensive bit, just doesn’t apply a windowing function (although it may multiply with a window where all values are 1 in which case you don’t save anything). You would want [fftin~ nofft] which will save you the cpu. This method is guaranteed to work and may be about the same cpu cost as count~ so there’s not probably that much in it. You may feel count~ to be slightly more elegant, but then you might not………

All the best,

Alex

#83791
Sep 15, 2006 at 5:31pm

#83792
Sep 18, 2006 at 8:28am

Alex Harker wrote:
> BTW – you wouldn’t want [fftin~ square] anyway as this still performs
> the fft which is the expensive bit, just doesn’t apply a windowing
> function (although it may multiply with a window where all values are
> 1 in which case you don’t save anything). You would want [fftin~
> nofft] which will save you the cpu. This method is guaranteed to work
> and may be about the same cpu cost as count~ so there’s not probably
> that much in it. You may feel count~ to be slightly more elegant, but
> then you might not………

Thanks for the detailed info~, I just wasn’t sure how thinks get
syncronized sample accurate to the beginning of a signal vector if the
object would be triggered by a scheduler event like bang. Inmost cases
this wouldn’t matter, but with a pfft~ its crucial.
As I am using record~ and groove~ I wasn’t sure if they start in sync…
If I use the [fftin~ nofft] suggestion I should be on the save side. I
can easily build a record~/groove~ kind of method with poke~ and index~.
I’d use count~ for going across several fft vectors then…

very cool, thanks

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#83793

You must be logged in to reply to this topic.