[PD] mrpeach osc - pipelist question
matju at artengine.ca
Tue Jul 8 19:26:43 CEST 2008
On Tue, 8 Jul 2008, IOhannes m zmoelnig wrote:
> (the other, more clumsy solution was of course to use
> [list]->[pipelist]->[list trim])
This doesn't work with real lists, because [list] won't prepend an extra
list selector, so [list trim] will remove that when $1 is a symbol. Then
you can use [route list] to distinguish that, but it will have the side
effect of removing the list selector from a list when $1 is a symbol, but
you can add it back once or twice using [list prepend list], which will
add it twice when $1 was a symbol (except "list"), and once otherwise;
then [list trim] will exactly undo the [list prepend list] or the [list]
that the message went through depending on the case.
e.g. "a b c" becomes "list a b c" and then "a b c" again, fine, but your
way, "list a b c" stays "list a b c" and then becomes "a b c", which is
wrong; instead you [route list] which turns "list a b c" into "a b c", at
which point you know it was a list that you just trimmed, therefore with
[list prepend list] it becomes "list list a b c" which will go through
[list trim] to become "list a b c".
However I can't think of a solution for dealing with "list list a b c"
going through [route list] to become "list a b c" then through [list
prepend list] to become "list list a b c" and not "list list list a b c",
in which case it will end up being trimmed to "list a b c" instead of
"list list a b c". But I know I can't just tell you to use [route2]
instead of [route] for this case.
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec
More information about the Pd-list