fft without fftin~ question.


    Sep 15 2006 | 11:18 am
    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

    • Sep 15 2006 | 11:55 am
      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
    • Sep 15 2006 | 12:02 pm
      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
    • Sep 15 2006 | 5:31 pm
    • Sep 18 2006 | 8:28 am
      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