I think the problem lies somewhere else. There is a fundamental issue with [oscparse]: it breaks the address pattern into its parts and forms a Pd list, but treats numbers as symbols.
In Mitchell's case, he might be sending an OSC message like "/1/toggle1 1", so [oscparse] outputs a list "1 toggle1 1". However, the first atom "1" in the list will be a symbol, so you can't route it with [route 1]. There's a workaround: split the list with [list split 1], pass the first atom through [f] (since Pd 0.48 it interprets symbols as floats) and join the two lists again with [list append].
@Miller: addresses like "/foo/1/bar/2" are very common and the output of [oscparse] can cause confusion. Would you agree that the number parts should be rather interpreted as floats? Would it be too late to change this? If we keep the current behavior, we should at least clearly document it (and show the workaround).
[unpackOSC] doesn't have this problem because the address parts are cleary symbols and you can route them with [routeOSC /1 /2 /3 /4], etc.
Christof
Gesendet: Samstag, 13. Juli 2019 um 18:28 Uhr Von: "Roman Haefeli" reduzent@gmail.com An: pd-list@lists.iem.at Betreff: Re: [PD] OSC data from [list trim]
On Sat, 2019-07-13 at 12:01 -0400, Mitchell Turner wrote:
If I send this message “1 toggle1 1” to a [route 1], I expect the message toggle1 1 to come out of the first outlet of route, however, nothing comes out of the first outlet.
There is a distinction in both worlds, Pd messages and OSC messages, between a two-element-list with float 1 and the symbols "toggle" on one hand and on the other a symbol containing "1 toggle". [route 1] catches only the former, while the latter is passed to the right outlet.
Make sure that you send OSC messages with two atoms, '1' and 'toggle' instead of one symbolic atom '1 toggle'.
Roman _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list