aAVis
Processing Based Visualsation Tool
Navigate/Search

Archive for the 'audio analysis' Category

Latest News, Additive Blending, and Motion Blur

Thursday, September 20th, 2007

So now that I’m all nicely moved, I thought it was about time I told you all what I’ve been up to.

I’ve been working on the GUI, come up against some problems, but I think I’ve solved most of them now - I’m working on that tonight and tomorrow and should have something semi-decent ready for the weekend to test loading/saving. Currently I’ve got a version that lets the user create spheres after specifying dimensions. Nothing amazing, but it works, so I’m happy.

As well as working on that, I’ve been doing a series of OpenGL experiments.

Example 1 Was a test of my new particle system. It creates a stream of 3d rotating cubes at the location of the mouse. It also features OpenGL Additive blending.

Example 2 was a happy accident. Once again it’s a stream of particles moving away from the mouse, this time into the Z axis as they rotate. And they are 2D objects. It gives a cool ‘wavy’ feel. I quite like it really!

Besides these three, I’ve also now created something I am incredibly happy with. I call it my motion blur example. I realised that I could use my particle generator to make 3 copies of the same object, each with a slightly lower alpha value and simulate a “motion blur” effect. I also realised that if I made the “particles” move off into the distance, I can get some rather interesting results. So I coded up a simple oscilloscope(esque thing) and added my motion blur class to it. The results were great :

oscilloscopeandmotionblur

The Osc. Motion Blur example reacts to audio input, and looks quite interesting ( it too, has additive blending ). Unfortunately I have trouble exporting these as applets. However here are the files for those of you wanting to have a play :

Mac Users (1.4mb)
PC Users (1.3mb)

It will react to whatever you have selected as your audio-in. I’ve got a possible solution for mac users which I’ll post in the near by future too, I’d appreciate it if a fellow mac users could test it out for me ? Thankyou.

Overall I’m relatively happy with my progress so far. Next on my list is to work on loading and saving presets, and from there, the completion of the GUI. After that, all that remains is to add the various graphical elements, and various effects. That will be the long and hard - although interesting part.

- Anthony

Audio Analysis and Beat Detection version 2

Saturday, September 1st, 2007

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