Kewl's picture

For the Calculate Amplitude for Frequencies node, what are the frequencies for the 2047 bins?

Comments

Thanks!

Kewl's picture
Submitted by

Thanks!

So bin #1 would be at 0 Hz, bin #2 at 11.7, bin #3 at 23.4 and so forth. I noticed that with 2047 bins, I can spot DC offsets in early digital recordings (from the 80's), so that would confirm that bin #1 is around 0 Hz: maybe 1 Hz rather than 0 Hz?

After researching this some

jstrecker's picture
Submitted by

After researching this some more...

When Calculate Amplitude for Frequencies is outputting 2047 bins, the calculation actually divides the spectrum from 0 to 24 kHz into 2048 bins. Each bin is 24000 Hz / 2048 ~= 11.7 Hz wide.

The bottom bin is centered around 0 Hz, and ranges from -5.85 Hz to 5.85 Hz. This bin is discarded in the output.

The next bin is centered around 11.7 Hz, and ranges from 5.85 Hz to 17.55 Hz. This is item 1 in the node output.

And so on, for items 2 through 2047 in the output.

Ideally, the entire DC offset would be confined to that bottom bin that gets discarded. But because the calculation being performed (discrete Fourier transform) can't perfectly separate out the frequencies into bins, the DC offset bleeds somewhat into the nearby bins. (We use a windowing function to reduce the bleeding.)

Would it be possible to raise

Kewl's picture
Submitted by

Would it be possible to raise the resolution of the Calculate Amplitude for Frequencies to 4095 or even 8191 bins? It would allow for better reading of the lower octaves: with 2047 bins, below 200 Hz or so, the bin width is larger than a semitone.

jaymie, it would be also

marcozora's picture
Submitted by

jaymie, it would be also helpful to define the reading frequency: from 1500-6000hz or 2000-4000hz, or the full spectrum 0-240000hz. to save ressources in high resolution of 2048, 4096 or more this could be very helpful if fast prozessing is needed for live reactive...

For removing 10 kHz and up,

jstrecker's picture
Submitted by

For removing 10 kHz and up, with Frequency Bins set to 2047, the bins you'd want to start at are bin 43 (10095.70 Hz to 10599.61 Hz) for Quadratic and bin 11 (6005.86 Hz to 12017.58 Hz) or bin 12 (12005.86 Hz to 23994.14 Hz).

I've attached the full list of bins and frequencies for Frequency Bins = 2047 and Frequency Bin Averaging = Quadratic or Logarithmic. We've added some code that logs the bins and frequencies to console when Vuo is run in debug mode, to be included in the next release.