Hi Leandro
Sorry for not having responded quickly.
I know that OSC supports so-called bundled messages. However, I haven't yet investigated how they actually work. It seems like your Max patch is sending bundled OSC messages. It seems like those are tagged with a '#bundle' and obviously the '/' is prepended to #bundle tag instead of the OSC address.
I don't have a solution at hand for this, since it makes OSC message parsing in the byte realm even more complex.
Probably there are some other ways to 'de-bundle' those messages first before prepending them a '/'? (Question to the commmunity)
Roman
P.S.: I think this discussion is still interesting for the list, so I cc'ed to the list.
On Mon, 2010-10-25 at 09:41 +0200, Leandro da Mota Damasceno wrote:
Hi Roman. My print message is returning something like:
mensagem: /#bundle likeliest 1
it was supposed to be /likeliest 1
Best,
Leandro
On Mon, Oct 25, 2010 at 9:18 AM, Roman Haefeli reduzent@gmail.com wrote: Sorry, I definitely missed your reply then. Can you post the error message again?
Roman On Mon, 2010-10-25 at 02:46 +0200, Leandro da Mota Damasceno wrote: > It partially worked. It seems to be something ALMOST there, but I got > an error message. I posted a few days ago. But it's definitely the > best solution right now > > On Sun, Oct 24, 2010 at 10:45 PM, Roman Haefeli <reduzent@gmail.com> > wrote: > On Sat, 2010-10-23 at 09:40 +0200, Leandro da Mota Damasceno > wrote: > > Hi > > > > > > I would like to apologize for the private emails. it's that > when I > > reply to the messages they go to the author, not the list. > Weird. > > that's not what happens in other mailing lists... > > > > > > So, I have tried to fix the standalone as jasch suggested, > but i got > > all sorts of error messages. I would have to work almost > from scratch > > and if my knowledge on PD is still in beginner level, my > knowledge of > > max/MSP is almost null. Unfortunately, I'm on a deadline to > have this > > thing working, so I need a workaround by next week. > > > > > > So right now, I'd rather not mess with the standalone and > working on a > > new version by myself in a few weeks from now. Martin, I can > send you > > the patch, but I'm afraid it won't be any helpful for this > case, since > > it depends on dating coming from the standalone. I can give > it to you, > > of course, if you want. But I think it's pretty much what > has been > > described here. The best solution for now I think would be > to have a > > way to get ordinary messages through udp. No OSC standards. > > > > > Sorry in case I missed it, but did the abstraction I sent you > recently > not work? I don't think, that it should be too difficult to > find a way > to deal with the faulty OSC messages in Pd (so that you don't > have to > touch the standalone max/msp patch). > > Roman > > >
Hi Roman
It's ok, i just keep forgetting to reply to all...
so, I really don't understand how that could be happening, especially when in max/MSP i don't have to route any #bundle tag. It's funny how it shows how different it is to work with osc in both languages. the deadline for next week is what is actually getting me worried...
best
Leandro
On Wed, Oct 27, 2010 at 9:38 AM, Roman Haefeli reduzent@gmail.com wrote:
Hi Leandro
Sorry for not having responded quickly.
I know that OSC supports so-called bundled messages. However, I haven't yet investigated how they actually work. It seems like your Max patch is sending bundled OSC messages. It seems like those are tagged with a '#bundle' and obviously the '/' is prepended to #bundle tag instead of the OSC address.
I don't have a solution at hand for this, since it makes OSC message parsing in the byte realm even more complex.
Probably there are some other ways to 'de-bundle' those messages first before prepending them a '/'? (Question to the commmunity)
Roman
P.S.: I think this discussion is still interesting for the list, so I cc'ed to the list.
On Mon, 2010-10-25 at 09:41 +0200, Leandro da Mota Damasceno wrote:
Hi Roman. My print message is returning something like:
mensagem: /#bundle likeliest 1
it was supposed to be /likeliest 1
Best,
Leandro
On Mon, Oct 25, 2010 at 9:18 AM, Roman Haefeli reduzent@gmail.com wrote: Sorry, I definitely missed your reply then. Can you post the error message again?
Roman On Mon, 2010-10-25 at 02:46 +0200, Leandro da Mota Damasceno wrote: > It partially worked. It seems to be something ALMOST there, but I got > an error message. I posted a few days ago. But it's definitely the > best solution right now > > On Sun, Oct 24, 2010 at 10:45 PM, Roman Haefeli <reduzent@gmail.com> > wrote: > On Sat, 2010-10-23 at 09:40 +0200, Leandro da Mota Damasceno > wrote: > > Hi > > > > > > I would like to apologize for the private emails. it's that > when I > > reply to the messages they go to the author, not the list. > Weird. > > that's not what happens in other mailing lists... > > > > > > So, I have tried to fix the standalone as jasch suggested, > but i got > > all sorts of error messages. I would have to work almost > from scratch > > and if my knowledge on PD is still in beginner level, my > knowledge of > > max/MSP is almost null. Unfortunately, I'm on a deadline to > have this > > thing working, so I need a workaround by next week. > > > > > > So right now, I'd rather not mess with the standalone and > working on a > > new version by myself in a few weeks from now. Martin, I can > send you > > the patch, but I'm afraid it won't be any helpful for this > case, since > > it depends on dating coming from the standalone. I can give > it to you, > > of course, if you want. But I think it's pretty much what > has been > > described here. The best solution for now I think would be > to have a > > way to get ordinary messages through udp. No OSC standards. > > > > > Sorry in case I missed it, but did the abstraction I sent you > recently > not work? I don't think, that it should be too difficult to > find a way > to deal with the faulty OSC messages in Pd (so that you don't > have to > touch the standalone max/msp patch). > > Roman > > >
On Wed, 2010-10-27 at 09:47 +0200, Leandro da Mota Damasceno wrote:
Hi Roman
It's ok, i just keep forgetting to reply to all...
so, I really don't understand how that could be happening, especially when in max/MSP i don't have to route any #bundle tag. It's funny how it shows how different it is to work with osc in both languages.
The inability of my proposed solution to deal with bundled messages has nothing to do with Pd's support for OSC, but simply means that my way of prepending a '/' is a bad hack and does not cover all OSC messages, namely bundles. AFAIK, [unpackOSC] from mrpeach is a more complete implementation of the OSC protocol and is able to deal with bundles, but it is strict in complying with OSC specification which requires the address to start with a '/'.
It seems that the max patch is putting every OSC message into a bundled message (which is ok) and omits the leading '/' (which is not ok). It's this combination which makes it complex to rectify it on the Pd side.
Roman
the deadline for next week is what is actually getting me worried...
best
Leandro
On Wed, Oct 27, 2010 at 9:38 AM, Roman Haefeli reduzent@gmail.com wrote: Hi Leandro
Sorry for not having responded quickly. I know that OSC supports so-called bundled messages. However, I haven't yet investigated how they actually work. It seems like your Max patch is sending bundled OSC messages. It seems like those are tagged with a '#bundle' and obviously the '/' is prepended to #bundle tag instead of the OSC address. I don't have a solution at hand for this, since it makes OSC message parsing in the byte realm even more complex. Probably there are some other ways to 'de-bundle' those messages first before prepending them a '/'? (Question to the commmunity) Roman P.S.: I think this discussion is still interesting for the list, so I cc'ed to the list. On Mon, 2010-10-25 at 09:41 +0200, Leandro da Mota Damasceno wrote: > Hi Roman. My print message is returning something like: > > > mensagem: /#bundle likeliest 1 > > > it was supposed to be /likeliest 1 > > > > > Best, > > > Leandro > > On Mon, Oct 25, 2010 at 9:18 AM, Roman Haefeli <reduzent@gmail.com> > wrote: > Sorry, I definitely missed your reply then. Can you post the > error > message again? > > Roman > > > On Mon, 2010-10-25 at 02:46 +0200, Leandro da Mota Damasceno > wrote: > > It partially worked. It seems to be something ALMOST there, > but I got > > an error message. I posted a few days ago. But it's > definitely the > > best solution right now > > > > On Sun, Oct 24, 2010 at 10:45 PM, Roman Haefeli > <reduzent@gmail.com> > > wrote: > > On Sat, 2010-10-23 at 09:40 +0200, Leandro da Mota > Damasceno > > wrote: > > > Hi > > > > > > > > > I would like to apologize for the private emails. > it's that > > when I > > > reply to the messages they go to the author, not > the list. > > Weird. > > > that's not what happens in other mailing lists... > > > > > > > > > So, I have tried to fix the standalone as jasch > suggested, > > but i got > > > all sorts of error messages. I would have to work > almost > > from scratch > > > and if my knowledge on PD is still in beginner > level, my > > knowledge of > > > max/MSP is almost null. Unfortunately, I'm on a > deadline to > > have this > > > thing working, so I need a workaround by next > week. > > > > > > > > > So right now, I'd rather not mess with the > standalone and > > working on a > > > new version by myself in a few weeks from now. > Martin, I can > > send you > > > the patch, but I'm afraid it won't be any helpful > for this > > case, since > > > it depends on dating coming from the standalone. I > can give > > it to you, > > > of course, if you want. But I think it's pretty > much what > > has been > > > described here. The best solution for now I think > would be > > to have a > > > way to get ordinary messages through udp. No OSC > standards. > > > > > > > > > Sorry in case I missed it, but did the abstraction I > sent you > > recently > > not work? I don't think, that it should be too > difficult to > > find a way > > to deal with the faulty OSC messages in Pd (so that > you don't > > have to > > touch the standalone max/msp patch). > > > > Roman > > > > > > > > > > >
On 2010-10-27 09:47, Leandro da Mota Damasceno wrote:
Hi Roman
It's ok, i just keep forgetting to reply to all...
so, I really don't understand how that could be happening, especially when in max/MSP i don't have to route any #bundle tag. It's funny how it shows how different it is to work with osc in both languages.
again: obviously max/msp has a somewhat non-standard interpretation of what OSC means. (please correct me if i'm wrong; but afaik the pd-implementation is rather "with the book" and supports everything that is "proper" (as in: standard) OSC)
furthermore, max/msp obviously knows how to deal with its own interpretation of the standard, hence you don't have any problems on max/msp with what you think is OSC.
if i tell you that "dös is a so" is english, you can either believe me and question your knowledge of english, or you don't believe me and question my definition of english. obviously some of the words look like english (and some even have the same meaning)...but it doesn't help you a lot in understanding what i said.
it would be better if we agreed on which language we meant when we want to talk in this language.
fgmsdr IOhannes
PS: there is still hope to write a translator from what you get to what Pd thinks is OSC. it might be good to get your transmitted data (e.g in binary form)
i got the impression it could be something like that. One easy way to translate it would be through max/msp itself, but then again i would have another patch running just to do a very simple task, and it doesn't sound very efficient. I do agree that translating is the best solution right now and that there must be some way to do it. I'm just not that proficient in PD to figure it out.
So, de-bundle + attach / as Roman said seems to be the best way. How do I do that?
Leandro
On Wed, Oct 27, 2010 at 10:37 AM, IOhannes m zmoelnig zmoelnig@iem.atwrote:
On 2010-10-27 09:47, Leandro da Mota Damasceno wrote:
Hi Roman
It's ok, i just keep forgetting to reply to all...
so, I really don't understand how that could be happening, especially
when
in max/MSP i don't have to route any #bundle tag. It's funny how it shows how different it is to work with osc in both languages.
again: obviously max/msp has a somewhat non-standard interpretation of what OSC means. (please correct me if i'm wrong; but afaik the pd-implementation is rather "with the book" and supports everything that is "proper" (as in: standard) OSC)
furthermore, max/msp obviously knows how to deal with its own interpretation of the standard, hence you don't have any problems on max/msp with what you think is OSC.
if i tell you that "dös is a so" is english, you can either believe me and question your knowledge of english, or you don't believe me and question my definition of english. obviously some of the words look like english (and some even have the same meaning)...but it doesn't help you a lot in understanding what i said.
it would be better if we agreed on which language we meant when we want to talk in this language.
fgmsdr IOhannes
PS: there is still hope to write a translator from what you get to what Pd thinks is OSC. it might be good to get your transmitted data (e.g in binary form)
Hi Leandro
I may have a hint, though I don't have the time to test it myself. From 1 I found this:
<snip> OSC Bundles An OSC Bundle consists of the OSC-string "#bundle" followed by an OSC Time Tag, followed by zero or more OSC Bundle Elements. The OSC-timetag is a 64-bit fixed point time tag whose semantics are described below.
An OSC Bundle Element consists of its size and its contents. The size is an int32 representing the number of 8-bit bytes in the contents, and will always be a multiple of 4. The contents are either an OSC Message or an OSC Bundle.
</snip>
Now let's assume (again a bad hack, but it seems you have to deal with bad hacks at the moment) that the bundled messages coming from max actually contain only one bundle element. This would mean that all the bundle header stuff is at the beginning of the OSC message and also it has a fixed size which we are might able to exploit.
So let's calculate the size of the OSC bundle stuff that we like to get rid of:
#bundle - tag: 8 bytes timetag: 8 bytes size of bundle element: 4 bytes
The rest is assumed to be the plain OSC message. So, what you might want to try is to split off the first 20 (8+8+4) bytes of the raw OSC message in order to get a plain unbundled OSC message.
You can achieve that with a [list split 20] inserted right after the [udpreceive]. After that you prepend the '/' and after that you insert my OSC zero-padding abstraction.
Let us know, if that works.
Roman
On Wed, 2010-10-27 at 11:12 +0200, Leandro da Mota Damasceno wrote:
i got the impression it could be something like that. One easy way to translate it would be through max/msp itself, but then again i would have another patch running just to do a very simple task, and it doesn't sound very efficient. I do agree that translating is the best solution right now and that there must be some way to do it. I'm just not that proficient in PD to figure it out.
So, de-bundle + attach / as Roman said seems to be the best way. How do I do that?
Leandro
On Wed, Oct 27, 2010 at 10:37 AM, IOhannes m zmoelnig zmoelnig@iem.at wrote: On 2010-10-27 09:47, Leandro da Mota Damasceno wrote: > Hi Roman >
> It's ok, i just keep forgetting to reply to all... > > so, I really don't understand how that could be happening, especially when > in max/MSP i don't have to route any #bundle tag. It's funny how it shows > how different it is to work with osc in both languages. again: obviously max/msp has a somewhat non-standard interpretation of what OSC means. (please correct me if i'm wrong; but afaik the pd-implementation is rather "with the book" and supports everything that is "proper" (as in: standard) OSC) furthermore, max/msp obviously knows how to deal with its own interpretation of the standard, hence you don't have any problems on max/msp with what you think is OSC. if i tell you that "dös is a so" is english, you can either believe me and question your knowledge of english, or you don't believe me and question my definition of english. obviously some of the words look like english (and some even have the same meaning)...but it doesn't help you a lot in understanding what i said. it would be better if we agreed on which language we meant when we want to talk in this language. fgmsdr IOhannes PS: there is still hope to write a translator from what you get to what Pd thinks is OSC. it might be good to get your transmitted data (e.g in binary form)
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
How about making a simple
[udpreceive] | [print]
for a typical message and then post the result. Then we could see if it's an OSC message or not and stop guessing what the problem is.
Martin
On 2010-10-27 07:52, Roman Haefeli wrote:
Hi Leandro
I may have a hint, though I don't have the time to test it myself. From 1 I found this:
<snip> OSC Bundles An OSC Bundle consists of the OSC-string "#bundle" followed by an OSC Time Tag, followed by zero or more OSC Bundle Elements. The OSC-timetag is a 64-bit fixed point time tag whose semantics are described below.
An OSC Bundle Element consists of its size and its contents. The size is an int32 representing the number of 8-bit bytes in the contents, and will always be a multiple of 4. The contents are either an OSC Message or an OSC Bundle.
</snip>
Now let's assume (again a bad hack, but it seems you have to deal with bad hacks at the moment) that the bundled messages coming from max actually contain only one bundle element. This would mean that all the bundle header stuff is at the beginning of the OSC message and also it has a fixed size which we are might able to exploit.
So let's calculate the size of the OSC bundle stuff that we like to get rid of:
#bundle - tag: 8 bytes timetag: 8 bytes size of bundle element: 4 bytes
The rest is assumed to be the plain OSC message. So, what you might want to try is to split off the first 20 (8+8+4) bytes of the raw OSC message in order to get a plain unbundled OSC message.
You can achieve that with a [list split 20] inserted right after the [udpreceive]. After that you prepend the '/' and after that you insert my OSC zero-padding abstraction.
Let us know, if that works.
Roman
On Wed, 2010-10-27 at 11:12 +0200, Leandro da Mota Damasceno wrote:
i got the impression it could be something like that. One easy way to translate it would be through max/msp itself, but then again i would have another patch running just to do a very simple task, and it doesn't sound very efficient. I do agree that translating is the best solution right now and that there must be some way to do it. I'm just not that proficient in PD to figure it out.
So, de-bundle + attach / as Roman said seems to be the best way. How do I do that?
Leandro
On Wed, Oct 27, 2010 at 10:37 AM, IOhannes m zmoelnig zmoelnig@iem.at wrote: On 2010-10-27 09:47, Leandro da Mota Damasceno wrote: > Hi Roman >
> It's ok, i just keep forgetting to reply to all... > > so, I really don't understand how that could be happening, especially when > in max/MSP i don't have to route any #bundle tag. It's funny how it shows > how different it is to work with osc in both languages. again: obviously max/msp has a somewhat non-standard interpretation of what OSC means. (please correct me if i'm wrong; but afaik the pd-implementation is rather "with the book" and supports everything that is "proper" (as in: standard) OSC) furthermore, max/msp obviously knows how to deal with its own interpretation of the standard, hence you don't have any problems on max/msp with what you think is OSC. if i tell you that "dös is a so" is english, you can either believe me and question your knowledge of english, or you don't believe me and question my definition of english. obviously some of the words look like english (and some even have the same meaning)...but it doesn't help you a lot in understanding what i said. it would be better if we agreed on which language we meant when we want to talk in this language. fgmsdr IOhannes PS: there is still hope to write a translator from what you get to what Pd thinks is OSC. it might be good to get your transmitted data (e.g in binary form)
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list