Forums > MaxMSP

Inlet generating abstraction complications

August 16, 2013 | 6:53 pm

Greetings patchers and patchettes;

I came up against a problem in a main patch I run as my liveset where all the subpatchers had disgusting amounts of chords everywhere. To solve this problem I made an abstraction.

The abstraction is designed to replace [pa(c)k] by generating inlets based on the number indicated by the argument (using some [thispatcher] stuff) and, instead of outputing the items as a list (which would cause all the items to output every time any of them changed which would cause unwanted triggers through the patch, or, if using [change] not allow me to repeat commands) [prepac] (my abstraction) just prepends each inlets data with an integer and outputs them together through one outlet (which eventually finds its way to a route object for separate and unadultered output.)

My problem is that whenever I open my patch containing the abstractions, although the argument and the inlets remain, the connected patchchords have been disconnected. My suspicion is that the abstraction reloads, (and thus recreates the inlets) fresh every time the main patch is opened.

Is there a way around this? If I can make unique instances of the abstraction and save it’s current state (without, ideally, having a different abstraction saved in my library for every argument I use) that would make matters easier.

Thanks in advance, Cheers.


August 16, 2013 | 10:16 pm

What you suspect is the case. The only option is to start the abstraction with a maximum amount of inlets and remove the unwanted ones.


August 17, 2013 | 5:16 am

hm, did you give a look at [funnel] [spray] [listfunnel] ? i can’t say it for sure, but they might do what you want…
And, your [thispatcher] script, does it contain the correct (connect inlet1 0 object1 0) messages ?


August 17, 2013 | 6:18 am

Thanks @JVKR . That’s a great solution. I feel like it might mess with the shape of the abstraction in the patch but it’s the last object in my subpatchers usually, so no matter.

Thanks for your reply, @VICHUG I’ll check these out, I sometimes overlook simple solutions.


August 24, 2013 | 7:09 am

Hey @CARPENTERKEYS, was wondering what solution did you use in the end? I had exactly same problem – I used some scripting messages with [thispatcher] so that my first argument defined the number of outlets. However every time it loaded it would disconnect itself. Wonder if you could still do it with javascript?


August 24, 2013 | 4:23 pm

Hey @IVANKO I took @JVKR ‘s advice and saved the abstraction with 50 or so inlets and deleted the calculated the difference between that and the argument to delete the unnecessary ones. Works finely.


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