# Getting the audio data of a Programmer Sound File in Unity

**URL:** https://qa.fmod.com/t/getting-the-audio-data-of-a-programmer-sound-file-in-unity/16083
**Category:** Unity
**Tags:** csharp, unity
**Created:** [August 15, 2020, 11:02pm UTC](https://qa.fmod.com/t/getting-the-audio-data-of-a-programmer-sound-file-in-unity/16083 "2020-08-15T23:02:42Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [August 21, 2020, 2:10am UTC](https://qa.fmod.com/t/getting-the-audio-data-of-a-programmer-sound-file-in-unity/16083/2 "2020-08-21T02:10:50Z")

</div>

Here is a link to a solution using a DSP to get the spectrum data, this can be used for a single event or a bus, it was made for an older version of FMOD but it should not need much to get it working in 2.00 or 2.01.

> [@Getting spectrum of master channel in Unity...](https://qa.fmod.com/t/getting-spectrum-of-master-channel-in-unity/12579/2):
>
> Here’s an example I wrote but never included in the docs due to lack of polish using System; using UnityEngine; using System.Runtime.InteropServices; class ScriptUsageLowLevel : MonoBehaviour { FMOD.Studio.EventInstance musicInstance; FMOD.DSP fft; LineRenderer lineRenderer; const int WindowSize = 1024; void Start() { lineRenderer = gameObject.AddComponent\<LineRenderer\>(); lineRenderer.SetVertexCount(WindowSize); lineRenderer.SetWidth(…

I have made a task to add this to our scripting examples on the website as it is something that gets a few requests.

---

_[View the full topic](https://qa.fmod.com/t/getting-the-audio-data-of-a-programmer-sound-file-in-unity/16083)._
