More than one line with jit.gl.text2d?

Dalmazzo's icon

Hi all,
I have a simple question, but i need to ask.
I’m displaying text using [jit.gl.text2d] and I’m calling files from a folder using the object [text]. The text files are just comments that somebody previously type using [textedit].
By problem is that i can’t find the way to show the text in more that one line. How can I control the numbers of lines that [jit.gl.text2d] displays? i know that it could be really simple, but I missing this step.
Thanks for the help
David

Ben Bracken's icon

You might want to take a look at jit.textfile and jit.fprint. Regardless, you will want to make sure that you are saving your carriage returns. With textedit, you will want to be sure you are either appending carriage returns or outputting the contents as one symbol (output mode attribute set to 1).

If you are still having trouble, post a simple patch.

-Ben

Dalmazzo's icon

Hi,
I was trying to have more lines using jit.textfile but I don't get it.
Here is part of the patch, I just trying to put the text into the output window. When I have long text I don't find the way to organize it in a column.
Thanks for all
David

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

////////////////////////////////////////////////////////

[MOD - reposted with copy compressed]

Ben Bracken's icon

For posting patches, check out 'copy compressed' in the Edit menu. Try something like this:

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

Dalmazzo's icon

Hi Ben,

It's perfect for me this example.
Thanks a lot for the help!
David

Dalmazzo's icon

Hi Ben,
It's perfect the example, this is what I'm searching for.
Thanks a lot for the help!
David

Ad.'s icon

It's pretty weird...
I can not open the max 5 Patch:

clipboard JSON conversion
',' or '}' character expected after value for key 'linecount': line=182, char=24, text='...his isnseveralnlinesnof jitterntext", "linecount" : 5 {'

Ad.

Ad.'s icon

May someone attach the Ben's max 5 patch ?
I've upgraded my soft but it still doesn't work.

Thx;

Ad.

Rob Ramirez's icon

can you try this version?
i've cleared the text object, which i think might've caused you the problems.

also, can you post your system info?

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

Ad.'s icon

It Does work !!!
Thanks a lot !!

Adrien

Dg's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Hello,
It is regular: text2d needs to receive first a "text somewords" before the matrix works as expected?

Dg's icon

Hi,
I insist, what is the issue with [jit.gl.text2d].
For example the Recipe 19: Tannenbaum :https://cycling74.com/tutorials/jitter-recipes-book-2/
It does not work until you send a "text" message to text2d.

MBP 2.93GHZ 4Go 1067MHz DDR3 9400M+9600MGT
MaxMSPJitter 5.1.5

Dg's icon

Works with Max4, no satisfying results with Max5. What am missing?

Ben Bracken's icon

Hi Kyred,

Thanks for pointing this out. Its either a bug or a doc error, I'll figure out which.

-Ben

Ben Bracken's icon

This should be fixed for the next update, thanks!

-Ben

efe's icon

i was having the same issue with Recipe 28

efe's icon

is there any temporal solution for this problem when using multiple lines of text?, at least until the next update!
thanks!

Ben Bracken's icon

Not sure what you mean. You should be able to use multiple lines of text, just send any 'text' message before sending it matrix data.

But maybe I don't understand your problem. Post a patch?

-Ben

Julien Bayle's icon

can I render a jit.qt.movie to the same instance of jit.pwindow ?

still looking for another way to display subtitles parsed from my srt files.

the main target: using more than one subtitle at a time (one on each line)

Masa's icon

[delete this please]

Masa's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I built a real-time typing visualiser with multiple lines feature, based on Rob's patch.
You have a weird behaviour when you 'delete' a 'space' or a letter, and when you hit 'return' after a 'space'.
I could not find a solution unfortunately.

Masa's icon
Max Patch
Copy patch and select New From Clipboard in Max.

With the previous patch, I tried to make Jitter Tutorial 29 (Using The Alpha Channel) OpenGL-based.
However I failed because jit.gl.text writes solid letters upon my alpha-blended letters. Is there any way to avoid that?
Thanks a lot,
Masa

vichug's icon

are the colors mapped as rgba instead of argb when they are in a texture ?
also, when i connect the output of the jit.gl.pix under the jit.gl.text to a jit.pwindow, it's all black, no sign of letters. Is that normal ?

Rob Ramirez's icon

hi masa, check my post here for a possible fix for your first problem:
https://cycling74.com/forums/jit-textfile-adds-characters-that-are-not-in-the-used-text-file

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

for your second problem, you must use jit.gl.node (with @erase_color 0 0 0 0) to capture the text and create the alpha mask: