Forums > Max For Live

Here is an improved 'print' object!…almost.

Sep 30 2013 | 10:05 am

Hi all. This would be a great object if I could make it work! Maybe you can help. :)

I am trying to make a replacement for the print object that has a few additional features:

1. Three equivalent inlets, so prints can be connected to the left, center, or right inlets for convenience.

2. A toggle button which easily disables the print object. This way, print objects can remain in the patch, as well as their connections, even if they are not currently used or needed.

3. A toggle button and number object which can be used to easily prefix a print object’s name with a number. This number ranges from -50 to 50. (I thought the ability to show a negative sign might be an additional useful indicator.) Such a print object would look like this:

print -23_MyVar1 …or, with the toggle off… print MyVar1

4. The buttons are invisible (or will be when this is done) so that this print object looks very simple like the original. In this way the object doesn’t look cluttered.

The Problem:

For this to work, this new print object, which I’ll call "MGPrint", would be a bpatcher. Wherever I would place a standard print object, I would use this MGPrint bpatcher instead.

There are 4 variables which have to remain persistent across Save, Exit, and Reopen. They are the two toggles buttons, the prefix number, and the MGPrint name. (as in "-23_MyVar1" from above).

However, these vars don’t persist, likely because these objects are meant to be used and restored in the finished device, not while editing!

Please try this out and you will see what I mean. I hope this can be done.

I, and likely many others, would be grateful if you could make this work. I have been working on it all night and morning and must now go to bed… G’night.

Thanks in advance,


Here is the code:

-- Pasted Max Patch, click to expand. --


Sep 30 2013 | 1:32 pm

this is a perfect job for an abstraction, but you are asking for 2-3 abstractions at once i think.

i would not try to make a print abstraction which can remember it last variables automatically.

rather i would make a print abstraction which contains my abstraction for automatically remebering 3 variables (by writing them to a specific location such as /patches/mypreferences/project1/prints.txt)

know what i mean? start building smaller parts before assembling a bigger tool from them.

Sep 30 2013 | 9:39 pm

Thanks for the reply. I was hoping to accomplish this without the need for an external file/abstraction. I may do it with an abstraction, but for now I will bide my time and go back to working on my main project. Meanwhile, hopefully somebody can come up with a solution that doesn’t require an abstraction.

Thanks Again,

Sep 30 2013 | 11:13 pm

But… but what you describe is itself an abstraction. Abstractions are things you can make yourself, and put in the search path and instantiate just the same as if they were actually objects.

Roman is just saying that instead of trying to think of it as one giant thing to accomplish, split it into smaller chunks and then combine them. Added benefit is that then you can use the chunks separately for other purposes you might come up with as well.

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

Forums > Max For Live