Expression needed

May 3, 2009 at 4:47pm

Expression needed

Hi there

I need an expression that enables three continuously changing values to always add up to 1.

Basically, I have the swatch object, and want to be able to do a sweep through the colours with the slider object. I have the pack object going into the swatch object and know I need three float values going into it for the RGB values but this is as far as I’ve got!

Is there a simple way to do this?

Many thanks,
Jessica.

#43647
May 3, 2009 at 5:45pm

The start of your question sounds like you are talking about normalizing an array. What you want is something like (RGB positions are screwed up here but easy to fix):

– Pasted Max Patch, click to expand. –
#156614
May 3, 2009 at 5:46pm

That’s actually perfect. Thank you so much!

#156615

You must be logged in to reply to this topic.