[L2Ork-dev] $0 weirdness

Ivica Ico Bukvic ico at vt.edu
Sun Dec 6 21:16:46 UTC 2015



On 12/6/2015 1:03 PM, Albert Graef wrote:
> On Sun, Dec 6, 2015 at 5:14 PM, Ivica Ico Bukvic <ico at vt.edu 
> <mailto:ico at vt.edu>> wrote:
>
>     To get a better idea what I am doing here, is # only used at the
>     beginning of a string (e.g. #0-something or #1), or can it be used
>     anywhere (e.g. boo-#0 or blah#2boo)? Also, should it be escaped
>     only if it is followed by a number? (e.g. #0 should be escaped,
>     whereas # or #abc should not).
>
>
> AFAICT, this is only used with the built-in non-IEM number and symbol 
> boxes (floatatom and symbolatom) in stored patch files. The # must be 
> followed by a number. Apparently the #0, #1 etc.can occur anywhere in 
> the send/receive symbol (I tested with stuff like foo-#0-bar and it 
> works as expected). $0 aka #0 expands to the unique patch id, while $i 
> aka #i expands to the ith creation argument of the abstraction in its 
> mother patch, if any.
>
>     If you can provide some clarification what are traditional uses of
>     this, perhaps I can put in some filtering to figure out how we can
>     hopefully address both scenarios.
>
>
> That would be great.
>
>     Finally, why do we even have #0 when one can simply write $0?
>
>
> Max compatibility? Plain old cruft? I have no idea, you'll have to ask 
> Miller. ;-)
>
> The number and symbol boxes seem to be the only places where this 
> "convenience" is in use, everywhere else (including the IEM GUI 
> objects) the $i's are stored as \$i (which, incidentally, also works 
> with number and symbol boxes in reading a patch, but both vanilla and 
> extended Pd insist on storing it again as #i when writing the patch). 
> At least that's what I could deduce from playing around with a few 
> test patches.

Wouldn't it be easier then to simply edit all such instances to use 
exclusively # since they are interchangeable and be done with this? A 
simple search and replace shell script would fix all your patches in a 
single run (assuming your script is intelligent to find all of them or 
if they are co-located in the same folder).

>
> Albert
>
> -- 
> Dr. Albert Gr"af
> Computer Music Research Group, JGU Mainz, Germany
> Email: aggraef at gmail.com <mailto:aggraef at gmail.com>
> WWW: https://plus.google.com/+AlbertGraef
>
>
> _______________________________________________
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
> http://disis.music.vt.edu/listinfo/l2ork-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://disis.music.vt.edu/pipermail/l2ork-dev/attachments/20151206/1cb206a5/attachment-0001.html>


More information about the L2Ork-dev mailing list