Forums > MaxMSP

Bugreport: encapsulate and connect outlets on load

April 25, 2006 | 11:00 am

Hi, I am pretty sure this is unwanted behaviour:

1) open the patch below, note that the messageboxes contain numbers 1 to 4
2) encapsulate the indicated part of the patch
3) save and close the patch
4) open the patch and note that the messageboxes now contain numbers 4 to 1!

It seems to me that the outlets are connected differently on load when they are on exactly the same vertical position.

max v2;
#N vpatcher 195 170 492 392;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 33 100 14 196617 4;
#P message 33 81 14 196617 3;
#P message 33 62 14 196617 2;
#P message 33 43 14 196617 1;
#N vpatcher 367 209 500 347;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 14 52 62 196617 prepend set;
#P window linecount 0;
#P newex 14 31 60 196617 loadmess 4;
#P outlet 14 74 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P pop;
#P newobj 90 100 37 196617 p four;
#N vpatcher 367 209 500 347;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 14 52 62 196617 prepend set;
#P window linecount 0;
#P newex 14 31 60 196617 loadmess 3;
#P outlet 14 74 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P pop;
#P newobj 90 81 42 196617 p three;
#N vpatcher 367 209 500 347;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 14 52 62 196617 prepend set;
#P window linecount 0;
#P newex 14 31 60 196617 loadmess 2;
#P outlet 14 74 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P pop;
#P newobj 90 62 35 196617 p two;
#N vpatcher 367 209 500 347;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 14 52 62 196617 prepend set;
#P window linecount 0;
#P newex 14 31 60 196617 loadmess 1;
#P outlet 14 74 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P pop;
#P newobj 90 43 33 196617 p one;
#P comment 89 124 81 196617 Encapsulate this;
#P user panel 84 38 105 107;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 2 0 6 0;
#P connect 3 0 7 0;
#P connect 4 0 8 0;
#P connect 5 0 9 0;
#P pop;

Mac OS 10.4.6
Max 4.5.6

Cheers,
Mattijs


April 25, 2006 | 11:16 am

Great bug, thanks! I can confirm in Max 4.5.7 and will attempt to fix.

jb

Am 25.04.2006 um 13:00 Uhr schrieb Mattijs Kneppers:
> Hi, I am pretty sure this is unwanted behaviour:


April 26, 2006 | 9:15 am

Jeremy Bernstein wrote:
> Great bug, thanks! I can confirm in Max 4.5.7 and will attempt to fix.

If you are at it, please consider two enhancenments, one obvious, one
for further enhanced convenience.

The obvious will probably correct the reported bug:

As the bug example shows, the inlets are hidden, in more complex
patchers you do not know how many inplets are created (see request 2)

Solution: put all the inlets above the highest object in a single row
according to their bang order (y-coordinate the same for all inlets).
If possible directly above the first connected object (x-coordinate).

The same for outlets but below the lowest object (y-coordinate).

This will lead to readable and understandable encapsulations.

For the second request there is a simple example patch:

If you deencapsulate the left patcher and simply encapsulate it again,
it will not be that same. I desperately want it to be the same, for
simple reasons:

If I have two sources going into one destination inside a subpatcher,
its just a logically clear coment-like construction. It does not require
a second input, it should not have a second input as this second input
is internally identicall with the first!

The patcher need an internal logic, not an external…
The right example creates a redundant cord to the rightmost inlet,
beside cluttering the internal patch into an unreadable state (see
request 1) it creates also too many inlets.
The most left inlet most likely is the most important, just use this.

I know we did discuss that already, but I haven’t heard any reasonable
argument for the way it is now and hope my examples will show the
evidence of my point of view…

By the way, I LOVE encapsulation, I can’t express it loud enough, I hope
my rant will enhance it even more:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 210 319 810 719;
#P window setfont "Sans Serif" 9.;
#P number 50 95 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 50 73 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 50 50 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P inlet 50 30 15 0;
#P inlet 68 30 15 0;
#P outlet 50 115 15 0;
#P outlet 68 115 15 0;
#P outlet 86 115 15 0;
#P connect 4 0 5 0;
#P connect 4 0 6 0;
#P connect 3 0 6 0;
#P connect 4 0 7 0;
#P connect 7 0 2 0;
#P connect 6 0 1 0;
#P connect 5 0 0 0;
#P pop;
#P newobj 486 90 90 196617 p;
#P number 526 51 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 566 171 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 526 171 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 486 171 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 466 51 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 328 51 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 368 171 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 328 171 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 288 171 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 288 135 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 288 113 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 288 90 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 268 51 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 20 74 324 351;
#P window setfont "Sans Serif" 9.;
#P number 144 122 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 106 122 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 68 122 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P outlet 144 205 15 0;
#P outlet 68 206 15 0;
#P inlet 144 58 15 0;
#P inlet 68 59 15 0;
#P connect 0 0 4 0;
#P connect 4 0 2 0;
#P connect 0 0 5 0;
#P connect 1 0 6 0;
#P connect 6 0 3 0;
#P connect 5 0 3 0;
#P pop;
#P newobj 121 106 50 196617 p simple;
#P number 161 162 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 121 162 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 161 70 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 121 70 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 3;
#P comment 13 103 100 196617 de-encapsulate and then encapsulate again.;
#P window linecount 4;
#P comment 378 96 78 196617 Encapsulating this should lead to something
like that ->;
#P window linecount 2;
#P comment 274 204 180 196617 Not essential , but if cords attributes
could be preserved , would be nice…;
#P hidden fasten 8 0 9 0 273 75 293 75;
#P hidden fasten 8 0 10 0 273 110 293 110;
#P hidden fasten 8 0 11 0 273 132 293 132;
#P hidden fasten 16 0 21 0 471 75 491 75;
#P hidden connect 20 0 21 1;
#P connect 21 0 17 0;
#P connect 21 1 18 0;
#P connect 21 2 19 0;
#P hidden fasten 15 0 10 0 333 110 293 110;
#P fasten 9 0 14 0 293 107 373 107;
#P fasten 10 0 13 0 293 130 333 130;
#P connect 11 0 12 0;
#P connect 4 0 7 1;
#P connect 7 0 5 0;
#P connect 7 1 6 0;
#P connect 3 0 7 0;
#P window clipboard copycount 22;

[][] [][][] [][] [][][]
[][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—-
–_____———–|———–
–(_|_ —-|—–|—–()—-
– _|_)—-|—–()———–
———-()————x—–

14, Av. Pr. Franklin Roosevelt,
94320 Thiais, France
Phone at CCMIX +33-1-57 42 91 09


April 27, 2006 | 10:36 am

I agree with Stefan but I can imagine the topic ‘enhance encapsulate’ is somewhere near the lower end of the priority list, just like ‘enhance find/replace’ and of course many others. Won’t be easy, running a software company. ;)

Interesting though to see that people like Stefan (and me) would probably develop these upgrades themselves if they had the opportunity, even without charging any money. Here lies in fact a huge potential of costless co-workers. If cycling74 would find a way to channel these energies into their products.. wouldn’t that be quite revolutionary?

Btw, I have to say cycling74 is already unique in the short distance between the developers and the users. I have dealt with native instruments for some time (I learned not to try with Reaktor what you can do with Max), compared to cycling74, NI guys act like they float on a cloud somewhere in developers heaven. For real, how do you guys manage to stay in touch with the forums and lists so well compared to other companies?

Cheers,
Mattijs


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