Hi,

usually this is not necessary. As $0 changes with every patch opening,
the dynamically created objects containing $0 must be recreated again
every time. $0 resolves to an actual number in this process (i.e. 1023),
but this is alright, as you can access 1023-array1 through [array get
$0-array1] (if $0 equals 1023 in that session).

I attached a demo patch that shows how it can be done (even without
[makefilename]).

best wishes, ingo


On 05/15/2018 01:15 PM, Derek Kwan wrote:
> 
> Hello list,
> 
> Perhaps a bit of a long shot and pretty much the exact opposite of the $0
> in messages conversations as of late: Is there a way to NOT resolve
> dollar arguments in messages and/or objects?
> 
> Example case: Lately for a project I've wanted to create vast swaths of
> [array define]s and I've done so with dynamic patching. Since I want
> their bound symbols to be something like "$0-snd0", "$0-snd1"
> $0"-snd2"... "$0-snd50", I DON'T want dollar arguments (particularly the
> $0) to resolve to anything. Similarly, I store filepath + array symbol
> pairs in texts to do a big load at the beginning and for right now and
> can always add the $0-bit via passing that symbol through a
> [makefilename], but I'm wondering if I can pass $0s unresolved into a
> text without having to manually type it in via the popup window.
> 
> Of course I can always edit the patch in emacs/vim and do a
> search/replace, but I'm looking for an in-Pd solutions... Also for the
> array business I suppose I could do that via [clone], but that situation
> doesn't seem ideal either...
> 
> Thanks!
> 
> Derek
> 
#N canvas 299 119 386 630 12;
#X msg 39 116 5;
#X obj 39 162 until;
#X obj 39 185 f;
#X obj 69 185 + 1;
#X msg 39 208 symbol snd\$1;
#X obj 39 231 text set \$0-arraynames 1e+06;
#X obj 99 185 mod;
#X obj 39 139 t f f b;
#X msg 141 162 clear;
#N canvas 687 243 231 201 \$0-arrays 1;
#X restore 39 47 pd \$0-arrays;
#X msg 141 369 clear;
#X obj 141 392 s pd-\$0-arrays;
#X obj 39 323 text size \$0-arraynames;
#X obj 39 369 until;
#X obj 39 392 f;
#X obj 69 392 + 1;
#X obj 99 392 mod;
#X obj 82 438 text get \$0-arraynames;
#X obj 39 303 bng 15 250 50 0 empty empty create_arrays 17 7 0 10 -262144
-1 -1;
#X obj 39 415 t f f;
#X obj 39 346 t f f b;
#X obj 39 530 s pd-\$0-arrays;
#X obj 39 461 + 30;
#X obj 39 438 * 23;
#X obj 39 484 pack f \$0 s;
#X msg 39 507 obj 30 \$1 array define \$2-\$3;
#X obj 39 96 bng 15 250 50 0 empty empty write_to_text 17 7 0 10 -262144
-1 -1;
#X obj 141 185 text define -k \$0-arraynames;
#A set snd0 \; snd1 \; snd2 \; snd3 \; snd4 \;;
#X connect 0 0 7 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 2 0 4 0;
#X connect 3 0 6 0;
#X connect 4 0 5 0;
#X connect 6 0 2 1;
#X connect 7 0 1 0;
#X connect 7 1 6 1;
#X connect 7 2 8 0;
#X connect 8 0 27 0;
#X connect 10 0 11 0;
#X connect 12 0 20 0;
#X connect 13 0 14 0;
#X connect 14 0 15 0;
#X connect 14 0 19 0;
#X connect 15 0 16 0;
#X connect 16 0 14 1;
#X connect 17 0 24 2;
#X connect 18 0 12 0;
#X connect 19 0 23 0;
#X connect 19 1 17 0;
#X connect 20 0 13 0;
#X connect 20 1 16 1;
#X connect 20 2 10 0;
#X connect 22 0 24 0;
#X connect 23 0 22 0;
#X connect 24 0 25 0;
#X connect 25 0 21 0;
#X connect 26 0 0 0;

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to