Hi all,
Does anybody know if there is a way to automatically send an OSC message to an internal PD messaging address which happens to be the same as the route of the OSC message. So for instance, an osc message arrives with route "/a/sample/route" and value 50, I would like to automatically send the value of the message to the internal message address of "/a/sample/route". I would like to avoid having to explicitly patch this (using route and send and receive) as there quite a few. I could be missing some basic pd knowledge ...
thx in advance. Conor
Forwind info wrote:
Hi all,
Does anybody know if there is a way to automatically send an OSC message to an internal PD messaging address which happens to be the same as the route of the OSC message. So for instance, an osc message arrives with route "/a/sample/route" and value 50, I would like to automatically send the value of the message to the internal message address of "/a/sample/route". I would like to avoid having to explicitly patch this (using route and send and receive) as there quite a few.
something like this:
"/foo/bar 1 2 3" or other arbitrary osc message | [t a a] | \ | [list split 1] (or [list]--"$1" would also work here) | : [list split 1] | : | | [send]
requires a recent Pd for the settable send, if i recall correctly
I could be missing some basic pd knowledge ...
thx in advance. Conor
hope this helps,
Claude
Thx Claude,
I'll check it out later. I really should get up to speed on PD basics...
Conor
On Mon, Dec 8, 2008 at 5:13 PM, Claude Heiland-Allen < claudiusmaximus@goto10.org> wrote:
Forwind info wrote:
Hi all,
Does anybody know if there is a way to automatically send an OSC message to an internal PD messaging address which happens to be the same as the route of the OSC message. So for instance, an osc message arrives with route "/a/sample/route" and value 50, I would like to automatically send the value of the message to the internal message address of "/a/sample/route". I would like to avoid having to explicitly patch this (using route and send and receive) as there quite a few.
something like this:
"/foo/bar 1 2 3" or other arbitrary osc message | [t a a] | \ | [list split 1] (or [list]--"$1" would also work here) | : [list split 1] | : | | [send]
requires a recent Pd for the settable send, if i recall correctly
I could be missing some basic pd knowledge ...
thx in advance. Conor
hope this helps,
Claude
Hi,
A late catch up on this (err 2 months) I have done what you suggested below.
"/foo/bar 1 2 3" or other arbitrary osc messages | [t a a] | \ | [list split 1] (or [list]--"$1" would also work here) | : [list split 1] | : | | [send]
I made one adjustment:
Going from left to right the first output of [list split 1] which outputs the osc address symbol is sent to the right hand of the send object and the second output of list which outputs the actual value is sent to the first output.
The problem I am having is that when I send from my OSC client app two messages a frequency and a decay message at the same time one after the other in rapid succession. The messages arrive at PD in the correct order but when they are parsed by the above objects the values are swapped. So the frequency value ends up going to the decay and decay ends going to the frequency. After some investigation is turns out that the split message outputs the integer first when a OSC message arrives therefore because the way send works whereby it will only send when it receives a value the values are swapped.
Again there is probably an easy way to fix this but I'm stumped. Any ideas anyone ?
Conor
On Mon, Dec 8, 2008 at 5:13 PM, Claude Heiland-Allen < claudiusmaximus@goto10.org> wrote:
Forwind info wrote:
Hi all,
Does anybody know if there is a way to automatically send an OSC message to an internal PD messaging address which happens to be the same as the route of the OSC message. So for instance, an osc message arrives with route "/a/sample/route" and value 50, I would like to automatically send the value of the message to the internal message address of "/a/sample/route". I would like to avoid having to explicitly patch this (using route and send and receive) as there quite a few.
something like this:
"/foo/bar 1 2 3" or other arbitrary osc message | [t a a] | \ | [list split 1] (or [list]--"$1" would also work here) | : [list split 1] | : | | [send]
requires a recent Pd for the settable send, if i recall correctly
I could be missing some basic pd knowledge ...
thx in advance. Conor
hope this helps,
Claude
Forwind info wrote:
Hi,
A late catch up on this (err 2 months) I have done what you suggested below.
"/foo/bar 1 2 3" or other arbitrary osc messages | [t a a] | \ | [list split 1] (or [list]--"$1" would also work here) | : [list split 1] | : | | [send]
I made one adjustment:
Going from left to right the first output of [list split 1] which outputs the osc address symbol is sent to the right hand of the send object and the second output of list which outputs the actual value is sent to the first output.
[snip]
Again there is probably an easy way to fix this but I'm stumped.
That's why I put [trigger] and *two* [list split]s. Easier than trying to swap the order of the messages later (unless [swap] supports lists yet?)
But as was mentioned elsewhere in the thread, this doesn't work with OSC wildcards which you'll want to use sooner or later...
thx Claude, I wasn't reading the patch description properly. Will take a look at matchbox and the rest when its needed. For now this should do.
On Sun, Jan 11, 2009 at 4:55 PM, Claude Heiland-Allen < claudiusmaximus@goto10.org> wrote:
Forwind info wrote:
Hi,
A late catch up on this (err 2 months) I have done what you suggested below.
"/foo/bar 1 2 3" or other arbitrary osc messages
| [t a a] | \ | [list split 1] (or [list]--"$1" would also work here) | : [list split 1] | : | | [send]
I made one adjustment:
Going from left to right the first output of [list split 1] which outputs the osc address symbol is sent to the right hand of the send object and the second output of list which outputs the actual value is sent to the first output.
[snip]
Again there is probably an easy way to fix this but I'm stumped.
That's why I put [trigger] and *two* [list split]s. Easier than trying to swap the order of the messages later (unless [swap] supports lists yet?)
But as was mentioned elsewhere in the thread, this doesn't work with OSC wildcards which you'll want to use sooner or later...
Hallo, Forwind info hat gesagt: // Forwind info wrote:
Does anybody know if there is a way to automatically send an OSC message to an internal PD messaging address which happens to be the same as the route of the OSC message. So for instance, an osc message arrives with route "/a/sample/route" and value 50, I would like to automatically send the value of the message to the internal message address of "/a/sample/route".
You could use a settable [send] for this:
[dumpOSC] or whatever | [list split 1] | | | [s $0-rest-of-message] | [t b a] | | | [s $0-sender-name] | | [r $0-rest-of-message] | | [list] | | [r $0-sender-name] | | [send]
It's imperative that you use the [t b a] here, because the rest-of-message would be generated before the sender-name otherwise as there's right-to-left ordering in [list split].
In a non-ASCII-patch I'd use direct connections, not sends, but that would be hard to read in ASCII.
Ciao
Forwind info wrote:
Hi all,
Does anybody know if there is a way to automatically send an OSC message to an internal PD messaging address which happens to be the same as the route of the OSC message. So for instance, an osc message arrives with route "/a/sample/route" and value 50, I would like to automatically send the value of the message to the internal message address of "/a/sample/route". I would like to avoid having to explicitly patch this (using route and send and receive) as there quite a few.
btw, implementing something like this was the main reason to write [matchbox] (in zexy).
the basic distribution mechanism is the same as frank has outlined. however this doesn't work when using wildcard OSC-receivers. that's where matchbox comes into play. for a wroking example see the CUBEmixer[1]
fgmasdr IOhannes
[1] https://iem.svn.sourceforge.net/svnroot/iem/spatialization/CUBEmixer/trunk
I could be missing some basic pd knowledge ...
thx in advance. Conor
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
Cheers Iohannes. Will check this out when I get chance later in the week.
Conor
On Tue, Dec 9, 2008 at 8:25 AM, IOhannes m zmoelnig zmoelnig@iem.at wrote:
Forwind info wrote:
Hi all,
Does anybody know if there is a way to automatically send an OSC message to an internal PD messaging address which happens to be the same as the route of the OSC message. So for instance, an osc message arrives with route "/a/sample/route" and value 50, I would like to automatically send the value of the message to the internal message address of "/a/sample/route". I would like to avoid having to explicitly patch this (using route and send and receive) as there quite a few.
btw, implementing something like this was the main reason to write [matchbox] (in zexy).
the basic distribution mechanism is the same as frank has outlined. however this doesn't work when using wildcard OSC-receivers. that's where matchbox comes into play. for a wroking example see the CUBEmixer[1]
fgmasdr IOhannes
[1] https://iem.svn.sourceforge.net/svnroot/iem/spatialization/CUBEmixer/trunk
I could be missing some basic pd knowledge ...
thx in advance. Conor
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev