Extract amp and freq

    Nov 14 2011 | 11:06 am
    Hi guys,
    here is the problem: i am trying to feed an oscbank~ with the results i am getting from an fft~ analysis. So the question is: how can i extract the base frequency of a bin OUTSIDE a pfft patch?

    • Nov 14 2011 | 7:48 pm
      Sample rate divided by the number of bins (which is the same as the fft size) times the bin number (starting from 0) will give you the frequency of each bin. Note that bins above the Nyquist frequency (the top 50% of the bins) "fold back" (or more correctly, wrap around into the negative frequencies) and thus essentially duplicate the first half of the bins. MSP tutorials 25 and 26 discuss this further; chapter 25 shows an example specifically addressing your question.
      All that aside, you might find it more manageable to use fffb~ instead of fft~ for what you're apparently trying to do.
    • Nov 16 2011 | 2:59 pm
      Muchos gracias Christopher!!!
      BUT: how do i find the running bin number in an fft~ ?(that's why i stated "outside an pfft~ object). Pfft gives you this running bin number but simple fft~ doesn't... Or do i see something wrong here?
      Thanks a lot for the fffb~ i'll check this out immediately!
    • Nov 17 2011 | 5:36 am
      The right outlet of fft~is the bin number.
    • Nov 17 2011 | 1:19 pm
      It's synced!! How could i be so blind!
      OK, thanks a lot!!!