Showing posts with label aAVis. Show all posts
Showing posts with label aAVis. Show all posts

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

Thursday, August 30, 2007

Presentation Feedback, and Change of Focus

Ok, so we had our project presentations on monday. Boy did mine not go well. I was actually feeling a little under the weather, so I wasn't really thinking straight, not a good start. Eventually ( after 2 hours of waiting ) I got to present. Ralf I don't think was amazingly impressed. Here is the feedback I got from my tutors, Petra and Lorna :

"- Sounds like an interesting product
- Ralf suggested getting it up to prototype
- Looking forward to seeing what you produce, played with processing a little, and is lots of fun.
- Well presented, and understandable
- Scope needs to be considered to make sure that it is achievable"

"Interesting project - though you need to sell it more! Aiming for the casual desktop user is kinda selling it short, considering the potential it has for inclusion into club setting. How are you going to differentiate it from the others out there - why would ppl use yours over theirs? Allowing for customisation would help to push up a level - and aiming for a particular group of users (like VJ's) would also help."


Taking all this, and Ralf's comments into consideration - I am actually going to be more ambitious, and I'm going to move back to my original idea. Which is a Visualisation *CONSTRUCTING* tool. Based in processing still, and still using 3d. But so the user has the ability to construt their own 3D visuals, and play with them as they see fit. Much more fun, right ?

So, I've sat down and gone over the preliminary details, and boy, will it be a BIG assignment. I've got a lot to do. I've roughly broken it up into four parts :

1. Audio - Analysing of Audio Stream, Returning Useable Data.
2. Creation - Creation of Shapes/Particles/Effects to be displayed
3. Display - HOW the objects are displayed. 3d, blending, blurring...etc
4. Presentation - Live mixing of saved created presets.

I've got to delve into a little more detail, but I think this will be the direction I will take. How complex it will all be when it's done ? I'm not sure. But it should be an interesting journey none the less! I'm tired and a little sick, so that's all I'm writing for now - but I'll write again tomorrow after I get the feedback from my draft report.

- Anthony