Forums > Jitter

route scale from jit.gl.videoplane

June 2, 2008 | 8:23 pm

hi

Is there a way to route scale from a jit.gl.videoplane as position or rotation can be routed from a jit.gl.handle (see example patch below)? I see I can send a getscale message and I could do this repeatedly as I feed scale in but it seems a little bit possibly inefficent or am I completely wrong?

a+
gar

max v2;
#N vpatcher 263 88 1063 589;
#P origin 49 0;
#P window setfont "Gill Sans" 10.;
#P comment 314 265 33 278003722 Angle;
#P comment 467 265 15 278003722 Z;
#P comment 420 265 15 278003722 Y;
#P comment 373 265 15 278003722 X;
#P window setfont "Sans Serif" 9.;
#P flonum 455 279 33 9 -1. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 408 279 33 9 -1. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 361 279 33 9 -1. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 314 279 33 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Gill Sans" 10.;
#P comment 568 226 33 278003722 Angle;
#P window linecount 2;
#P comment 567 330 141 278003722 This remembers the rotation of the videoplane for the presets.;
#P window linecount 1;
#P comment 721 226 15 278003722 Z;
#P comment 674 226 15 278003722 Y;
#P comment 627 226 15 278003722 X;
#P window setfont "Sans Serif" 9.;
#P message 697 240 39 196617 set $1;
#P message 650 240 39 196617 set $1;
#P message 603 240 39 196617 set $1;
#P message 556 240 39 196617 set $1;
#P newex 509 312 198 196617 pak rotate 0. 0. 0. 1.;
#P flonum 704 281 33 9 0 0 160 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 657 281 33 9 0 0 160 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 610 281 33 9 0 0 160 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 563 281 33 9 0 0 160 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 556 186 65 196617 route rotate;
#P newex 556 206 151 196617 unpack 1. 1. 1. 1.;
#P newex 337 404 160 196617 jit.gl.handle preview @radius 0.7;
#P newex 273 152 32 196617 print;
#P message 36 74 47 196617 getscale;
#P newex 335 120 32 196617 print;
#P newex 272 120 60 196617 route scale;
#P newex 36 94 246 196617 jit.gl.videoplane preview @scale 0.548 0.421 0.548;
#B color 5;
#P user panel 299 255 201 51;
#X brgb 255 255 255;
#X frgb 255 25 133;
#X border 5;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 299 241 100 196617 use this as interface;
#P connect 5 0 2 0;
#P connect 2 1 3 0;
#P connect 3 0 6 0;
#P connect 2 1 4 0;
#P fasten 14 0 7 0 514 396 342 396;
#P fasten 7 0 9 0 342 431 504 431 504 180 561 180;
#P connect 9 0 8 0;
#P connect 8 0 15 0;
#P fasten 10 0 14 1 568 298 561 298;
#P connect 24 0 14 1;
#P connect 15 0 14 1;
#P fasten 15 0 10 0 561 279 568 279;
#P connect 8 1 16 0;
#P fasten 11 0 14 2 615 298 608 298;
#P connect 25 0 14 2;
#P connect 16 0 14 2;
#P fasten 16 0 11 0 608 279 615 279;
#P connect 8 2 17 0;
#P fasten 12 0 14 3 662 298 655 298;
#P connect 26 0 14 3;
#P connect 17 0 14 3;
#P fasten 17 0 12 0 655 279 662 279;
#P connect 8 3 18 0;
#P fasten 13 0 14 4 709 298 702 298;
#P connect 27 0 14 4;
#P connect 18 0 14 4;
#P fasten 18 0 13 0 702 279 709 279;
#P pop;


June 3, 2008 | 11:22 am

I fail to see why you would need to constantly get the scale for videoplane.
If scale is changing then it must be a value that you are setting and
already have access to. Why bother questioning the values again? The issue
with gl.handle is different because you might be changing the rotation
values through mouse movements and want to recall a setting at a particular
moment in time. Or have I missed something that you are trying to achieve?

pelado

> Is there a way to route scale from a jit.gl.videoplane as position or
> rotation can be routed from a jit.gl.handle (see example patch below)? I
> see I can send a getscale message and I could do this repeatedly as I feed
> scale in but it seems a little bit possibly inefficent or am I completely
> wrong?
>
> a+
> gar
>


Viewing 2 posts - 1 through 2 (of 2 total)