Thursday, September 20, 2007

Blog Moved

Just a quick update people, I've been waiting for this to clear for the last week or so.

my blog has been moved to a new location, my own personal little bit of the web at :


Please update links, and tonight I'll be updating my current progress! thankyou.

Monday, September 3, 2007

GUI's and OpenGL

First things first, thought I'd just mention the latest update to my blog, on the right hand side you can now see a list of what needs to be done in order to complete my prototype. Highlighted in green are the elements that are complete, highlighted in orange are the elements I'm currently working on. So you can keep track of my progress. And this leads in to my current problem.

In processing there are two options for GUI's ( Graphical User Interfaces ).

1) Use a GUI Library
2) Code it all yourself from scratch

Option 2 would take a *long* time, so this leaves option 1. However, even option 1 has problems. Processing has 4 GUI Libraries ( that I am aware of ).
- controlP5
- MyGUI
- Interfascia
- SpringGUI
They all work fine by themselves. However add P3D or OpenGL, and they tend to break. MyGUI and Interfascia seem to die all together. SpringGUI works with P3D but not OpenGL, and controlP5 works with openGL, however the 3D elements always draw on TOP of the GUI. I tried running the GUI elements in a separate window, however that caused issues, and it seems to only work part of the time.

I have heard rumors of a way of re-coding MyGUI to work in conjunction with OpenGL, but I am not 100% sure of its authenticity ( or on the re-compiling process, I'd have to brush up on that ).

So I've gone to the processing forums for support, I'm hoping someone there can offer a suitable solution - Until then, I'm sort of forced to put everything on hold - so hopefully I'll get a solution before then.


If I can't get a solution, I will have to work out a possible solution. Even if this means ensuring no 3D elements move closer than 0 on the Z axis, and drawing all the GUI elements on that point. This will mess up perspective, but it may be the only compromise open to me.

- Anthony

Saturday, September 1, 2007

Audio Analysis and Beat Detection version 2

I was bored yesterday afternoon, so I sat down and re-coded from scratch my beat detector. I received an email from Robert Hodgin ( aka Flight404 ) on some tips to getting beat detection working effectively.

His short answer was it's very tricky. He's still trying to figure out the best way to do it himself, and throughout the googleverse it's about the same story wherever you go. The best way to do it I've decided is a version very similar to his own :

Basically you divide the FFT stream up into X number of segments ( I've chosen 6 ), the sizes get larger as they move to the right of the stream ( bass to treble ). For each of these segments ( or "Zones" ), you then calculate an average value, and a "threshold" value. If the average moves higher than the threshold, then you have a dramatic increase in that zone, and possibly ( I say possibly ) a beat.

Talking is boring, how about I show you.
Windows Users : Click here ( .rar 1.4mb )
Mac Users : Click here ( .rar 1.3mb )

Unrar the files. The instructions are in the mac .rar file ( there's a readme.txt ). The program listens to your microphone. Windows users, you can go to your recording preferences and set your recording input to equal your audio output and get direct sound from winamp or wmp or whatever you use. Mac users ? no idea ( if someone figures out how to do it, tell me please !).

Let me explain what you're seeing :


The Red lines are the zone "averages". The yellow lines are the "threshold" values. When 2 or more areas trigger at the same time, I'm saying that's a "beat", the screen will flash white ( very quickly ). You'll notice it's still very jumpy, and requires a LOT of tweaking ,but I think I'm getting there. It's kinda cool though.

Watching it, I've noticed certain trends. In the next version, I'm going to experiement with the timing of the thresholds. How much higher than the current value it has to be to trigger a threshold change, and maybe even "weighting" certain zones to be worth more than others ( as they seem to contain "beat" related frequencies more often than others ... ) Suggestions ?

That's it for now. Enjoy.

- Anthony