yes, while the wording regarding BANDS is correct, it is not that clear
as long you not mention the samples used.
actually it might be a much better way for beginner who possibly are
not interested into samples…
just want a spectrum, anyhow a deeper understanding of FFT can not get
from a one sentence of a code example.
again pls understand that processing does not do FFT, it just sends the
sample array to the JAVA analyze function and gets back the spectrum
for what it needs you to declare how long that array should be.
now that relation:
samples FFT spectrum ( bands )
i was hoping is more clear after you read the other posts,
it has nothing to do with processing, code… it comes from the
Sampling Theorem
and is valid for all types of signal analysis.
as from any line graphic i can not count lines
- i like the printed list ( i am more the excel type ),
-
- just limited to (30) and
-
- only printed at keyPressed
( because a conti print in draw slows down the frameRate and would not be readable anyhow )
- only printed at keyPressed
now for the math of digital audio:
the used signal has 440Hz, so one sinus fits into 2.27 msec
for a sampling rate of the audio signal of 44,100 Hz - Wikipedia
what does a sample every 22.67 usec.
so takes 100.22 samples of that ONE 440Hz sinus.
if we use / analyze 1024 samples it contains 10.21 of that 440Hz sinus(es).
( and covers 23.2 msec == max 43 batches per sec. ) )