Re: [PD] OSC messages without / (fwd)
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 reduz...@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 reduz...@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 ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] OSC messages without / (fwd)
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 reduz...@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 reduz...@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 reduz...@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 ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] OSC messages without / (fwd)
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 reduz...@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 reduz...@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 reduz...@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
Re: [PD] OSC messages without / (fwd)
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) smime.p7s Description: S/MIME Cryptographic Signature ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] OSC messages without / (fwd)
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 zmoel...@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) ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] OSC messages without / (fwd)
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 [1]: http://opensoundcontrol.org/spec-1_0 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 zmoel...@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
Re: [PD] OSC messages without / (fwd)
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 [1]: http://opensoundcontrol.org/spec-1_0 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 zmoel...@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 ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] OSC messages without / (fwd)
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 reduz...@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 ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] OSC messages without / (fwd)
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 ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] OSC messages without / (fwd)
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 reduz...@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 ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] OSC messages without / (fwd)
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. Best, Leandro 2010/10/22 IOhannes m zmölnig zmoel...@iem.at -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 From: Leandro da Mota Damasceno lem...@gmail.com Let's think in a different way... Why would I just use a udpreceive and a route in Max/MSP to make it work and why doesn't it work with PD? What does the udpreceive does differently for the output in Max/MSP? I am guessing it was an internal unpackOSC that does not care about /. Is that it? i think, that max's [udp*] objects simply allows to use messages that are not OSC, whereas the Pd objects enforce a strict OSC-adherence. usually, the way to implement communication standards is: - - be strict in what you send (here the max-objects are faulty) - - be lax in what you accept (here the pd-objects are faulty) the simplest way to fix the problem is: adhere to the standard! so if you can change the max-patch, i would advise you to simply add a leading / to the messages you send. fgmsdft IOhannes -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzBxFkACgkQkX2Xpv6ydvS9xgCgrQZppWIAHu60uDEIqQ3MJCUh GrMAn0Wjhr77zAusMq9vVOu8QLX/dP2R =w3Q7 -END PGP SIGNATURE- ___ 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
Re: [PD] OSC messages without / (fwd)
I forward this to pd-list because I don't know why it got sent to me in private, I don't see any possible objection to sending it to pd-list, and I'm not quite knowledgeable in neither OSC nor MAX. -- Forwarded message -- Date: Thu, 21 Oct 2010 20:42:49 +0200 From: Leandro da Mota Damasceno lem...@gmail.com To: Mathieu Bouchard ma...@artengine.ca Subject: Re: [PD] OSC messages without / Let's think in a different way... Why would I just use a udpreceive and a route in Max/MSP to make it work and why doesn't it work with PD? What does the udpreceive does differently for the output in Max/MSP? I am guessing it was an internal unpackOSC that does not care about /. Is that it? On Thu, Oct 21, 2010 at 8:27 PM, Mathieu Bouchard ma...@artengine.ca wrote: On Thu, 21 Oct 2010, Leandro da Mota Damasceno wrote: Like, a lot. It just ignores the messages because of the lack of the /. Since the standalone application was made by Max/MSP users, they ignored this apparent limitation on PD. In fact, I tried in Max/MSP with a udpreceive object linked to a route and it already got me results. What does the OSC standard say about leading slashes ? ___ | Mathieu Bouchard -- Villeray, Montréal, QC___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] OSC messages without / (fwd)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 From: Leandro da Mota Damasceno lem...@gmail.com Let's think in a different way... Why would I just use a udpreceive and a route in Max/MSP to make it work and why doesn't it work with PD? What does the udpreceive does differently for the output in Max/MSP? I am guessing it was an internal unpackOSC that does not care about /. Is that it? i think, that max's [udp*] objects simply allows to use messages that are not OSC, whereas the Pd objects enforce a strict OSC-adherence. usually, the way to implement communication standards is: - - be strict in what you send (here the max-objects are faulty) - - be lax in what you accept (here the pd-objects are faulty) the simplest way to fix the problem is: adhere to the standard! so if you can change the max-patch, i would advise you to simply add a leading / to the messages you send. fgmsdft IOhannes -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzBxFkACgkQkX2Xpv6ydvS9xgCgrQZppWIAHu60uDEIqQ3MJCUh GrMAn0Wjhr77zAusMq9vVOu8QLX/dP2R =w3Q7 -END PGP SIGNATURE- ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] OSC messages without /
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/21/2010 07:26 PM, Leandro da Mota Damasceno wrote: Hey guys So, I am working with a Max/MSP standalone application that sends OSC messages through UDP, but it's not using any / signs in the beginning of the message. So I'm getting the following in PD afaik, in this case it is not OSC. you are probably sending something with your max [updsender] oject (or how it is called), but it is not OSC. http:/opensoundcontrol.org fgmasdr IOhannes -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzAeIcACgkQkX2Xpv6ydvTcmACfTULywXeUx/l8UIzA2LN4CgzG dv8AoM2M5oUW0obX19xWPRq2vpJoHmFX =TQDe -END PGP SIGNATURE- ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] OSC messages without /
On Thu, 21 Oct 2010, Leandro da Mota Damasceno wrote: Like, a lot. It just ignores the messages because of the lack of the /. Since the standalone application was made by Max/MSP users, they ignored this apparent limitation on PD. In fact, I tried in Max/MSP with a udpreceive object linked to a route and it already got me results. What does the OSC standard say about leading slashes ? ___ | Mathieu Bouchard -- Villeray, Montréal, QC___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] OSC messages without /
On 21/10/10 18:26, Leandro da Mota Damasceno wrote: So, the question is... Is there any workaround I could try in PD? | [list split 1] | | /$1 | | | [list append ] | [list trim] | ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] OSC messages without /
On Thu, 2010-10-21 at 19:39 +0100, Claude Heiland-Allen wrote: On 21/10/10 18:26, Leandro da Mota Damasceno wrote: So, the question is... Is there any workaround I could try in PD? | [list split 1] | | /$1 | | | [list append ] | [list trim] | This would require to convert the byte list to strings and then back to a byte list again. You could instead insert a [list prepend 47] (47 is the byte value of a '/') right after the [udpreceive]. Roman ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] OSC messages without /
Hi again (I reply to the list as well...) Yeah, I now remember that the OSC address must always be a multiple of 4 bytes long. I also stumbled across this problem a while ago and wrote an abstraction back then that does pad the the address of the OSC message with zeros as needed. Insert it right after the [list prepend 47]. Check attachment. Although this might work now, it's clearly the fault of your max/msp patch that obviously does not comply with the OSC standard. Roman On Thu, 2010-10-21 at 22:45 +0200, Leandro da Mota Damasceno wrote: That solution sounded good, but this is the result I got: unpackOSC: Packet size (257) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (41) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (281) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (41) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (281) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (41) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (281) not a multiple of 4 bytes: dropping packet and so on. Any ideas? On Thu, Oct 21, 2010 at 10:07 PM, Roman Haefeli reduz...@gmail.com wrote: On Thu, 2010-10-21 at 19:39 +0100, Claude Heiland-Allen wrote: On 21/10/10 18:26, Leandro da Mota Damasceno wrote: So, the question is... Is there any workaround I could try in PD? | [list split 1] | | /$1 | | | [list append ] | [list trim] | This would require to convert the byte list to strings and then back to a byte list again. You could instead insert a [list prepend 47] (47 is the byte value of a '/') right after the [udpreceive]. Roman ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list #N canvas 520 86 354 302 10; #N canvas 393 132 493 501 realign 0; #N canvas 1048 333 213 342 find 0; #X obj 15 124 list split 1; #X obj 15 77 until; #X obj 15 99 list append; #X obj 122 118 bang; #X obj 15 14 inlet; #X obj 15 43 t b a b; #X obj 15 152 t a b; #X obj 47 176 f; #X obj 47 200 + 1; #X msg 65 152 0; #X obj 15 228 sel 44; #X obj 15 252 f; #X obj 15 306 outlet; #X obj 15 275 - 1; #X connect 0 0 6 0; #X connect 0 1 2 1; #X connect 0 2 3 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 3 0 1 1; #X connect 4 0 5 0; #X connect 5 0 1 0; #X connect 5 1 2 1; #X connect 5 2 9 0; #X connect 6 0 10 0; #X connect 6 1 7 0; #X connect 7 0 8 0; #X connect 8 0 7 1; #X connect 8 0 11 1; #X connect 9 0 7 1; #X connect 10 0 11 0; #X connect 10 0 3 0; #X connect 11 0 13 0; #X connect 13 0 12 0; #X restore 82 67 pd find 44; #X obj 15 34 t a a; #X obj 15 96 list split; #N canvas 46 270 341 337 strip 0; #X obj 35 128 list split 1; #X obj 35 81 until; #X obj 35 103 list append; #X obj 142 122 bang; #X obj 15 14 inlet; #X obj 160 175 t a; #X obj 67 175 list prepend; #X obj 15 45 t b b a b; #X obj 15 210 list append; #X obj 35 151 sel 0; #X obj 195 122 b; #X obj 15 233 outlet; #X connect 0 0 9 0; #X connect 0 1 2 1; #X connect 0 2 3 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 3 0 1 1; #X connect 4 0 7 0; #X connect 5 0 6 1; #X connect 6 0 5 0; #X connect 6 0 8 1; #X connect 7 0 8 0; #X connect 7 1 1 0; #X connect 7 2 2 1; #X connect 7 3 10 0; #X connect 8 0 11 0; #X connect 9 1 6 0; #X connect 10 0 6 1; #X connect 10 0 8 1; #X restore 15 135 pd strip 0; #X obj 47 230 mod 4; #X obj 47 251 sel 0 1 2 3; #X msg 47 331 0 0 0 0; #X msg 65 311 0 0 0; #X msg 84 292 0 0; #X msg 102 272 0; #X obj 15 378 list append; #X obj 15 428 list append; #X obj 15 180 t a a; #X obj 47 208 list length; #X obj 15 9 inlet; #X text 168 67 find start of type tag: 44 = \,; #X text 101 135 strip any trailing zeros from OSC adress pattern; #X text 135 307 align OSC address to a multiple of 4 bytes; #X text 113 430 join OSC address and rest of OSC packet; #X obj 15 452 outlet; #X text 113 96 split OSC address pattern from rest of OSC packet; #X connect 0 0 2 1; #X connect 1 0 2 0; #X connect 1 1 0 0; #X connect 2 0 3 0; #X connect 2 1 11 1; #X connect 3 0 12 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 5 1 7 0; #X connect 5 2 8 0; #X connect 5 3 9 0; #X connect 6 0 10 1; #X connect 7 0 10 1; #X connect 8 0 10 1; #X connect 9 0 10 1; #X connect 10 0 11 0; #X connect 11 0 19 0; #X connect 12 0 10 0; #X connect 12 1 13 0; #X connect 13 0 4 0; #X connect 14 0 1 0; #X restore 21 32 pd realign; #X obj 21 9 inlet; #X obj 21 53 outlet; #X connect 0 0 2 0; #X connect 1 0 0 0; ___ Pd-list@iem.at mailing list UNSUBSCRIBE and
Re: [PD] OSC messages without /
Hi Roman Thanks for the help. Actually, I did not write the code in Max/MSP, but I think I will end up writing my own version of the application, because it does need a lot of tweaking. It is funny to realize how Max/MSP can be kind of agnostic towards that. Well, I will try your patch. I hope it works. I'm getting sick of my patch already :P best, Leandro On Thu, Oct 21, 2010 at 11:07 PM, Roman Haefeli reduz...@gmail.com wrote: Hi again (I reply to the list as well...) Yeah, I now remember that the OSC address must always be a multiple of 4 bytes long. I also stumbled across this problem a while ago and wrote an abstraction back then that does pad the the address of the OSC message with zeros as needed. Insert it right after the [list prepend 47]. Check attachment. Although this might work now, it's clearly the fault of your max/msp patch that obviously does not comply with the OSC standard. Roman On Thu, 2010-10-21 at 22:45 +0200, Leandro da Mota Damasceno wrote: That solution sounded good, but this is the result I got: unpackOSC: Packet size (257) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (41) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (281) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (41) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (281) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (41) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (281) not a multiple of 4 bytes: dropping packet and so on. Any ideas? On Thu, Oct 21, 2010 at 10:07 PM, Roman Haefeli reduz...@gmail.com wrote: On Thu, 2010-10-21 at 19:39 +0100, Claude Heiland-Allen wrote: On 21/10/10 18:26, Leandro da Mota Damasceno wrote: So, the question is... Is there any workaround I could try in PD? | [list split 1] | | /$1 | | | [list append ] | [list trim] | This would require to convert the byte list to strings and then back to a byte list again. You could instead insert a [list prepend 47] (47 is the byte value of a '/') right after the [udpreceive]. Roman ___ 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
Re: [PD] OSC messages without /
On 2010-10-21 13:26, Leandro da Mota Damasceno wrote: Hey guys So, I am working with a Max/MSP standalone application that sends OSC messages through UDP, but it's not using any / signs in the beginning of the message. So I'm getting the following in PD unpackOSC: Path doesn't begin with /, dropping message Maybe you could post the actual Pd patch you used to get this result? Martin ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list