Analysing the inflowing floating point data using fft

    Mar 27 2014 | 10:59 am
    I have a set of real time data inflow, and i want to detect if the input stream is sinusoidal, preferably using fft. The data set is floating point of a 6 point precision and is real time acquisition.

    • Mar 28 2014 | 6:45 am
      i've never done this before, but it probably goes something like this: 1: convert the data stream to regularly sampled stream of floats between -1 and 1. to do this use the scale object, a float object as a buffer with a metro attached to it. 2: convert this to a signal (in the msp sense of the word) using sig~ 3: put the signal through a smoothing filter with a steep cutoff at a little below half the data input rate (nyquist). You'll probably have to design the filter yourself somehow. 4: downsample the filtered signal to the sample rate of the data. this part of the patch would have to go in a poly~ to acheive the downsampling 5: use pfft to analyse the data using appropriate windowing and fft size 6: figure out a way to display the output, maybe convert to a list, remap magnitudes to db and parse to a multislider...
      have i left anything out? hth