Focus and jit.cellblock: newbie question

Dec 8, 2006 at 5:39pm

Focus and jit.cellblock: newbie question

Hi,

I’m trying to send a jit.cellblock object a message (such as select 1 2) so that it will send the value it holds at 1,2 (such as C:/DataForMax/sand.mov) to a jit.qt.movie object.

I can do this, but I can only get cellblock to send the value for whichever item has focus. I can change the value within any specified cellblock cell using set. But I can’t seem to use select to cause a specified cell to send its value…unless it is already clicked by hand (mouse click) and so focused.

I don’t want to have to use the mouse to give focus to the cell that holds the value I want to send. Is there a way to send cellblock a message that will change the focus from cell to cell?

Thanks for any help.

Robert

#29107
Dec 8, 2006 at 6:13pm

#90156
Dec 8, 2006 at 9:25pm

I tried what you’re talking about. If jit.cellblock is set to Single Cell Select, you just send it select $1 $2 messages and the contents are sent out the left outlet, regardless of which cell is highlighted, or whether the cellblock has focus. If jit.cellblock is set to No Selection this doesn’t work (I had thought it would but apparently not).

Even though select $1 $2 highlights that cell it doesn’t need to be set beforehand with the mouse or anything.

Not sure if that helps…

–CJ

#90157
Dec 9, 2006 at 7:49am

Hello,

Thanks for your replies.
As I noted, I’m a beginner with Max. I’m hoping I’m providing the patch correctly.

Here is a text of my patch. I’ve created a number of toggles, each to either set a value in a cellblock cell, or to select the value and send it to a qt file and window.

My goal is to send messsages to the cellblock to change the file that is loaded into the qt window.

The patch follows.
Thanks again
R Edgar

max v2;
#N vpatcher 15 55 1062 648;
#P toggle 283 99 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 165 414 110 9109513 jit.window Smog 320 240;
#P newex 168 368 91 9109513 jit.qt.movie 320 240;
#P newex 98 290 32 9109513 metro;
#P newex 261 285 26 9109513 print;
#P newex 136 207 74 9109513 receive myVals;
#P toggle 67 246 15 0;
#P toggle 293 147 15 0;
#P toggle 599 62 15 0;
#P toggle 629 57 15 0;
#P toggle 377 68 15 0;
#P toggle 266 33 15 0;
#P number 601 496 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 523 494 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 674 514 63 9109513 send myVals;
#P newex 668 456 62 9109513 prepend read;
#P newex 540 452 54 9109513 unpack 0 0;
#P newex 550 403 44 9109513 zl slice 2;
#P user jit.cellblock 494 178 1041 384 139 9 3 3 176 17 0 1 1 1 1 1 1 1 1 0 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 4 0 0 0;
#X set 1 1 C:/DataForMax/sand2RE.mov;
#X set 1 2 C:/DataForMax/sand2RE.mov;
#P message 658 128 167 9109513 set 1 1 C:/DataForMax/sand2RE.mov;
#P message 658 88 209 9109513 set 1 1 C:/DataForMax/sand_room/sand.390.jpg;
#P message 412 81 167 9109513 set 1 2 C:/DataForMax/sand2RE.mov;
#P message 309 42 209 9109513 set 1 2 C:/DataForMax/sand_room/sand.390.jpg;
#P newex 316 191 49 9109513 select 1 2;
#P newex 324 148 49 9109513 select 1 1;
#P connect 18 0 21 0;
#P connect 22 0 23 0;
#P connect 21 0 22 0;
#P connect 19 0 22 0;
#P connect 19 0 20 0;
#P connect 13 0 2 0;
#P connect 17 0 1 0;
#P connect 24 0 0 0;
#P connect 14 0 3 0;
#P connect 2 0 6 0;
#P connect 1 0 6 0;
#P connect 0 0 6 0;
#P connect 3 0 6 0;
#P connect 4 0 6 0;
#P connect 5 0 6 0;
#P connect 8 0 11 0;
#P connect 7 0 8 0;
#P connect 6 0 7 0;
#P connect 8 1 12 0;
#P connect 15 0 4 0;
#P connect 16 0 5 0;
#P connect 7 1 9 0;
#P connect 9 0 10 0;
#P pop;

#90158
Dec 9, 2006 at 9:40am

hi,

not sure if I got your problem, but this might help you a bit anyway
cheers
Falk

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 706 31 48 196617 loadbang;
#P message 188 89 92 196617 makes some sense;
#P button 187 69 15 0;
#P toggle 292 27 15 0;
#P message 292 50 107 196617 makes more sense $1;
#P toggle 187 26 15 0;
#P message 187 49 101 196617 does not make sense;
#P message 390 108 23 196617 1 2;
#P toggle 15 84 15 0;
#P newex 6 50 48 196617 loadbang;
#P message 357 106 23 196617 1 1;
#P message 42 185 31 196617 1 $1;
#P newex 39 160 27 196617 + 1;
#P toggle 39 141 15 0;
#P newex 39 112 58 196617 metro 500;
#P message 699 456 283 196617 C:/DataForMax/sand_room/sand.390.jpg;
#P toggle 217 101 15 0;
#P window linecount 2;
#P newex 34 356 110 196617 jit.window Smog 320 240;
#P newex 34 319 91 196617 jit.qt.movie 320 240;
#P window linecount 1;
#P newex 32 292 32 196617 metro;
#P newex 175 325 90 196617 print;
#P newex 75 287 157 196617 receive myVals;
#P toggle 36 268 15 0;
#P number 535 498 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 457 496 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 608 516 63 196617 send myVals;
#P window linecount 2;
#P newex 605 479 62 196617 prepend read;
#P window linecount 1;
#P newex 474 454 54 196617 unpack 0 0;
#P window linecount 2;
#P newex 484 405 44 196617 zl slice 2;
#P user jit.cellblock 384 179 931 385 139 9 3 3 176 17 0 1 1 1 1 1 1
1 1 0 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1
0 4 0 0 0;
#X set 1 1 C:/DataForMax/sand_room/sand.390.jpg;
#X set 1 2 C:/DataForMax/sand2RE.mov;
#P message 517 57 167 196617 set 1 1 C:/DataForMax/sand2RE.mov;
#P message 513 90 209 196617 set 1 1 C:/DataForMax/sand_room/sand.
390.jpg;
#P message 726 89 167 196617 set 1 2 C:/DataForMax/sand2RE.mov;
#P message 725 60 209 196617 set 1 2 C:/DataForMax/sand_room/sand.
390.jpg;
#P window linecount 1;
#P newex 218 120 107 196617 select 1 1;
#P window linecount 13;
#P comment 19 410 327 196617 I’m trying to send a jit.cellblock
object a message (such as select 1 2) so that it will send the value
it holds at 1 , 2 (such as C:/DataForMax/sand.mov) to a jit.qt.movie
object. I can do this , but I can only get cellblock to send the
value for whichever item has focus. I can change the value within any
specified cellblock cell using set. But I can’t seem to use select to
cause a specified cell to send its value…unless it is already
clicked by hand (mouse click) and so focused. I don’t want to have to
use the mouse to give focus to the cell that holds the value I want
to send. Is there a way to send cellblock a message that will change
the focus from cell to cell?;
#P window linecount 1;
#P newex 704 433 62 196617 prepend set;
#P window linecount 6;
#P comment 48 25 127 196617 toggle is an integer 0 or 1 in
kombination with a messagebox it only makes sense if there is a $1
within the msgbox not like you do;
#P window linecount 1;
#P comment 352 124 97 196617 1 1would be enough;
#P connect 38 0 8 0;
#P connect 38 0 5 0;
#P connect 36 0 37 0;
#P connect 17 0 20 0;
#P connect 17 0 18 0;
#P connect 35 0 34 0;
#P connect 33 0 32 0;
#P connect 31 0 9 0;
#P connect 29 0 30 0;
#P connect 30 0 24 0;
#P connect 28 0 9 0;
#P connect 10 1 2 0;
#P connect 25 0 26 0;
#P connect 26 0 27 0;
#P connect 27 0 9 0;
#P connect 24 0 25 0;
#P connect 2 0 23 0;
#P connect 12 0 13 0;
#P connect 11 1 15 0;
#P connect 9 0 10 0;
#P connect 10 0 11 0;
#P connect 11 0 14 0;
#P connect 8 0 9 0;
#P connect 7 0 9 0;
#P connect 6 0 9 0;
#P connect 4 0 9 0;
#P connect 5 0 9 0;
#P connect 22 0 4 0;
#P connect 19 0 20 0;
#P connect 20 0 21 0;
#P connect 16 0 19 0;
#P window clipboard copycount 39;

Am 09.12.2006 um 08:49 schrieb Robert Edgar:

>
> Hello,
>
> Thanks for your replies.
> As I noted, I’m a beginner with Max. I’m hoping I’m providing the
> patch correctly.
>
> Here is a text of my patch. I’ve created a number of toggles, each
> to either set a value in a cellblock cell, or to select the value
> and send it to a qt file and window.
>
> My goal is to send messsages to the cellblock to change the file
> that is loaded into the qt window.
>
> The patch follows.
> Thanks again
> R Edgar
>
> max v2;
> #N vpatcher 15 55 1062 648;
> #P toggle 283 99 15 0;
> #P window setfont “Sans Serif” 9.;
> #P newex 165 414 110 9109513 jit.window Smog 320 240;
> #P newex 168 368 91 9109513 jit.qt.movie 320 240;
> #P newex 98 290 32 9109513 metro;
> #P newex 261 285 26 9109513 print;
> #P newex 136 207 74 9109513 receive myVals;
> #P toggle 67 246 15 0;
> #P toggle 293 147 15 0;
> #P toggle 599 62 15 0;
> #P toggle 629 57 15 0;
> #P toggle 377 68 15 0;
> #P toggle 266 33 15 0;
> #P number 601 496 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P number 523 494 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 674 514 63 9109513 send myVals;
> #P newex 668 456 62 9109513 prepend read;
> #P newex 540 452 54 9109513 unpack 0 0;
> #P newex 550 403 44 9109513 zl slice 2;
> #P user jit.cellblock 494 178 1041 384 139 9 3 3 176 17 0 1 1 1 1 1
> 1 1 1 0 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1
> 1 1 0 4 0 0 0;
> #X set 1 1 C:/DataForMax/sand2RE.mov;
> #X set 1 2 C:/DataForMax/sand2RE.mov;
> #P message 658 128 167 9109513 set 1 1 C:/DataForMax/sand2RE.mov;
> #P message 658 88 209 9109513 set 1 1 C:/DataForMax/sand_room/sand.
> 390.jpg;
> #P message 412 81 167 9109513 set 1 2 C:/DataForMax/sand2RE.mov;
> #P message 309 42 209 9109513 set 1 2 C:/DataForMax/sand_room/sand.
> 390.jpg;
> #P newex 316 191 49 9109513 select 1 2;
> #P newex 324 148 49 9109513 select 1 1;
> #P connect 18 0 21 0;
> #P connect 22 0 23 0;
> #P connect 21 0 22 0;
> #P connect 19 0 22 0;
> #P connect 19 0 20 0;
> #P connect 13 0 2 0;
> #P connect 17 0 1 0;
> #P connect 24 0 0 0;
> #P connect 14 0 3 0;
> #P connect 2 0 6 0;
> #P connect 1 0 6 0;
> #P connect 0 0 6 0;
> #P connect 3 0 6 0;
> #P connect 4 0 6 0;
> #P connect 5 0 6 0;
> #P connect 8 0 11 0;
> #P connect 7 0 8 0;
> #P connect 6 0 7 0;
> #P connect 8 1 12 0;
> #P connect 15 0 4 0;
> #P connect 16 0 5 0;
> #P connect 7 1 9 0;
> #P connect 9 0 10 0;
> #P pop;
>
>

#90159
Dec 9, 2006 at 9:29pm

Thanks, Falk.
I was making three mistakes:
1. I misunderstood the “select” function.
2. I misunderstood the “toggle” function.
3. I didn’t realize that you could set the focus of the cellblock simply by sending it two numbers.

We have it working now. Our intention is to replace the inputs with signals from MIDI sources…but we wanted to understand how the output and selection worked first, before we got into MIDI details.

Thanks very much for your help.

Robert

#90160

You must be logged in to reply to this topic.