Using FFT/Spectrum data

Using FFT/Spectrum data

PostPosted by trickpirata » Thu Aug 01, 2013 5:15 am

Can I use FFT data or spectrum data in this scripting package? I am doing this because I am using the iPod library as the source of my audio. So basically what I'm doing now is getting the audio using the iPod library, copy it to the project's document folder, load the audio using WWW and use it as audio clip. The thing is, the process is long and it seems like it's not that good because I am copying the whole audio. So I am looking for other alternatives and seems like passing FFT data from the native plugin I created to Unity is the best way. I just don't know if I can control stuff from your amazing script to interact with the passed FFTs.

Can you give me some light? A little sample code/pseudo code might help.

PS: I already emailed you but seems you're not answering so I decided to post here. Hope you can help me.


Cheers! :D
trickpirata
 
Posts: 1
Joined: Thu Aug 01, 2013 5:01 am

Re: Using FFT/Spectrum data

PostPosted by AlteredReality » Wed Aug 07, 2013 8:56 pm

I previously replied to your email, but I wanted to reply to this as well so anyone else with this question would see the answer. Here is what I put in email:

This is the method that Visualizer Studio uses to get the FFT data to process.

http://docs.unity3d.com/Documentation/S ... mData.html

If you would like to use a different source for FFT data, you'd have to have Visualizer Studio Pro \w the source code. You need to update the top of VisManager.Update() to take the other source of FFT. As long as the data is setup the same way, it should work just fine. I've wanted to be able to get FFT data from external sources, but I've never found a good way to do it short of writing my own external DLL to do so.
Andy - Altered Reality
AlteredReality
Site Admin
 
Posts: 118
Joined: Fri Jan 06, 2012 8:31 pm

Re: Using FFT/Spectrum data

PostPosted by Gandalf458 » Wed Oct 09, 2013 1:59 am

Hi and thank you for posting this. I want to learn about how to create an FFT window from a different audio stream and bypass having to create a Unity Audio Source. I'm pretty new at using Visualizer Studio, but I purchased the library and source a few months ago, knowing that one day I would get around to implementing it.

So if the library gets back samples and an FFT window, it will be able to do it's analysis? Also, how well would this work for a source that is streaming as opposed to a short audio file. Thanks!
Gandalf458
 
Posts: 2
Joined: Wed Oct 09, 2013 1:44 am

Re: Using FFT/Spectrum data

PostPosted by AlteredReality » Wed Oct 09, 2013 8:06 pm

Gandalf458 wrote:Hi and thank you for posting this. I want to learn about how to create an FFT window from a different audio stream and bypass having to create a Unity Audio Source. I'm pretty new at using Visualizer Studio, but I purchased the library and source a few months ago, knowing that one day I would get around to implementing it.

So if the library gets back samples and an FFT window, it will be able to do it's analysis? Also, how well would this work for a source that is streaming as opposed to a short audio file. Thanks!


As mentioned above, if the FFT data is structured the same as the VS manager is configured to work with, it should work just fine. In terms of how streaming audio would work...I don't know for sure. I think it would work fine for the FFT, since it just analyzes the audio data for a given frame.
Andy - Altered Reality
AlteredReality
Site Admin
 
Posts: 118
Joined: Fri Jan 06, 2012 8:31 pm

Re: Using FFT/Spectrum data

PostPosted by Gandalf458 » Sun Oct 13, 2013 1:35 am

Cool. Thanks. I was able to get it work fairly well. It seems like my highs are not visible though. Even when I turn up the boost, they don't seem to show up in the spectrum analyzer. The bass has a very nice spike, and the mid is visible and obviously going along with the music (especially the guitar). I'll keep working on it, but I want to know if there is anything about highs and boost that you can tell me.
Gandalf458
 
Posts: 2
Joined: Wed Oct 09, 2013 1:44 am

Re: Using FFT/Spectrum data

PostPosted by AlteredReality » Mon Oct 14, 2013 8:32 pm

Gandalf458 wrote:Cool. Thanks. I was able to get it work fairly well. It seems like my highs are not visible though. Even when I turn up the boost, they don't seem to show up in the spectrum analyzer. The bass has a very nice spike, and the mid is visible and obviously going along with the music (especially the guitar). I'll keep working on it, but I want to know if there is anything about highs and boost that you can tell me.


That's awesome it's working well overall. From what I remember about the FFT, the high bands typically don't have as much power in them. Usually for the highs, I average a bunch of higher frequencies, and boost the power of them.
Andy - Altered Reality
AlteredReality
Site Admin
 
Posts: 118
Joined: Fri Jan 06, 2012 8:31 pm


Return to Questions and Discussion

Who is online

Users browsing this forum: No registered users and 0 guests


Style by Gokinstudio | Free forum hosting by ProphpBB | Software by phpBB | Report Abuse | Privacy
cron