easy? jit.lcd + swatch
Hey all, I’m pretty new at Jitter and I thought this part was going to be easy… but it seems I was wrong. I’m trying to get the color swatch to talk to jit.lcd or just the regular lcd object in Max so that I can select a color and then draw lines with it (using the mouse and the moveto + lineto commands). Here is my trouble:
I know the swatch can be manipulated by sending it either HSL values or ARGB values, right now I have it set up to receive HSL values. I also know there are a few converter objects out there like jit.hsl2rgb. However, how do I tell swatch what kind of values to output? What is color index – both jit.lcd and the max lcd expect this kind of data when you use the color $1 message, and it doesn’t seem to match up to hsl or rgb (I select a color in swatch, start drawing and it ends up being a different color in the LCD), so I don’t know what kind of converter to use. Also, would I have to make a one dimensional matrix out of the color data from swatch to use one of jitter’s converter objects? Say I have swatch output ARGB data, would I want to input that into jit.matrix 4 char 1 1 in order to have a converter object process it?
Thank you for any help at all, I’ve been looking everywhere for this!
PS I don’t know anything about openGL yet, but I could go read up on it if this task is easier in jit.gl.sketch.
I was puzzled by swatch as well, until I realized that it uses an RGBA colorspace, while jitter matrices use ARGB. To get the correct color in a jitter matrix you just need to do something like this:
----------begin_max5_patcher---------- 424.3ocuT9saCBBEF+Z8ofv0Ni.Z0s61ywRSiUsqzofQwnaM8ceBp8eQqZSi WHpvgy422mG7ntFbKuJJGB9.7EPS6ntllZJ4DZsuqAS7qBh8yUgAOPElokTV HuDZzrNuPDGID+lF0jHHzn9BrtcYVQBkUGfZ+n1IS8EA6oru2jEEHZ11JOSK CfMwQdyyRNtpd7bdngJ.3aO7FBdI2MUWkbrbxS55xAiIpGVTYcF6xmHpRQSM eA+.Pl.rIfXBrMGVqm4aGmIxo+oV.gqwuG4aOl7IqbUx+c4HdH46AuplL+DU MgelQ8i62YPuNmofMYuYWL2WHaFF5gY4ci15PvH4MjE4glm6bMO6Wm4IO8j3 KxnUCZZ0groKj41dM9oKK0oKGmG4PqblqC8LG7xKkP9v+gbWSxMRkLlTwtp1 .Dts2X.sRFWQp8Aior6+Sop1x4uUl47hrfNczcdEbo7gQ4BJyWP4rqBR55WE zdZXXjZ8tuzIzvTNkIZg.rtWSepLcW45mIzxhDYJH4tnLoJGYLl7VdlvSgIx xxDZJLgWVlrlBSnmjo5WNo+OSF7G+C -----------end_max5_patcher-----------
Thanks!!! Got it.
Forums > Jitter