Abstraction detection using #1
I am using instance name to save file at load and close (no savebang)
so I use #1 to generate filename
But I'd like for the abstraction itself (original) to avoid having
#1 in the name and replace it with "default" for example
how to test #1 ?
not sure if i understood your question, but if you don't give a name/argument which should be/replace #1, max sends/generate 0 instead of #1
what I do is using a [sel 0] which bangs to a "default" value/name etc
again, not sure if i understood your question. Hope it helps
kasper
The patcherargs object will give you a default argument if none is specified.
want to change the behavior of the original file
where #1 is not replace by anything
but it is; it will be replaced by 0
it is not replaced by 0
Ok I made the problem even simpler
if you include the 3 blocks here in a patch and load it
the last one is set to #1
i'd like to get "default" there
Is this what you want to do?
No but thanks
I think you meant to use sel not split (below a corrected one)
I want the default message to be trig not for an abstraction used with no name in a patch : yes #1 is replaced by 0 in this case
but when you open the original patch where it is
This one will replace the #1 with default when the patch is not an abstraction, but use the first arg if there is one assigned. It will output a zero if no arg is defined.
YES, I can move on now, THANKS
in case somebody else need it
I made it faster (I'm a programmer, got to optimize)
it deal also with the no argument case
Maa
You found a solution, but with patcherargs it all becomes simpler.
yep but so difficult to understand (and test)
when your not a max addict for months
and have only a so clear patcherargs help/reference
could you explain / comment please
> could you explain / comment please
Sure. I forgot that I found the patcherargs object a little intimidating myself when I got to know it.
Thanks I got it now