[PD] OSCprepend to message; input to sendOSC?

Martin Peach martinrp at vax2.concordia.ca
Thu Sep 22 17:54:17 CEST 2005


Urs Liska wrote:

> Hi all again.
>
> Unfortunately I just noticed that I am still not where I want to be :-(
> Martin's solution works only for OSC messages with *1* argument:
> [/OSC/namespace/etc 12.5(
> but not for messages with arbitrary number of arguments like
> [/OSC/connect 192.168.0.1 9999(
>
I guess you could just put a tree of [OSCroute]s under the first 
[OSCroute], one for each situation:
[OSCroute /case1 /case2 /case3]
| | | |
[OSCroute /type1 /type2]
| | |
...etc


> Does anybody have an idea how to process the output of an [OSCroute] 
> so that I can get a send message to [sendOSC]?
>
> I can't be the only one who doesn't know in advance what messages to 
> send...
>

Do you mean that you want a generic router that can handle every 
possible OSC message?

Martin

> Thanks
> Urs
>
> Urs Liska schrieb:
>
>> Hi Martin,
>>
>> thanks, this did the trick!
>>
>> Martin Peach schrieb:
>>
>>> Urs Liska wrote:
>>>
>>>> Hi,
>>>>
>>>> I am trying to get an OSC connection working but have problems with 
>>>> the input [sendOSC] is expecting.
>>>> OSC is running, I have connected [sendOSC] and [dumpOSC] in two 
>>>> patches successfully and also have sent messages that I write into 
>>>> message boxes.
>>>>
>>>> But in the actual patch I cant use message boxes like
>>>> [send /OSC/namespace/etc $1( or similar but get messages from 
>>>> [OSCroute]
>>>> modules or Frank Barknecht's [OSCprepend] abstraction
>>>> that look like [/OSC/namespace/etc 12.5(
>>>>
>>>> If I put a [send $1( before the [sendOSC], only the 12.5 is sent.
>>>>
>>>> If I connect it directly I get the error "no method for '/OSC...'".
>>>>
>>>> So how can I process the output of a [OSCroute] to be sent by 
>>>> [sendOSC]?
>>>
>>>
>>>
>>>
>>>
>>> Try:
>>> [OSCRoute ...]
>>> |       [unpack s 0]
>>> |      |   [pack s 0]
>>> |
>>> [send $1 $2(
>>> |
>>> [sendOSC]
>>>
>>>
>>>
>>> Martin
>>>
>>>
>>
>





More information about the Pd-list mailing list