Archive: Little help for a noob?


23rd March 2009 12:15 UTC

Little help for a noob?
Hi all,

i've been readin through some tutorials and am begining to understand AVS a bit now. I was wanting to run some things by you lot to get your ideas.

I thought i'd start woth something simple. The idea i want to try out can be seen here...

http://blog.soulwire.co.uk/flash/act...visualisation/

I modified the AS3 code for this audio visualisation for my website so i know how it works. The size (or you could call it zoom) factor for the animations depends on the overall volume of the audio which is being played through the Flash clip. I reckon that i can port all of the code into one Dynamic Movement effect. I', just trying out the code with one of the included images at the moment.

I need to get the total output volume of the audio and since i can't see one variable which gives me that i decided i would have to loop through all of the values in either GETOSC or GETSPEC (doing that each frame) and total them up. I could then use that value to modify the zoom value of the animations.

Soulwire has coded his own way of detecting beats which produces a nice effect in his animations. Since i am not too keen on the AVS built-in beat detection, i might port that through as well, but for now i'm trying to get the basic idea of the AVS preset working.

Can anyone give me some advice on getting the total volume to start me off? I don't know how many values there are in the GETOSC or GETSPEC variables so i don't know how big to make my loop. If there is an easier way of doing this or if you have any suggestions for a noob i'd love to hear em.

Cheers

NM


23rd March 2009 13:39 UTC

^his link
http://blog.soulwire.co.uk/flash/act...visualisation/
(because new user's URLs will not show up)

wow that stuff is cool, thanks for the inspiration! i have to try that out one time. it might be able to do exactly what AVS so far never could - vector-like lines with proper anti-aliasing :D

to your questions:
if i recall correctly getspec() has 512 bands, and i reckon it'll be the same in getosc().

but when i want to get the (rough) volume i use

vol = getspec(0.5,1,0);

(1st parameter is band centre (here 0.5), 2nd is band-width (here 1, so it covers all of the bands) and 0 is for centre channel)
this returns an average of all the bands. however for popular music it is usually best to shift that towards lower frequencies to go with the usual emphasis on the bass range - e.g.:
vol = getspec(0.3,0.6,0);


hope you are successful, but read my post in other thread as well, getspec seems pretty messed-up to me...

jakob

23rd March 2009 14:51 UTC

Yeah, i agree with you on getspec. Really not getting the kind of output from it which i would have expected.

I modified the Cellular Automata thing on Soulwire's website to take in audio values from the getAudioSpectrum class in AS3. I made up a grid of 512 cells and assigned each of them to a band of the audio spectrum (256 left and 256 right). When the volume of a band goes over a certain volume it activates that bands cell and then the Cellular Automata thing takes over from there, keeping cells alive, spawning more cells or dying, based on the Cellular Automata interactions which he created. Looks really nice and works quite well too.

I don't think i'm gonna get very far with AVS porting the audio vis from the Soulwire website, or even an approximation of it. We need more functionality in AVS for audio information, either from support in Winamp itself or from AVS. At least thats the way it seems to me but i am a noob. :-)

NM


28th March 2009 01:44 UTC

did you already make a preset with this? if yes post it here please, so we can see :)
i've used conways game-of-life just recently as a filter effect in an avs preset - looked rather cool...

the thing is, we need LOTS of things in AVS. since 2005 or so. but AVS was essentially never upgraded in the last few years. so - although it is open source - there is little hope of anything being implemented/upgraded right now.
some AVS artists have wandered off to either Processing or VVVV. you may want to have a look at them if you can't succeed in AVS.