How to run through all the RGB colour values?

Oct 29, 2012 at 7:03pm

How to run through all the RGB colour values?

The question says it all!

i want to be able to get some way of running through them all individually?

heres my patch so far, its isn’t correct as it only get 1/4 of the possible values.

any help much appreciated.

Thanks!

– Pasted Max Patch, click to expand. –
#64993
Oct 29, 2012 at 7:50pm

Maybe you need to set the carry count flags on your counters to bang.

#234401
Oct 29, 2012 at 8:30pm

your patch looks too complicated…
this is how I would implement it… (sorry if I am not being helpful)

– Pasted Max Patch, click to expand. –
#234402
Oct 30, 2012 at 6:43am

Hi,

Thanks for your help Ahmet, your patch seems to have done the trick.

(Your right mine was a little complicated!)

Regards,

Oli

#234403
Oct 30, 2012 at 8:51am

@ahmet if you get chance would you mind annotating your patch, just so i can understand it a little.

Thanks!

#234404
Oct 30, 2012 at 9:45am

I don’t have Max installed on this computer, but I can just explain it.

It is actually pretty straight forward.

each uzi represents a single color plane of RGB.
uzi-B spits out values from 0 to 255.
each value of uzi-B triggers uzi-G to spit out values from 0 to 255.
and in turn each value of uzi-G triggers uzi-R to spit out values from 0 to 255.

values from uzi-B and uzi-G is collected in a [pack 0 0 0] as the second and third inlet argument.
values from uzi-R triggers the [pack] as it is the first inlet argument.

in the end you get a RGB list for every possible values…

I hope this helps (I can post an annotated patch later today).

#234405
Oct 30, 2012 at 7:04pm

Here is the patch with annotations. I also added a small proof of concept patch to help you better understand it.

– Pasted Max Patch, click to expand. –
#234406
Oct 30, 2012 at 11:19pm

you could also put the patch in debug mode and step through to better understand the process; control loops in max are always tricky to implement and get your head around (due to the unsuitability of data-flow model)

#234407
Nov 6, 2012 at 7:48pm

Thanks for the help everyone (sorry for the late reply)

I’m going to have a tinker with my patch see if i can get the result I’m after now that you guys have solved that little issue.

(might be back for more help later :p )

Kind Regards,

Oli

#234408

You must be logged in to reply to this topic.