/* fft() study -
'FNum' can NOT be used to set "NUM_FFT_BINS" (aka Audio.FFT.NumBins)
from within the Config file... !!! BAD !!!
You CAN GLOBALLY set (Audio.FFT.NumBins= x) in the Preference files (Which WORKS)
but THAT would be globally applied to ALL Configs ... probably NOT what you want!
With 'FNum'(Audio.FFT.NumBins)= 10, you SHOULD expect (2+8) triangular display peaks
NOT some nice smooth distribution!!!!
"NUM_FFT_BINS" SEEMS to (READ) reference 'Audio.FFT.NumBins' Correctly
You MAY ask, what is the big deal? Well 'FNum' values of 1 and 3 may hold
promise.
*** I guess the NEXT question to ask is whether 'SNum' still works, aye? ***
Also, there REALLY SHOULD be a way to determine the HIGHEST (and LOWEST) column VALUE contained
in a vector... For example you could DIVIDE every element of a given FFT result vector
by the GREATEST value to normalize [0,1] the sample data. This would be VERY Handy!
Flowfield: '(Empty)'
*/
ConB=1
FNum=10 // Nope! Doesn't WORK!! (nor trying to set 'Audio.FFT.NumBins' within the Config)
Num=185 // Can NOT use "NUM_FFT_BINS" HERE, WHY doesn't it Work!?!
Stps=2
A0="2-(2/Num)"
A1=".975"
A2="vectorLR(Num-1, 0, 1)"
B0="ID/Num"
B1="(A0*B0) - (A0/2)" // X Position
B2="select(Id, B2, fft(A2))" // tricky fft(Id/(Num-1))
C0="col(B2, Id) * s"
X0=" B1"
Y0="(2*C0-A1)" // Intensity *2
Pen=1
LWdt=1
Meta="reactive=3 detail=3 density=3 morphable=5"
Vers=400
:
:
A3=1 // Make sure you try with set to '1' and '0'
B2="select(Id, B2, resample(resample(fft(A2), FNum, 1, 0), NUM_FFT_BINS, 1, A3))" // ;0)
:
:
" Also, there REALLY SHOULD be a way to determine the HIGHEST (and LOWEST) column VALUE contained
in a vector... For example you could DIVIDE every element of a given FFT result vector
by the GREATEST value to normalize [0,1] the sample data. This would be VERY Handy!
" - jrm 26, Apr 2011
Change the divisor function in X and Y where it reads (B0/C0) to minus. Also, change ConB to zero. Everything else is unchanged.
EDIT: Raise Num to 500.
Sorry I didn't reply earlier. I post stuff, for those who might care, and I hope to spark a slightly different take on what currently exists. Always feel free to use anything you see fit as a starting point of your own endeavors. - Have Fun!
The purpose of this exercise was to highlight the great deal of acrobatics that was required to determine the greatest column value for a given vector(row). It is a valuable function that really needs to be implemented as a native operation. There are other very minor language functionality modifications that would offer great value and remain total consistent with existing syntax (and philosophy?? )