[PD] Escaping/not resolving dollar argts in msgs/objects?

Roman Haefeli reduzent at gmail.com
Tue May 15 13:52:41 CEST 2018


On Tue, 2018-05-15 at 04:15 -0700, 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?

I think you cannot dynamically disable the resolution of dollar
symbols.

> 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

Do I understand correctly that you want to be able to create those
objects containing literal '$0'?

You can "trick" Pd into creating a symbol that itself has a dollar
variable:

[0 (
|
[obj 20 20 array define $$1-snd0]
|
[s canvas]

> . 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.

You could use the same trick.

> 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...

I was just wondering why I haven't ever experienced the same need for
literal dollar symbols in my patching career and realized that I never
save dynamically created stuff. I rather let the dynamic stuff be
created each time I load the patch. This way all dollar variables
resolve to the currently correct value and I never bothered to use
literal dollar signs in dynamic patching. Maybe I'm not fully
understanding your case, but I can't see how having dynamically
generated '$0' is useful in any way. Either you create all dynamic
stuff from scratch, then you can as well use the value of $0 or you're
saving stuff for later, but why do you need $0 then? Don't you rather
want something fixed/controllable, that evaluates to the same value on
each run?

Roman



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180515/2c8e3bce/attachment.sig>


More information about the Pd-list mailing list