jit.textfile adds characters that are not in the used text file

Thomas's icon

I have a very short text file saying: Please step on the pedal to continue with the last four repetitions of the same melody.
When I print this onto the screen using jit.textfile and jit.gl.text extra characters are presented on the screen.
It would look for example like this:
Please step on the pedal to continue with the last four repetitions of the same melody.
z

or like this:
Please step on the pedal to continue with the last four repetitions of the same melody.
0=£

or like this:
Please step on the pedal to continue with the last four repetitions of the same melody.
ZTUM

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

Here is a sample patch that recreates the problem and I have also attached the text file. I tried to use the correct format in the text file (plain text saved as ASCII), but maybe I missed something.

Thanks,
Thomas

instruction151.txt
txt
Rob Ramirez's icon

hi thomas.

thanks for the patch. this is a problem with jit.gl.text that i was finally able to isolate and fix recently.
for now, the workaround is to add an extra blank line to your jit.textfile at the end of the file. you may have to adjust the vertical alignment as well.

sorry for the inconvenience.

Thomas's icon

Hej Rob,

Thanks a lot for the quick answer. The workaround is perfectly fine.
I have just noticed another issue though, which might be related to the same problem in git.gl.text.

Some of my instructions are longer and I noticed that letters or parts are missing or seem to be turned into line breaks.

The English part should say:

Part 1 / 4

In this part you will play eight simple melodies.
Whenever you hear four metronome beats they are meant to count you in. Whenever the metronome counts you in, please play the displayed melody in the tempo of the metronome.

A new melody will automatically be displayed after two repetitions.
Please ask the experimenter if you have any questions.
If everything is clear, please proceed by pressing the pedal.

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

But as you can see in the screenshot parts are missing.
I'll include here the same patch with a changed read file name and attach the text file.

Thanks,
Thomas

instruction33.txt
txt
Screen-Shot-2015-11-05-at-21.48.15-2.png
png
Rob Ramirez's icon

possibly the same issue. i got the go ahead to proved a public beta version of jit.gl.text that fixes these issues. i'll post back here when that's ready to go.

Rob Ramirez's icon

hello Thomas.

attached to this message is a new version of the jit.gl.text object for you to try out. this is for the Mac, but let me know if you need a windows version.

in order to install, follow these steps:
1 - locate your Max 7 app (/Applications/Max 7
2 - right-click on the app and select "Show Package Contents" from the menu
3 - navigate to Contents/Resources/C74/externals/jitter/
4 - unzip the attached jit.gl.text object, and place it inside the above folder, overwriting the existing object

please reply back here to confirm that your issues are fixed with this update.

for future reference, this update is only applicable to Max version 7.0.6 and earlier.

jit.gl_.text_.mxo_.zip
zip
Thomas's icon

Hej Rob,

Mac is fine. Just noticed that I didn't even mention my OS in the original post. Sorry about that.

Yesterday, I figured out a workaround for the missing lines/characters problem I described in my first reply to you.
So here are two fixes for the current version of the git.gl.text object:
- additional characters in the end: insert an empty line at the end of your document as Rob described in his reply from Nov. the 5th.
- lines or parts of sentences missing: check for empty spaces before line breaks and delete them.

e.g.:
..... this is the end of a sentence.[space][linebreak]
change this to:
..... this is the end of a sentence.[linebreak]

I have to admit that I am a bit hesitant to test your git.gl.text version, as I am running experiments tomorrow and everything finally works,
but I am too curious myself..
I will let you know whether it worked.

Thanks for the quick release of the new version of git.gl.text!

Thomas's icon

Hej Rob,

looks good!
Not one of the two issues shows up with the new version of git.gl.text.

Thanks and let me know if you need more detailed feedback,
Thomas

joumik's icon

wow ! ,
that also fixed another problem i had ! (randomnly adding characters ...)
cool .