0
0

I must not have all the documentation for 3.75 because nothing in what I have shows the use of getspectrum (although it shows the function call with no parameters.. all the examples I see in this forum have parameters.. where did they come from?)
I downloaded fmod375win but it has almost nothing of use for explaining how to use the getspectrum.

Also, one of your technical answers to someone else said to look at "dsppluginviewer" Where can I get that demo/example/tutorial? It is not in the 3.75 html stuff

Thanks

joe

  • You must to post comments
0
0

I actually got numbers.

joe

  • You must to post comments
0
0

Hi Joe,

I’m glad you got your problem sorted out, I’m just adding this for the benefit of future reference.

[quote="joedart":2zr2heke]I must not have all the documentation for 3.75 because nothing in what I have shows the use of getspectrum (although it shows the function call with no parameters.. all the examples I see in this forum have parameters.. where did they come from?)
[/quote:2zr2heke]

The getSpectrum method is documented under:

FSOUND_DSP_GetSpectrum

in the file FMOD.chm which is the API documentation shipped with FMOD 3.

As for the parameters, are you sure you are not confusing this getSpectrum for Channel::getSpectrum used in FMOD Ex – which allows you to specify the number of frequency bins, channels, etc?

[quote:2zr2heke]
I downloaded fmod375win but it has almost nothing of use for explaining how to use the getspectrum.
[/quote:2zr2heke]

Ok it’s been a long while since I used this….

FMOD 3 get spectrum returns a pointer to a buffer containing 512 floats.
Each float represents the amount of energy in a frequency bin. The workout which frequency the float represents:

total frequency = sample rate / 2
bin frequency = total frequency / 512

To get the frequency represented by a particular bin, then mulitply the bin number(i+1) by bin frequency.

For example, for a 44100Hz sample rate:

Float buffer Frequency Represented
[0] 43.06
[1] 86.13
[2] 129.199
[3] 172.26
.
.
.
.
.
[508] 21920.80
[509] 21963.86
[510] 22006.93
[511] 22050

Any corrections appreciated 😉

cheers,
Templar

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.