Switching a bpatcher: loading new bpatcher from a file

Mar 1, 2008 at 5:55pm

Switching a bpatcher: loading new bpatcher from a file

Howdy,

I am reading Max Tutorial 46 + 47 to refresh my memory on Scripting but I cannot figure how to load a new bpatcher from a file. I see how to write the bpatcher to a file using thispatcher, but is there a command for the inverse?

Thanks!
Steve

#36136
Mar 2, 2008 at 1:45am

Not sure if this is what you mean… but this is from the tutorial…
Hope this helps.

#P window setfont “Fixedwidth Serif” 10.;
#P window linecount 3;
#P comment 156 42 171 1441802 2. click on the dump message to replace bpatch2 with bpatch1.;
#P window linecount 1;
#P message 192 82 38 1441802 write;
#P message 158 82 32 1441802 dump;
#N coll bpatch_replace;
#T flags 1 0;
#T 0 script delete mybpatcher;
#T 1 script new mybpatcher bpatcher 8 71 105 90 0 0 bpatch1 1;
#T 2 script connect num_topleft 0 mybpatcher 0;
#T 3 script connect num_topright 0 mybpatcher 1;
#T 4 script connect mybpatcher 0 num_bottom 0;
#P newobj 158 104 122 1441802 coll bpatch_replace;
#P window linecount 4;
#P message 19 225 343 1441802 script delete mybpatcher , script new mybpatcher bpatcher 8 71 105 90 0 0 bpatch2 1 , script connect num_topleft 0 mybpatcher 0 , script connect num_topright 0 mybpatcher 1 , script connect mybpatcher 0 num_bottom 0;
#P window linecount 1;
#N thispatcher;
#Q end;
#P newobj 19 289 73 1441802 thispatcher;
#B color 5;
#P number 8 166 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname num_bottom;
#P number 103 51 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname num_topright;
#P number 8 51 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname num_topleft;
#P window linecount 5;
#P comment 172 134 112 1441802 used colls to save screen space and reduce confusion when scripting.;
#P window linecount 2;
#P comment 20 198 198 1441802 1. click on the message box to replace bpatch 1 with bpatch2;
#P bpatcher 8 71 105 90 0 0 bpatch1.pat 1;
#P objectname mybpatcher;
#P connect 0 0 5 0;
#P connect 4 0 0 1;
#P connect 3 0 0 0;
#P connect 7 0 6 0;
#P fasten 8 0 6 0 163 192 365 192 365 282 24 282;
#P fasten 10 0 8 0 197 101 163 101;
#P connect 9 0 8 0;
#P window clipboard copycount 12;

#123780
Mar 2, 2008 at 2:01pm

—————————————————-
>how to load a new bpatcher from a file.
—————————————————-

Hi. Here it is:

#P bpatcher 116 83 274 196 0 0 1;
#P objectname mybpatcher;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 202 344 213 196617 script sendbox mybpatcher replace expr.help;
#P comment 115 68 158 196617 scripting name: mybpatcher;
#N thispatcher;
#Q end;
#P newobj 202 370 61 196617 thispatcher;
#P message 156 325 213 196617 script sendbox mybpatcher replace mtof.help;
#P comment 50 331 100 196617 try these ->;
#P connect 4 0 2 0;
#P connect 1 0 2 0;
#P window clipboard copycount 6;

ciao

#123781

You must be logged in to reply to this topic.