# Trying to get the Spectrum but my channel is always 0 (C#)

**URL:** <https://qa.fmod.com/t/trying-to-get-the-spectrum-but-my-channel-is-always-0-c/13962>\
**Category:** FMOD Engine\
**Created:** [June 23, 2018, 1:20pm UTC](https://qa.fmod.com/t/trying-to-get-the-spectrum-but-my-channel-is-always-0-c/13962 "2018-06-23T13:20:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fleshy](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@fleshy](https://qa.fmod.com/u/fleshy)\
**Post date:** [June 23, 2018, 1:20pm UTC](https://qa.fmod.com/t/trying-to-get-the-spectrum-but-my-channel-is-always-0-c/13962/1 "2018-06-23T13:20:06Z")

</div>

I am trying to get the spectrum of the song (I’m new to FMOD) but the waveFormBuffer.numchannel is always zero. To get the spectrum I have followed the answers to some posts on the forum. My question is, is there anything wrong with the order of my code or the way I try to get the Spectrum?  
A link to my code: [https://pastebin.com/kRZVgJKs](https://pastebin.com/kRZVgJKs)  
Thanks, Leo.

---

<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:** [June 25, 2018, 5:35am UTC](https://qa.fmod.com/t/trying-to-get-the-spectrum-but-my-channel-is-always-0-c/13962/2 "2018-06-25T05:35:29Z")

</div>

It looks like because the GetSpectrum is called immediately after Play, and FMOD is asynchronous, there may not be any data in the DSP just yet.

You will also need to continually call GetSpectrum because the fftDSP.getParameterData will only return the data for that frame.

Otherwise you can use fftDSP.getBypass to see if it is actually being used.  
[https://fmod.com/resources/documentation-api?page=content/generated/FMOD\_DSP\_GetBypass.html#/](https://fmod.com/resources/documentation-api?page=content/generated/FMOD_DSP_GetBypass.html#/)
