getting unique instance i.d. val in bpatcher and abstraction
Hi all,
When using poly~, you can obtain a unique voice instance i.d. using thispoly~.
Now, how could I obtain a unique i.d val per instance , when using abstractions and or bpatcher.
I know that when using scripting names on objects, say (scripting name = dog) . well
the object name will autoincrement itself like so (dog[0]) , everytime you duplicate it within the same patcher. How could I fetch that name ? I tried with pattrstorage and autopattr but no dice.
Also , the problem is that bpatcher and abstractions will not increment it's name because each instance is a different patcher.
Anyways, how could I have the equivalence of thispoly <-voice i.d. but with bpatchers&abstractions
thanks you very much
phiol
found something here
https://cycling74.com/forums/get-scripting-name-heirarchy-of-nested-bpatchers/
works for now but was wondering if there was another way.
thanks
mmm. shoot
don't work with abstractions.
Please consider having this built-in for max 8 , please
thanks for the suggestion lska,
yup I knew abou thte #0_name but the problem is that it creates a unique name each time you open the patch. I wan't a fix number like thispoly and the above js solution.
thx
phiol
this seems to work:
and the TestAbstraction:
Wait, it work perfectly fine with abstractions. I'm obviously a total noob with js :-)
what would the best place to get a list of all js functions max accepts
I got this to start reading on:
https://docs.cycling74.com/max7/vignettes/javascriptinmax
https://docs.cycling74.com/max7/vignettes/javascript_usage_topic
http://max-javascript-reference.tim-schenk.de/#gsc.tab=0
anything else I'm missing ?
thanks
phiol