PDA

View Full Version : Audioreactive Flash Candy


Exavior
16th March 2004, 11:15 PM
I?ve been working on a couple audio reactive flash visuals, and would like to get some input from anyone who cares to share their opinion.

To get them to work at your end, you?ll need to do a few things:
1: Grant flash access to your webcam/microphone. It?ll only use the mic.
2: Set the recording method on your sound card to what ever audio source you have playing. So if you have a track in Winamp playing, you?ll need to set it to ?stereo mix? or what ever the equivalent is on your soundcard. To change the settings in windows, double click the speaker icon in your task bar, go to options, properties, recording, and check the applicable sound source. (you may also have to adjust the sound level here)

Now in flash (while at a webpage displaying embedded flash) right click and go to the settings tab for the microphone. Make sure the right sound source is selected (if you have multiple) and check the ?reduce echo? box if needed. Now you can adjust the levels to get the best results from the flash player.

Now that that is done, you can preview the visuals.

------------------------------------------------------------

First one is a 3D particle cluster engine:

http://www.exavior.com/vj/particles.swf

The engine will randomly fade between various randomly generated particle clusters. The rotation, scale, color, movement, speed, particle type, and relational properties of all particles are randomly generated every time, so you can end up with some pretty interesting results.

Depending on the reaction modes selected, the particles will adjust their scale in relation to the volume of the audio, and when obvious beats are detected the some particles will shift their color and become much larger for a fraction of a second.

The particles can also adjust their movement speed to relate to the volume of the audio. The particle cluster can also do the same for its rotational speed properties.

(To regenerate the cluster at any time, you can hit the spacebar)

------------------------------------------------------------

The second visual is an Organic engine:

http://www.exavior.com/vj/organic.swf

If your audio is not properly setup and tuned, this one will not work very well at all. When an obvious beat is detected a new organic element will be created. Much like the previous visual, many random properties change from element to element. The organic elements will bend and sway with the beat of the music. The more intense the volume, the more they will bend.

(At any time you can generate a new element with the spacebar)

------------------------------------------------------------

That is a basic description of the main two visuals I?ve been working on.

Any suggestions would be greatly appreciated.

On a side note, I?ve not included any kind of watermark in these, so I understand it is possible for you to save them locally and use yourself. If you choose to, please give me credit when possible. I have no problem with sharing my work, just as long as it?s done with respect. And if you want to use them, you may want to wait until I get some criticism on them first, I might have a few things I need to fix first. ;)

charlielangridge
16th March 2004, 11:48 PM
Very nice m8, no probs my end (xcept the dont work in resolume :( )

Exavior
17th March 2004, 12:51 AM
Yeah, it's all code based animation, no frame by frame stuff.

Done in Flash 2004.

Hopefully VJ software will start to support "real" flash eventually...

asterix
17th March 2004, 04:55 AM
Nice work man. Have you considered developing some nice flash/director based visuals for flowmotion? Looking forward to seeing more from your end...

ecin
17th March 2004, 03:32 PM
very cool. not sure if it was my setup or what but i got an echo which i later learned was adjustable in the flash settings.

i'd love to see more of these.

big props.

fuussmuuss
17th March 2004, 03:43 PM
Brilliant :D is it hard to make???

Exavior
17th March 2004, 03:51 PM
The echo is one down side to having flash using wave data as a mic source. Even with the echo suppression enabled it will often still produce a mild echo.

But since you would not really want to listen to the audio on your PC it is not too much of a problem.

I don?t work with director yet, have not had time to play around with it. But I work with flash all day every day at work. I?ve not done anything for flowmotion, as it does not support the versions of flash I work with. (yet)

I?m trying to come up with more fun ideas for flash visuals, but the ceiling is pretty low. I have to use a lot of sprite limits too keep it from getting too CPU intensive. For example when the organic engine detects a beat, it will only add an element if there are < 15 elements on screen. (Including those that are black and in the process of fading out)

If anyone has any fun ideas for new visuals let me know. I?d be more than happy to share the final result.

There is also another visual up right now: http://www.exavior.com/vj/rain.swf

I did not like to it before because it is so basic, and rather bland. It just rains down a random type of particle for a random period of time, the phases to a new particle type. Like the other particle engine the size of the particles changes with volume, and they change when a beat is detected. It?s a little dull, but I had a couple uses in mind for it that could be fun. Next thing I plan to add to add is a rotate property that lets you use the mouse keys to change the direction. So you can have them move upward like bubbles, or sideways like wind blown snow. (That feature may be implemented by the time you preview it, so try it out.)

sondz
17th March 2004, 06:35 PM
thses are really cool
you should definately have a look at flowMotion. I gues you are just using the overall volume of the inputted sound, but flowMotion provides 9 different frequency bands to mess about with.

Recently i have been tinkering with the idea of changing the width of an object to the bass beat, and the height to the beat the highs, when it works it looks really cool.

Also because of the sound delay in flash, its always abit out of time, but you don't get that problem with flowMotion

flowMotion will work with any version of flash, you've just got to know how to fix it. I've posted the method here (http://www.robotfunk.com/phpBB2/viewtopic.php?t=157)

I havn't found anyone else who is interested in the sound - flash programming side of things, i've been feeling a little lonely :cry:

Exavior
17th March 2004, 06:42 PM
I seem to recall robo sayn' that it does not support Flash MX or Flash 2004 yet, which is the versions I use.

It does however support flash5, which is from a few years back.

robotfunk
17th March 2004, 08:48 PM
yup I've heard this hack will enable you to use later version flash files in flowmotion ... I'd release it like that if I had legal access to the files needed :) I'll wait till I can offer a version that supports flash mx 2004 as well (soon!)

I thought supporting interactive flash and director movies was rather exciting .. especially being able to link to all fft/lfo/etc data .. but as it is this feature is poorly documented .. so if you need any help just holler... being a flash n00b the supplied interactive flash files are more to demonstrate the functionality than to be of any use... so any exciting examples are more than welcome!

btw nuff spek to sondz for finding out this hack ... and to komart for finding out how to (ab)use pete'slivefeed freeframe plugin to capture the output realtime into virtualdub .... keep on hacking :)

robotfunk
17th March 2004, 08:53 PM
btw the correct link to sondz' hack is
http://www.robotfunk.com/phpBB2/viewtopic.php?t=214

sondz
17th March 2004, 11:39 PM
oops, sorry about the wrong link.

the stuff included with flowMotion doesn't pass the FFT values to flash, so you will have to use my updated version. Its all on the flowMothin BB, so just follow the links, one day i'll get arround to copying it to VJF.

my demo SWF also displays the FFT values as a kinda bar graph thing, its very boring, but shows that stuff is working.

Exavior
18th March 2004, 12:17 AM
Cool, thanks.

I'll have to check it out.

fuussmuuss
18th March 2004, 08:13 AM
a thing that would be cool, would be to make alot of these flash visuals (sound reactive and/or controllable) and pack them in some kind of small flash application launcher thing!!! like having some kind of setup for playing them on a timeline, or switching from one to another by hitting a key or something.

That would be cool :D
No???

sondz
18th March 2004, 02:28 PM
i've thught of that, i've just not done it yet!

i've sent some of my files to ecin to put on triggerMotion, but that hasn't happened yet, maybe next update?

Exavior
18th March 2004, 02:37 PM
That could be done easily enough. But I was designing these more as quick stand-alones to pop up when that style of effect was needed. I did not really plan on needing to switch between the flash visuals. For example if I?m mixing over nature footage I might want to quickly pop up the organic engine on an additive layer. Or, for something more science-themed, the particle engine.

I might just skip that step and use flowmotion as the launcher.

ecin
18th March 2004, 05:34 PM
Originally posted by sondz
i've thught of that, i've just not done it yet!

i've sent some of my files to ecin to put on triggerMotion, but that hasn't happened yet, maybe next update?

i had some questions regarding your files, i'll e-mail you.

murk
18th March 2004, 06:16 PM
How difficult would it be to create a simple oscilloscope in flash?

Exavior
18th March 2004, 06:30 PM
Depends on how simple you want ;)

Here's an example I made ages ago: http://www.exavior.com/flash/soundwave.html

This is a very simple one. You could use line drawing and actually draw a real time curved line that matched the volume over a period of milliseconds, but I've not bothered with making one that complex.

murk
18th March 2004, 06:41 PM
Yeah, I have made one of those too, but I am looking something that has more of the feel of a real oscilloscope.

Exavior
18th March 2004, 09:45 PM
I just built another one today: http://www.exavior.com/vj/life.swf

It emulates cells under a microscope, wandering around to the beat of the music. The more intense the music, the faster they move. It looks pretty good with tracks that fade in and out a lot.

To regenerate the cells just hit the spacebar.

I also changed all the previous visuals. Now you can use the number keys (1-0) to adjust the sensitivity of the beat detection. 1 is extremely sensitive, so pretty much any sound will count as a beat, and 0 is less sensitive. This lets you adapt the beat detection to fit a specific track or section of a track.

Ideas and criticism welcome.

sondz
18th March 2004, 11:40 PM
that is so cool!

once we sort out implementing stuff in flowMotion, so we can get rid of the time delay, these things are gonna look amazing.

i really need to get of my arse and get creative, has anyone got any leftover time they could lend me? I've run out of my own.

ps. would you be willing to share sorce files?