Hi, guys!
I'm relatively new to Pure Data and I'm making a visual project — with Pure Data (Purr Data version) and Processing — that depends on a good FFT analysis.
I've been trying to solve this problem for some time now.
I made the patch that is in this tutorial:
This patch opens a file and "draws" the left and right channels on two arrays.
I'm trying to mix this patch with the "patches/3-8-1-1-rfft-array.pd" of this tutorial:
http://www.pd-tutorial.com/english/ch03s08.html#id431716
So, what I'm trying to do is to make an FFT analysis to an wav file to represent visually the amplitude of each range of frequencies from the lower frequencies to the higher frequencies for different songs.
When I test the FFT analysis with an [osc~] object (writing it in an array), everything is kind of fine: 10000Hz in the middle, 20000Hz glued to the right. But I noticed that when I put [osc~ 0], the amplitude glued to the left is really high. Same with 50Hz, 100Hz, 150Hz, etc.. until around 1500Hz. Another thing I noticed is that each frequency has a different amplitude.
So, one thing I tried to do: I put the FFT code in a subpatch and changed the blocksize inside it to 4096 with the object [block~]. Since only the first 32 bins shows the frequencies, I put the size of the array with half the blocksize: 2048. Then, since the main frequencies of the majority of the songs goes until around 5000Hz — I've been told that C8 correspond to around 4200Hz, and that would be in the 7th bin in a block size of 64 —, I tried to reduce the size of the array to 512:
20000 (total frequencies) / 2048 (bins) = 9,76 (frequencies per bin)
5000 (frequencies for songs) / 9,76 (frequencies per bin) = 512 (bins)
In a blocksize of 64, this would correspond to the first 8 bins.
But still, after all this, the frequencies are always glued to the left:
I've tried everything to make a well-distributed FFT analysis, like it should be, but it's ALWAYS glued to the left with all the songs that I tried with...
Sorry for the long post and let me know if I wasn't clear in my question...
Thank you in advance!