Forums > MaxMSP

Abstraction to create object


Ad.
July 28, 2009 | 4:33 pm

Hi all.
I’ve created a patch wich make some shortcuts to create objects and messages, thanks to "thispatcher scripting".
My problem is how to create objects in the patch where the abstraction thake place…

Here’s my patch.
Thanks for helping.

max v2;
#N vpatcher 0 44 1680 1046;
#P window setfont "Sans Serif" 14.;
#P comment 1106 609 100 196622 ctrl + w;
#P comment 1106 587 100 196622 ctrl + x;
#P window setfont "Sans Serif" 9.;
#P comment 1023 591 80 196617 create message;
#P newex 833 339 62 196617 prepend set;
#P message 833 317 216 196617 script new message $1 $2 48 196617;
#P newex 757 217 30 196617 – 40;
#P newex 1201 128 38 196617 sel 24;
#P user gswitch 1201 90 41 32 0 0;
#P newex 1156 128 38 196617 sel 23;
#P user gswitch 1156 90 41 32 0 0;
#P message 1201 33 65 196617 interval 100;
#P newex 1201 60 66 196617 modifiers;
#P newex 1156 33 40 196617 key;
#P message 763 609 256 196617 script new
newex 1064 571 48 196617;
#P newex 624 339 62 196617 prepend set;
#P newex 723 236 43 196617 pak 0 0;
#P message 733 145 30 196617 zero;
#P message 766 145 34 196617 reset;
#P newex 721 72 62 196617 metro 200;
#P newex 733 98 40 196617 key;
#P newex 733 121 52 196617 sel 48 49;
#P newex 721 173 193 196617 mousestate;
#B color 5;
#P newex 722 23 50 196617 loadbang;
#P message 624 317 207 196617 script new
newex $1 $2 48 196617;
#N thispatcher;
#Q end;
#P newobj 763 635 61 196617 thispatcher;
#P message 763 591 256 196617 script new
message 1064 571 48 196617;
#P comment 1023 609 62 196617 create objet;
#P fasten 11 0 3 0 728 285 629 285;
#P connect 3 0 12 0;
#P fasten 4 0 8 0 727 56 726 56;
#P connect 9 0 5 0;
#P connect 10 0 5 0;
#P connect 8 0 5 0;
#P fasten 5 1 11 0 771 213 728 213;
#P connect 7 0 6 0;
#P connect 6 0 10 0;
#P connect 21 0 11 1;
#P fasten 5 2 21 0 816 203 762 203;
#P fasten 20 0 1 0 1206 255 768 255;
#P fasten 23 0 1 0 838 480 768 480;
#P fasten 18 0 13 0 1161 377 768 377;
#P fasten 12 0 13 0 629 480 768 480;
#P connect 1 0 2 0;
#P connect 13 0 2 0;
#P connect 6 1 9 0;
#P fasten 11 0 22 0 728 285 838 285;
#P connect 22 0 23 0;
#P fasten 15 3 17 0 1248 85 1161 85;
#P connect 17 0 18 0;
#P fasten 14 0 17 2 1161 84 1191 84;
#P connect 4 0 16 0;
#P fasten 16 0 15 0 1206 52 1206 52;
#P fasten 15 3 19 0 1248 84 1206 84;
#P connect 19 0 20 0;
#P fasten 14 0 19 2 1161 88 1236 88;
#P pop;

Ad.



Ad.
July 28, 2009 | 7:52 pm

found it by myself… 
just putting thispatcher object int the patch…
Sorry for noise !

Ad


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