Friday, August 17, 2007

FFT Research, Project Choice and Processing Issues

Project Choice
I've decided to go with the audio-responsive visuals. I figure it's the most challenging option available for me and so it's therefore the best way to show off my skills for the end of year expo and beyond.

In Saying this, I wanted to get a decent amount of research done into FFT and Frequency analysis.

Processing Problems
Before I start anything, I've got problems. I wanted to start uploading my processing "sketches". However I've encountered a problem. I spent a large portion of time yesterday afternoon attempting to get the sketches to work as a java applet from within a browser - no joy there, and now I've found that something has broken, and I can't even export as a standalone application - BIG PROBLEM.

The error I get is : "File sonia_v2_9.jar,JSynClasses.jar,JSynV142.dll,libJSynV142.jnilib does not exist"
If anyone knows anything about processing and can help me, I'd appreciate it. I've also posted for support on the processing website here. Until I get this fixed, I can't show you where I'm up to in my experiments - as a last resort I'm sure I can export them from my laptop, so I will have to try that later.

FFT Research
Now to the intersting part ...
I've been doing some research into FFT and Spectrum Analysis. Just so I know what I'm dealing with here. I suppose I should start from the beginning.

In order to work with sound, I need to understand the format in which I can access it. Using processing, and one of the various sound libraries ( In my case, I am using 'Sonia' I can access the live stream of music via my soundcard. This data is intepreted via FFT ( More on this later ), and then outputted into a spectrum array. This array can then be accessed and the music or sound can be intepreted.

So firstly, What is FFT ?
FFT ( or Fast Fourier Transform ) is an "Algorithm to compute the "Discrete Fourier Transform" and it's inverse." Ok, so what is a Fourier Transform ?
The Fourier Transform Produces a Spectrum. It saves the Magnitidue of each frequency component. This data can then be represented as a graph or plot.

So how does this tie in with processing ?
The FFT Data is collated and stored in the array. Each array element is an "FFT Bin". These "bins" are basically storage elements for a *collection* of frequency ranges - not a single frequency. So how are you meant to know what frequencies are contained in which bins ?

Say you have a file with a Sample Rate of 44100Hz. A frequency range of 22050Hz is equally split into 512 bins. Each bin is : 22050 / 512 : 43.066Hz Wide.
The Left most bin ( Lowest Frequency ) has *half* the width of all other bins. ( contains frequencies 0.000Hz to 21.5Hz ).

So what does all this mean ?
This means that I can get data from a sound source, live streaming sound data - examine the frequencies, and calculate which elements represent which aspects of music ( kicks, snares, synths etc ).

And where will this lead ?
Eventually with a sufficiant understanding of the backbone behind the software, and an understanding of the data input and how it is aquired, I can isolate parts of my motion system to react to different parts / types of music in different ways. A greater understanding will help me to create a project of greater impressivenessnessness.

Any Questions ? Any Comments ? Any Suggestions ?

Where now ?
So what I have to do now, is try and get processing working. From there, the experiments continue.

- Anthony

4 comments:

Anonymous said...

Sounds like you got some hard yards ahead of you. My group in a previous semester actually made a physical representation of sound waves. It was so dodgy all our experimentation with magnets, fire, etc failed so we ended up just having foam balls on top of speakers.

Problem was we used vinyl to encase the device, not a very good idea. It generated a lot of static electricity and our foam balls refused to move on presentation day.

Essentially our end result was motionless balls in a pretty box.

Anthony Massingham said...

Just a quick comment-based update : Fixed the problem with the application export. Woo!

whippsy said...

If you have technical problems with Java and all that I suggest JavaJohn or maybe even Jamie - basically anyone who is Hardcore-Inf-Env.

This is sounding cooler and cooler, possibly get in contact with Ian Jones or David Langford(Lango) because they did an awesome project on visualizing music last year.

But me? I can't help you with Jack' basically - woo go Multimedia! :-)

dockpeep said...

hi swany,

i've just started FFT and Ess last week. Can you pls say a bit more about the frequency range? You said "The Left most bin ( Lowest Frequency ) has *half* the width of all other bins. ( contains frequencies 0.000Hz to 21.5Hz )." What are the ranges of next bins?