# Spectrum Analysis, what function to use ? GetSpectrum() no longer exists

**URL:** <https://qa.fmod.com/t/spectrum-analysis-what-function-to-use-getspectrum-no-longer-exists/13657>\
**Category:** FMOD Engine\
**Created:** [January 20, 2018, 3:59pm UTC](https://qa.fmod.com/t/spectrum-analysis-what-function-to-use-getspectrum-no-longer-exists/13657 "2018-01-20T15:59:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![emilien.ouzeri](https://avatars.discourse-cdn.com/v4/letter/e/0ea827/32.png) [@emilien.ouzeri](https://qa.fmod.com/u/emilien.ouzeri)\
**Post date:** [January 20, 2018, 3:59pm UTC](https://qa.fmod.com/t/spectrum-analysis-what-function-to-use-getspectrum-no-longer-exists/13657/1 "2018-01-20T15:59:22Z")

</div>

Hello,  
I’m a beginner on fmod. I am trying to make an audio player using fmod. I want to use some frequencies of my sounds. I saw different tutorials to do so, but they all seem deprecated. In fact, I wanted to use the GetSpectrum() function which appears to be really easy to use. But I read that it is impossible to make this function works with the latest version of fmod… Do you guys have an idea that could help me ? What other function can I use ? If somebody could upload the previous version which contains GetSpectrum I would be really grateful!(Cause the few links I found no longer work…)  
I have made some researches but I don’t really understand the other ways to get a spectrum analysis.  
Thank you

PS: Sorry for my bad english

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [January 21, 2018, 11:23pm UTC](https://qa.fmod.com/t/spectrum-analysis-what-function-to-use-getspectrum-no-longer-exists/13657/2 "2018-01-21T23:23:42Z")

</div>

GetSpectrum() was a function available in FMOD Ex, it has been removed in FMOD Studio but there is another way to access this information.

What you want to do is create a dsp to access the information from and attach the dsp to the desired channelGroup.

`
FMOD::DSP* fftDSP;
FMOD::ChannelGroup* channelGroup;
result = LowlevelSystem->createDSPByType(FMOD_DSP_TYPE_FFT, &fftDSP);
result = channelGroup->addDSP(0 /* = Head of the DSP chain. */ , fftDSP);
// Now that the dsp is attached, we can access it
void* data;
unsigned int length;
result = fft->getParameterData(FMOD_DSP_FFT_SPECTRUMDATA, &data, &length, 0, 0);
`

You will then be left with a struct, FMOD\_DSP\_PARAMETER\_FFT, that you can access the information of for that particular frame.  
[https://fmod.com/resources/documentation-api?page=content/generated/FMOD\_DSP\_PARAMETER\_FFT.html#/](https://fmod.com/resources/documentation-api?page=content/generated/FMOD_DSP_PARAMETER_FFT.html#/)

If you would rather use FMOD Ex, please contact support to gain access at [support@fmod.com](mailto:support@fmod.com).
