My understanding is that the 2047 bins equally divide the spectrum from 0 to 24 kHz. (The audio has frequency 48 kHz. The Nyquist frequency, which is the limit of how high you can analyze, is half of that = 24 kHz.) So each bin would be 24000 Hz / 2047 ~= 11.7 Hz wide.

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?

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 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 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...

New related question: what are the frequencies when Quadratic or Logarithmic averaging is engaged? This is to know from what item # to cut if I want to remove the last octave, like 10 kHz to 20 kHz.

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.

## Comments

## My understanding is that the

Jaymie(@jstrecker)My understanding is that the 2047 bins equally divide the spectrum from 0 to 24 kHz. (The audio has frequency 48 kHz. The Nyquist frequency, which is the limit of how high you can analyze, is half of that = 24 kHz.) So each bin would be 24000 Hz / 2047 ~= 11.7 Hz wide.

(how this relates to musical octaves)

## Thanks!

@KewlThanks!

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

Jaymie(@jstrecker)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 into2048bins. 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.)

## Thanks for further

@KewlThanks for further investigating this: it's the precise answer I was looking for.

## Would it be possible to raise

@KewlWould 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.## Yep, adding those two bin

Jaymie(@jstrecker)Yep, adding those two bin counts would be easy. We'll do that for Vuo 1.2.4.

## Thanks!

@KewlThanks!

## By the way, does Calculate

@KewlBy the way, does

`Calculate Amplitude for Frequencies`

reads 24 bit integer and 32 bit float adequately or truncates to 16 bit before analyzing?## Play Audio File promotes all

Jaymie(@jstrecker)`Play Audio File`

promotes all audio files to 32 bits/sample floats.`Calculate Amplitudes for Frequencies`

also does its processing using 32 bits/sample floats.## Good, thanks.

@KewlGood, thanks.

## jaymie, it would be also

@marcozorajaymie, 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...

## @marcozora, thanks for the

Jaymie(@jstrecker)@marcozora, thanks for the suggestion. We'll look into optimizing the processing for high resolutions.

## New related question: what

@KewlNew related question: what are the frequencies when Quadratic or Logarithmic averaging is engaged? This is to know from what item # to cut if I want to remove the last octave, like 10 kHz to 20 kHz.

## For removing 10 kHz and up,

Jaymie(@jstrecker)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.

## binsfrequencies-quadratic.txt

## binsfrequencies-logarithmic.txt

## Thanks !

@KewlThanks !

## In the meantime, would it be

@KewlIn the meantime, would it be possible to have the frequencies lists for 4095 and 8191 (or the way to calculate them)? Thanks!

## OK, here they are.

Jaymie(@jstrecker)OK, here they are.

## binsfrequencies-quadratic-4095.txt

## binsfrequencies-logarithmic-4095.txt

## binfrequencies-quadratic-8191.txt

## binsfrequencies-logarithmic-8191.txt

## Thanks!

@KewlThanks!