[PD] OSC messages without / (fwd)
reduzent at gmail.com
Wed Oct 27 13:52:25 CEST 2010
I may have a hint, though I don't have the time to test it myself. From
 I found this:
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.
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
#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.
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?
> On Wed, Oct 27, 2010 at 10:37 AM, IOhannes m zmoelnig
> <zmoelnig at 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.
> 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 at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
More information about the Pd-list