How to simplify jit.gl.text with multiple inputs in different positions?

nex's icon

Hello jit world,

I would appreciate some hits to how I could simplify the following patch using just one jit.gl.text object instead of having one for each value.

:D

Max Patch
Copy patch and select New From Clipboard in Max.

phiol's icon

Hi nex

I have mentioned thathaving jit.gl.multiple work with jit.gl.text would be a great feature in the past.
here is the thread: https://cycling74.com/forums/word-snake-jit-gl-multiple-with-jit-gl-text-mode-3d-part2
Hope it will come in the next release or so.

In the mean time , the two solution would be to have your separate texts as separate textures that are reference in a jit.gl.multiple.
But a better faster solution would be to simply use poly~ and nest your jit.gl.text @mode 3d in there.
this should be fairly straightforward

let me know if you need help getting set up

phiol

phiol's icon

here this will get you started

it demonstrate 2 versions

instead of using unpack

you use listfunnel to index each values
OR
you can use zl.lookup

and then it demonstrates how to take advantage of thispoly~ instance index flag (1st outlet)
to dynamically set up each poly~ instance.

Max Patch
Copy patch and select New From Clipboard in Max.

hope this helps

phiol

phiol's icon

here you are, (I had time ;-) )

helping-nex.zip
zip
phiol's icon

forgot to include that , the whole point is that it's now
has a dynamic size

Max Patch
Copy patch and select New From Clipboard in Max.

nex's icon

Thank you so much!!!!! :D that is great and it's a bit step forward to developing more complex patches as I had checked those other threads but wasn't understanding how poly~ worked.

Just a lil question, I'm changing the font size value of jit.gl.text inside your texter, but is completely ignoring it...

nex's icon

Solved it! it was related to the mode 3d, changed it to 2d and now font size reacts
;)

phiol's icon

Geez man,
I sent a reply twice and c74's website did not update my reply. They were detailed too. >:-(

---
here is a nutshell of what I wrote

Exactly , I turned your text into a geo so it can be processed on the gpu.

to save a preset for each geo-text you can

1. use thispoly's indexnumber , divide it by it's same value to get a 0 then use a [+ ] to offset the size.
2. use pattrstorage and again use thispoly's index value to name each pattr object inside

the whole point of this, patch was to show you have to take advantage of a naming system
to control parameter in each instance.

In this case , thispoly give you your name (value in this situation), and from that
I was able to position each instance , fetch the correct slider, and now scale.

Naming systems is the way to go, when patching. You see that I also used it with the jit.anim.node

end note : This naming system should be more a part of Max patching system.
I have requested to the c74 team .

good luck

repost your results here :-)

phiol

nex's icon

Yup, i think i got it so far ^^

Max Patch
Copy patch and select New From Clipboard in Max.

And a screen capture after implemented in the visualiser

Screen-Shot-2017-03-13-at-17.17.16.png
png
phiol's icon

very cool!

Although I can't see you patch, since you're missing the poly~ files ;-)

Looks like a cool patch , congrats

phiol

nex's icon

Ups! here it goes.

Hope this thread helps future enquires ;)

textert.zip
zip