How to make an abstraction

carloskleiber's icon

Hello,
from the tutorial about abstractions it is not clear to me how to create (save a patcher as) one. If someone could concisely exlain it, it would be really cool.
cheers,
carloskleiber

Roman Thilenius's icon

"abstraction" describes only the way youre gonna use it, otherwise it is a normal patcher file.

Noob4Life's icon

save any max patch as you would normally(.maxpat). place it anywhere within max's search path(sometimes i keep it within the same folder as the parent patch just to keep build-files together). then type that file's name within an object. Say you have abstrakshun.maxpat, stored somewhere in a folder(or just use max's search/file path preferences), and within that same folder have saved a parent patcher called ParentPatch_OpenFirst.maxpat, in the parent patch you can now have the object [abstrakshun].

it's a bit like using subpatchers except abstractions can also have variable arguments, see this tutorial again, specifically the sections labelled, "Using an abstraction with replaceable arguments" for best explanation:
https://cycling74.com/docs/max5/tutorials/max-tut/basicchapter15.html

and they help you modularize so that you can make edits to parts without having to go through the whole, or more importantly, make edits to a source file so that all instantiated copies reflect those edits all at once.

see attachment for a simple example of how one is created.

________________________________
*Never fear, Noob4Life was never here!*

1458.test.zip
zip