Archive: changing color based on spectrum


3rd August 2009 20:27 UTC

changing color based on spectrum
I'm not great with AVS yet, and since it is already a dead art its hard to find help, but I must see if anyone out there can help.

I have a viz that is kinda dope, but it needs to be more dynamic, and I'm thinking that having the colors change would be great.

First, my viz is set up using three (3) Particles that are inside of an effect list.

I tried putting in a colorfade that changes on beat, but it it not quite what I was looking for.

Can anyone suggest another way that I can get the colors of my particles to change maybe based on spectrum and/or using a custom bmp that skips a few beats?


Thanks


3rd August 2009 21:36 UTC

First off, welcome to the world of AVS!

If you really want to learn about AVS, I suggest you also take a look at the available |tutorials|. I suggest you start with the first two, they're easy to read.

First, learn which effect does what. Experiment and fiddle around to see what happens. The tutorials can help you there.
If you know the possibilities, then I suggest you replace the moving particles with Texer II's, because they're codable (allowing, for instance, modifying the colors according to the music). Nothing to be afraid of, but you best start with the basics.

Maybe I'll whip something up for you tomorrow, I'm going to bed now.


4th August 2009 17:18 UTC

Take a look at the attachment


5th August 2009 15:58 UTC

Thanks for the help. I really appreciate your time.

I looked at the two .avs you sent. Some of the effects you used, I have never used before. The Texer II's sound like an interesting alternative to Moving Particles, but I think I'm still a little outside the realm of trying to code one of them.

I like what you did with the moving particle example. It worked very well with the color changes, however I'm looking for something a little smoother for the color change.

These are the files I've been working with. I was thinking it might work best if the color was changing constantly and smoothly. I thought about using a Color Modifier and setting up some code that would per frame change some values and apply it to the colors but its hard to debug what I actually tried. Got any ideas?


9th August 2009 11:25 UTC

Also try looking into the code of the Color Modifier's examples and the expression help.


12th August 2009 14:49 UTC

This is awesome. Thank you so much.

One thing that I think is happening but not sure is when any of the color values reach higher than 1, do they go back to 0? How does that work? Is the way that functions the same as most other variables?

I'll post up the final version of it when I am done.


12th August 2009 18:27 UTC

It's truncated if it reaches a level higher than 1, or lower than 0. Red can't be 'redder' than pure red, or darker than black.

But you can of course try this yourself. In this example, I multiplied the existing colors by a value. You can also set that value, ignoring what was before - like 'blue=0.6;' instead of 'blue=blue*0.6;'.

Experimenting teaches you the most. I could tell you what happens in most cases, but if you find out yourself, you'll understand better.