Skip to content
Forum Archive

hue change

8 posts

macaroon#

hue change

It is possible to change the hue of what's on the avs (on a beat) through either random colours or a random colour from a previously set of pre-defined colours? ie on a beat everything goes red, next beat goes green etc..

Cheers
Magic.X#
UnConeD made an APE (additional Plugin) that will do fine. It's called ColorMap. Get it here.
Deamon#
Yep, that'll do the trick. Unless it's scopes you want to color, you can change color of scopes onbeat (or any trigger you want) as well. add rgb values to per point data.


x=i*2-1;
y=v/2;

r=1;
g=0;
b=0;
will result into a red colored scope. Values go from 0 to 1. You can of course always use all of avs coding terms, like sin, cos, abs and whatnot.
shreyas_potnis#
To change the hue of a color in a ssc, use this:

tpi=2*acos(-1) //twice pi 6.28...
hue=0..6.28;

red=sin(hue+tpi*.33)*.5+.5;
green=sin(hue+tpi*.66)*.5+.5;
blue=sin(hue+tpi*.99)*.5+.5;
dirkdeftly#
that's not really a hue setting, but it works okay....
and shreyas, that should be
red=abs(sin(hue));
green=abs(sin(hue+pi/3));
blue=abs(sin(hue-pi/3));
works correctly (as far as i can tell yours doesn't but i haven't tried it yet) and with less operators...

an actual hue shifter that was remotely customizeable would be hard because making a code parser even as simple as avs's in an ape is (afaik) pretty hard to do. unfortunately for us ape's don't come with internal avs language support. but i do think a simple hueshifter that shifted at a constant rate would be pretty easy....
Zevensoft#
You could set up a basic assembler-like language for use in a APE with no more than about 20KB worth of code. The problem is whether people would figure it out. Hell, Commodore made an entire BASIC interpreter in 8KB, and on a CPU without any floating point or division/multiplication instructions.