Ingo Stock mail@ingostock.de writes:
Now this works without error messages, combining some of the approaches in this thread.
ingo
On 05/15/2018 03:47 PM, Ingo Stock wrote:
But it works by creating the message with set and changing messages!
[set obj 30 30 array define, adddollsym $2-$3( --> [( does the trick.
See also attached working demo.
On 05/15/2018 03:26 PM, Roman Haefeli wrote:
On Tue, 2018-05-15 at 14:09 +0200, Christof Ressi wrote:
[obj 20 20 array define $$1-snd0]
this only works as long as you don't save and reopen the patch, where "$$1" will become "$$1" (which is resolved to "$\$1" instead of "\$1").
I see. Thanks for pointing it out.
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Thanks all, sorry for the delayed response, got tied up with a looming deadline during the week... Good solutions to try out with the $$ and the [list tosymbol] options.
Yep, essentially what I wanted to do is was create a bunch of array defines with $0 in them and not care about saving the dynamic patching machinery used to create them. I suppose it wasn't super necessary in my use case, but just keeping up my usual practice of prepending everything with $0-, I suppose I tend to be on the extra paranoid side of wanting to keep everything patch unique. A use case I could definitely see myself doing at some point is something that I would want to open multiple instances of that involve large sample banks, like say a live looping patch with 50 10 second recordable loops or even just a sound launcher/processor patch have can draw from 100s of different loaded up sounds. In those cases, again I wouldn't care so much about saving the machinery used to make all those [array defines], but doing all of those by hand would definitely be a pain and they would all need $0-s in their names to avoid collisions when multiple instances are open...
As a side note, I don't really particular about this situation right now and don't have a use case as of yet, but it looks like both the $$ approach and the tosymbol approach don't work with trying to insert literal "$0, $1, $2" and so on in [text]s the "patching" sort of way via [text insert]? You can enter those literals just fine via the popup Pd text window and those will save just fine, but both the $$ and tosymbol methods via [text insert] yield input that looks to be their escaped $0, $1 versions within the popup Pd text window and then when you try to save the contents of that window they get resolved (so $0 goes to 0 and $1 yields \$1: argument number out of range warnings).
Again, don't particularly care that much about finding a solution to this other issue at the moment, but figured I bring it up as a possible branch of further discussion since the topic is open at the moment anyways...
Thanks again for the help on the dynamically creating [array defines] with literal $0s.
Derek Kwan www.derekxkwan.com