< Back to IRCAM Forum

Popo.fft for grasshoper

Hello, community.

Need your help and to guide the right way to deal with sound description. Want to apologise in advance - i’m not really deeply competent in sound but do know some basic concepts of dsp.

I’m trying to analyse sound sample – about 10 second long, 192kbs, 24bit, and get a table with frequency / phase / amplitude of each sample to use this data set as building blocks to create sculpture in Rhino, Grasshopper, literally representing each sine and cosine wave with it’s frequency and phase. I sent this question to MaxMsp forums and was advised to go for MUBU package and look for internal objects to make a detailed FFT processing.

pipo.fft looks like proper tool to solve it. But I can’t let it work in a proper way - using the example patch, offline mode, whatever sample I put into the buffer, some of the matrix cells filled up with numbers over expected amplitude limit of real and imaginary components

what am i doing wrong ? Is it any other methods to analyse sound and get result as .txt / raw text file format ?

THNX in advance.

Hi,

Here’s how the story goes for FFTs as complex functions:

  • Magnitude (in pseudocode): SQRT(Real^2 + Imag^2);
  • Phase (again, in pseudocode): ATAN2(Imag, Real).

If I understood you correctly, these formulae seem to provide everything you’re looking for.

All the best,
António

1 Like

BTW, you can use the mubu.process loopback feature and some zl plumbing to apply the formulas mentioned by @antonioflorenca to every bin like below. Frequency is simply bin index / numbins * (sr / 2)


----------begin_max5_patcher----------
616.3ocwV1rbaBCDG+L7Tngy1dP7oaOk7.jY58NY7HvBa4AjzHDotISd2qzJ
nNIlZiiSZN.1ZYQ+0ucWshm78BJD6osAnui9Ixy6IeOOvj0fW+XufFx9xZRK
3V.m9KQwtfYtGoo60f4cBFGEMXVRzkaY7MqTzRsa1wY4KBmghwvOoX68nnEg
n66eGdWCiWS0fLQ8FYqgY2n377fCNJ5zCdh6s5Lo+sj5zKH.cu8IO66auM65
v6wZTR32xP0T9IXLZ4R.qXfQGvWDiYiyXz+jwYeRbtQI5jSHalB.iSBuXTS+
pQsjnzBon97TFkm9NqYStPHqpEDskT2edW3Vzo0hSUkFCIKbrCmjg6iCE9Xn
hOL2JRCUSUqnbRQM.Q3ksIsfv274U.OkFR8aVwgWdIL9qtDtoqnagTIJossH
ISJlWUomukVKmKppPlqZFmtxXDcC2jpPlxchBcSCQqX6KE0Visn6Ha3Lc2ZJ
5GaIszAYruaoniqeITUBt19Vf92pXj5yWokkY+IwMx1pX5Q3vwCwIuX0zxdD
VMXak7oh7lKFWebR.VM.su4fPfHq8WmYZEcpxgYtuN.cfo0zVMiSzLylvC9j
37Yzb+j0wDMP3yHzqWLB0ZpBhNWkx4SfvzO.BSmfNuIJzvVKMe6gtO2gyyVj
ZqxfhszvjiGgSg14Iog+czUtrylX3A++n.Ha7BfvqR43olXt1PYxDDJ+CRG7
DzAORqBhT9.U016LHgoc8NADmWNCFx3tgPSs.E8A1f+vYgADkoYo1zorS45k
tOy8wBAMBSFi2w520ZfyHIbT.zsVRbb.mX3+r+e.TYktOB
-----------end_max5_patcher-----------
1 Like

@schwarz @antonioflorenca, Thnx ! late but warm appreciation for your answer! It worked for me !