Custom Icon for Existing object or subpatch selection


    Sep 03 2015 | 5:32 pm
    I am seeking a way to create a custom icon for either (1) an existing Max object, or (2) a sub-patch. Here are two examples:
    Example 1: replacing the "+" object. Consider that you want to create a [+] object but using a different, custom, svg image created through Inkscape or elsewhere.
    Example 2: replacing a sub-patch that performs numerical integration with a long S like this:
    .....
    In my searchings on the topics, I have seen many potentials but nothing concrete. Here is what I have found
    1) Bpatching would seem to be a great answer, except that Bpatching seems to surface only input, input/output (UX), and output objects. If you need to add two numbers together with [+] you will still need to perform this operation, and placing an image in the sub-patch to be bpatched doesn't help (it needs two inlets and one outlet).
    2) There are some sub-directories containing "interfaces" .svg files. This seems like it has promise, but how does one add a new .svg for the existing object [+] ? I tried a few things, but Max showed the usual rectangular box for [+] in the patcher window
    3) I realize that creating a UI object from C will achieve the stated goal, but it would be nice to take existing objects and subpatches and put a new face on them.
    My immediate reason for this question is that I have several simulation patches that do integration and solve equations using [gen], but I'd like ideally for the individual functions like integration to have the appearance of an integral sign as one finds in Wolfram's SystemModeler, Modelica, Ptolemy etc.
    Let me know if anyone has been able to do the above.

    • Sep 06 2015 | 1:16 am
      My query is the equivalent of creating a mountain out of a molehill. While I was looking for SVG icons for objects, it dawned on me that the solution was in bpatching after all. The bpatch presentation objects inherits the interface from the sub-patch (and not from the native interface for the presentation object). For example, if [pictctrl] is used inside of a subpatch, where that pictctrl object is surfaced in the presentation, it inherits the interface of the subpatch. I have included two files: myplustest.maxpat and myplus.maxpat. Download both (if you like molehills), and click on myplustest.maxpat, where you see that Alex the cat does a summation.