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]?
It seems like something stupid but I can't find the solution.
Thanks for any hints Urs
I read:
If I put a [send $1( before the [sendOSC], only the 12.5 is sent.
I'm not sure if I understood your problem correctly but might [send $1 $2 ( do the what you want ?
HTH
x
No, unfortunately not. [/OSC/namespace/test 12] (OSCroute) | [send $1 $2( | [print]
gives 'error: $2: argument number out of range; print: send 12 0'
If I use only $1 it just gives me 'print: send 12'
What I need to have (to be able to send the message with [sendOSC]) is 'print: send /OSC/namespace/test 12'
The problem seems to be that I don't really know about the datatype getting out of [OSCroute]. Looking at the [OSCprepend] abstraction (posted on this list on Sept 10) it seems to be some kind of list, but I don't understand this really.
Thanks for the help Chris.
Any more ideas anybody? Urs
CK schrieb:
I read:
If I put a [send $1( before the [sendOSC], only the 12.5 is sent.
I'm not sure if I understood your problem correctly but might [send $1 $2 ( do the what you want ?
HTH
x
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
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
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(
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...
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
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
Well, let's once again try to explain my problem.
My problem is not with the routing of OSC messages, that is all clear.
But at the end of the message chain of my patch I have a [sendOSC] that transmits OSC messages to other computers.
Therefore this sendOSC has to be able to transmit any OSC message that might be produced by my patch.
To send a message, the [sendOSC] expects a message to its inlet that has the form 'send OSCmessage', for example:
[send /synth/voices/*/stop( or [send /synth/preset 11( or [send /synth/VCF/689 1.5(
So the message that is sent to [sendOSC] consists of three parts:
What the patch (i.e. the OSCroute modules) produces are the latter two parts or basically a list with the OSC namespace as its first member and the arguments as the remaining members.
So in the end it all comes to this question:
??????????????????????? How can I produce a [message( from a list of arbitrary length and mixed member types? ???????????????????????
Or could anybody post a working patch with a [sendOSC] that is not so simple as the help patches?
Many thanks Urs
Martin Peach schrieb:
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
Hi, sorry for the traffic, but now I obviously found the solution myself:
[OSCroute /...] | [list prepend send] | [list trim] | [sendOSC]
seems to work as there now is the 'send' in front of the OSC message but the 'list' is trimmed away (I didn't notice that before).
There is always a use in being away from the screen for a few hours ;-)
Thanks for your thoughts anyway
Urs Liska schrieb:
Well, let's once again try to explain my problem. ...
Urs Liska wrote:
Hi, sorry for the traffic, but now I obviously found the solution myself:
[OSCroute /...] | [list prepend send] | [list trim] | [sendOSC]
seems to work as there now is the 'send' in front of the OSC message but the 'list' is trimmed away (I didn't notice that before).
I don't have a 'list' object so I used the following methods: e.g. for "/synth/voices/*/stop" you would do: [symbol /synth/voices/*/stop] | [send $1( | [sendOSC]
For "/synth/preset 11" this works:
[symbol /synth/preset] [11
| |
[pack s f ]
|
[send $1 $2(
|
[sendOSC]
For "/synth/VCF/689 1.5" you could do:
[689
|
[sprintf /synth/VCF/%d]
|
[symbol $1] [1.5
| |
[pack s f ]
|
[send $1 $2(
|
[sendOSC]
...but if you already have the list and don't need to construct it just a [prepend send] should work: [OSCroute] | [prepend send] | [sendOSC]
Martin
[list] was introduced in 0.39.
Martin Peach schrieb:
I don't have a 'list' object so I used the following methods: e.g. for "/synth/voices/*/stop" you would do: [symbol /synth/voices/*/stop] | [send $1( | [sendOSC]
For "/synth/preset 11" this works: [symbol /synth/preset] [11
| | [pack s f ] | [send $1 $2( | [sendOSC]For "/synth/VCF/689 1.5" you could do: [689
| [sprintf /synth/VCF/%d] | [symbol $1] [1.5
| | [pack s f ] | [send $1 $2( | [sendOSC]
This would require me to count the arguments and route to the compatible method.
...but if you already have the list and don't need to construct it just a [prepend send] should work: [OSCroute] | [prepend send] | [sendOSC]
That's what I thought. But [prepend send] results in [list send ...( That's why the [list trim] is necessary.
Anyway, thanks for your continuing efforts Urs