Hi, dear list !
After so many years i am still surprised by some idiosyncratic behaviour in PD. Or so it seems to me, please correct me if it's me who doesn't get things straight ...
It seems to me, that the [route] object can't handle a mix of float and symbol arguments correctly. Meaning, it can either route floats OR symbols as expected but not both.
Is this behaviour intentional ?
I thought that route can differentiate between selectors (list, float, bang etc.) and (if nothing else fits) the first element of any given message. But even if i prepend the message by the selector "list", a mixture of floats and symbols in a single route object doesn't work as i would expect it ...
I think the attached patch explains better than words, what i mean
Please have a look at it and if someone can explain this to me, please do so !
best
oliver
On 9/13/22 16:11, oliver wrote:
Hi, dear list !
After so many years i am still surprised by some idiosyncratic behaviour in PD. Or so it seems to me, please correct me if it's me who doesn't get things straight ...
It seems to me, that the [route] object can't handle a mix of float and symbol arguments correctly. Meaning, it can either route floats OR symbols as expected but not both.
Is this behaviour intentional ?
both intentional and documented:
Route checks the first element of a message against each of its
arguments, which may be numbers or symbols (but not a mixture of the two).
I thought that route can differentiate between selectors (list, float, bang etc.) and (if nothing else fits) the first element of any given message.
no, that would be weird.
[route foo bar] would then output on the 1st outlet for the messages [foo bar( (the message [bar() and [baz foo( (what... an empty message/bang?) but [bar foo( would be sent to the 2nd outlet?
gmsd IOhannes
IOhannes m zmölnig wrote:
On 9/13/22 16:11, oliver wrote:
It seems to me, that the [route] object can't handle a mix of float and symbol arguments correctly. Meaning, it can either route floats OR symbols as expected but not both.
Is this behaviour intentional ?
both intentional and documented:
Route checks the first element of a message against each of its
arguments, which may be numbers or symbols (but not a mixture of the two).
Ah ... damn ... my bad ;-)
Having used [route] for such a long time, i didn't even think of re-reading the help file in depth since i thought i knew it all ...
anway, thanks a lot !
best
Oliver