[edit] jit.gl.sketch object problem with value greater than $9
Hi everyone,
The problem, I'm using a text object to send drawing instructions to a jit.gl.sketch object.
So far so good, I want to send in over a 100 values generated by a jit.matrix.
This gets unrolled into a message list with jit.spill.
My jit.gl.sketch object has this inside and I can't go past $9
reset,
glcolor 1 1 1 1,
glbegin line_loop,
glvertex $1 $2,
glvertex $3 $4,
glvertex $5 $6,
glend
glbegin line_loop,
glvertex $3 $4,
glvertex $5 $6,
glvertex $7 $8,
glend
glbegin line_loop,
glvertex $5 $6,
glvertex $7 $8,
glvertex $9 $10,
glend
glflush
Is there a way to go above 9 variables in jit.gl.sketch ?? If not then its severely limiting if you want to build a big complex patch.
How can I fix this problem,I realize after going through the forums I that Max can't have a two digit number with $.
I'd like to make EVERYTHING for my jit.gl.sketch object work in one text file otherwise It'll become a very messy patch.
Any and all help appreciated.
Messagebox can handle $1...$9. No more. Use javascript (to generate messages from the list) or rearrange your patch.
Hi Yaniki, Yes I know that. Read my post and you can see that I typed that in. :)
I've never programmed with Javascript so I'd rather find another way that uses the Max enviroment.
Like I said, if possible I'd rather do all my variables in the text object so I can keep a good overview of everything.
not only messagebox, whole max. :)
Yeah Roman ;-) Maybe a daft question, but why is there such a limitation ??
In processing I can declare over a thousand variables and theres no problem whatsoever !
I still cannot understand why Max can't do this.
But then again I'm not a programmer that works with pure code.
check out the following tutorial and example patch:
Max 6.1/examples/jitter-examples/javascript/render/jittergltest-example.maxpat
Hi Rob , yeah, I already saw that patch but I still see the limitation that jit.gl.sketch (or max in general) can't go higher than $9. The solution will probably have nothing to do with jit.gl.sketch.
After banging my head against the wall with message boxes, pack objects, zl objects i'll admit defeat on this one, I get it to work but the trainwreck of so many objects on the screen is not at all an efficient way to do it, plus it stops me handling large amounts of data like a jit.matrix can.
Could I get around this by declaring variables in Max like in processing ? If so what would be the most efficient way to get this into jit.gl.sketch ??
I just feel that the "not higher than $9" problem is a very simple thing stopping me doing a lot in Max.
:(