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…