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

Ingo Stock mail at ingostock.de
Tue May 15 14:31:23 CEST 2018


With both solutions the $ in the created arrays are escaped like [array
define \$0-snd0] and cannot be accessed by [array get $0-snd0].


On 05/15/2018 02:22 PM, Christof Ressi wrote:
> sorry, I think I misread your question. for what you want Jack's solution is right. mine is for dynamically creating patch *files*.
> 
>> Gesendet: Dienstag, 15. Mai 2018 um 14:09 Uhr
>> Von: "Christof Ressi" <christof.ressi at gmx.at>
>> An: "Roman Haefeli" <reduzent at gmail.com>
>> Cc: pd-list at lists.iem.at
>> Betreff: Re: [PD] Escaping/not resolving dollar argts in msgs/objects?
>>
>>> [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").
>>
>> this should do the trick: [0( --> [makefilename $%d] --> [;pd-mysubpatch obj 0 0 array define $1-snd0(
>>
>> one case where this is necessary is when you dynamically create pd patch files which take creation arguments or need $0-symbols.
>>
>> Christof
>>
>>> Gesendet: Dienstag, 15. Mai 2018 um 13:52 Uhr
>>> Von: "Roman Haefeli" <reduzent at gmail.com>
>>> An: pd-list at lists.iem.at
>>> Betreff: Re: [PD] Escaping/not resolving dollar argts in msgs/objects?
>>>
>>> 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
>>>
>>>
>>>
>>> _______________________________________________
>>> Pd-list at lists.iem.at mailing list
>>> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>>>
>>
>> _______________________________________________
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>>
> 
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180515/d23ee1b3/attachment-0001.sig>


More information about the Pd-list mailing list