lcd move of text

May 20, 2010 at 7:17pm

lcd move of text

I’d like to know if it was possible to make some text moving in jit.lcd with sprintf and not with the message (clear, moveto $1 $2, ascii 23 45, bang…)
See my patch:

max v2;
#N vpatcher 0 44 1680 1046;
#P origin 0 4;
#P window setfont “Sans Serif” 20.;
#P comment 1113 312 183 196628 (x ; y) coordinates;
#P objectname [4];
#P comment 58 240 262 196628 Simple lcd move of text…;
#P objectname
[3];
#P window setfont “Sans Serif” 9.;
#P newex 933 65 159 196617 t b b b b b 23 30;
#P button 609 207 15 0;
#P newex 1024 469 62 196617 prepend set;
#P window linecount 3;
#P message 1026 558 101 196617 clear , moveto 44 30 , ascii 121 21 55 134 0 0 , bang;
#P window linecount 1;
#P newex 1209 418 51 196617 tosymbol;
#P newex 1065 344 27 196617 t b i;
#P newex 1024 437 203 196617 sprintf clear\, moveto %i %i\, %s\, bang;
#P newex 1072 410 61 196617 t b s;
#P message 632 630 69 196617 brgb 0 0 255;
#P message 632 606 92 196617 frgb 220 255 256;
#P user jit.pwindow 593 682 322 242 0 1 0 0 1 0;
#P newex 428 559 57 196617 qmetro 33;
#P objectname
[1];
#P newex 636 373 69 196617 prepend ascii;
#P newex 566 340 43 196617 jit.spill;
#P newex 625 312 99 196617 jit.matrix @adapt 1;
#P newex 548 291 58 196617 jit.textfile;
#P button 739 275 15 0;
#P newex 594 653 111 196617 jit.lcd 4 char 320 240;
#P toggle 408 528 15 0;
#P message 588 601 33 196617 clear;
#P number 1064 321 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 1028 322 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 1077 534 15 0;
#P button 1077 534 15 0;
#P newex 935 38 48 196617 loadbang;
#P newex 609 254 124 196617 jit.noise 1 char @dim 2 2;
#P window linecount 0;
#P newex 609 254 48 196617;
#P window setfont “Sans Serif” 20.;
#P window linecount 1;
#P comment 1099 527 549 196628 < < #P objectname
;
#P fasten 27 0 9 0 938 193 413 193;
#P fasten 9 0 16 0 413 551 433 551;
#P connect 11 0 12 0;
#P fasten 2 0 12 0 614 281 553 281;
#P fasten 13 0 14 0 630 334 571 334;
#P fasten 21 0 10 0 1029 553 599 553;
#P fasten 18 0 10 0 637 629 599 629;
#P fasten 19 0 10 0 637 649 599 649;
#P fasten 8 0 10 0 593 634 599 634;
#P fasten 16 0 10 0 433 652 599 652;
#P fasten 24 0 10 0 1031 625 599 625;
#P fasten 10 0 17 0 599 676 599 676;
#P fasten 27 2 26 0 986 144 614 144;
#P fasten 26 0 2 0 614 238 614 238;
#P fasten 12 0 13 0 553 310 630 310;
#P fasten 27 4 18 0 1034 597 637 597;
#P fasten 27 3 19 0 1010 626 637 626;
#P fasten 14 0 15 0 571 365 641 365;
#P fasten 27 1 11 0 962 178 744 178;
#P fasten 3 0 27 0 940 60 938 60;
#P fasten 22 0 21 0 1070 399 1029 399;
#P fasten 6 0 21 0 1033 387 1029 387;
#P fasten 20 0 21 0 1077 432 1029 432;
#P fasten 21 0 25 0 1029 461 1029 461;
#P fasten 25 0 24 0 1029 522 1031 522;
#P fasten 5 0 24 0 1082 553 1031 553;
#P fasten 27 5 6 0 1058 202 1033 202;
#P fasten 27 6 7 0 1082 201 1069 201;
#P fasten 7 0 22 0 1069 340 1070 340;
#P fasten 15 0 20 0 641 400 1077 400;
#P fasten 22 1 21 1 1087 399 1125 399;
#P connect 20 1 23 0;
#P fasten 23 0 21 2 1214 436 1221 436;
#P pop;

Thanks in advance.

Ad/

#50483
Jun 16, 2010 at 9:54am

you probably figured this out by yourself already, but here goes:

You were sending messages from springf to message box without a necessary bang to messasge box for output, but you were sending an unnecessary bang from springf to jit.lcd. I just changed that and the result:

– Pasted Max Patch, click to expand. –
#181107
Jun 17, 2010 at 6:33am

#181108
Jun 17, 2010 at 6:48am

Thank you for your response.
My point was to avoid message box and its unnessessary visualisation.
So I just wanted to put the output from sprintf into jit.lcd.
I still don’t understand why this doesn’t work…
Thx
Ad

#181109
Jun 18, 2010 at 5:18am

a message with a comma is not a single message, its several messages. You could use the trigger object to get this kind of multiple messages.
try instead of the [t b s] a [t bang s s clear] and two sprintf objects.
(I guess you are not (yet) on Max 5…)

Stefan

#181110
Jun 18, 2010 at 1:42pm

@Ad. Sorry for the misunderstanding!

#181111

You must be logged in to reply to this topic.