Forums > MaxMSP

Automatic prompts for arguments in abstractions

July 23, 2012 | 2:18 pm

Surely this has been requested before but just in case it hasn’t (or if people have forgotten), I want to suggest it again, as I hit this a lot.

When I create an abstractions, I almost always have #n arguments to be passed in to it. Some of the abstractions require 5 or 6 parameter, for example, I have a MIDIClickTrackGenerator that takes 5 arguments to define regular and accented notes, velocities for each of them, and a duration.

So after I type in the name of the object, it would be really nice if Max would prompt (or insert) argument names so I don’t have to keep going back to the original abstraction to see what it needs.

Now, I understand the object doesn’t get instantiated until you have finished typing in everything but perhaps a special object or "metacomment" in the abstraction itself could be recognized by Max whenever you save it so as to add the info to some central registry.


July 23, 2012 | 8:54 pm

aside from what cycling 74 could do about auto completion here, there is something
what the autor of the abstraction could do, and that is having inlets with inlet
desciptions for each of the arguments (or the other waxy round if you want to see
it like that.)
it is a bit extra work but it is good habit – and you never know if you not maybe
some day need to have a dynamic parameter there anyway.

otherwise eventually using prototypes is a nice solution?

-110


July 23, 2012 | 9:09 pm

All my ports are annotated but the port order does not necessarily match the argument order and some arguments don’t make sense as ports. Object instantiation and dynamic modification of same initial data are not always synonymous nor appropriate. It’s also not appropriate to expose a whole bunch of inlets that might never be used, and thus making understanding of the object more complex than necessary.

Nor would you want to change the ports after you have created the object just because you realize you need another argument — that would almost certainly break your existing code.


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