<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Hi,</div>

<div> </div>

<div>> for oscformat:</div>

<div> </div>

<div>the address pattern is given without slashes, i.e. instead of [oscformat /foo/bar] you have to do [oscformat foo bar]. If you're used to [/foo/bar 1 2 3( -> [mrpeach/packOSC], you can do the same with [set foo bar, 1 2 3] -> [oscformat] (note the comma!). You basically have to first set the address pattern and then send the arguments.</div>

<div> </div>

<div>> For oscparse:
<div>- when it receives a message with slashes in it, it removes the slashes automatically. Which is kind of acceptable, if it's going to be connected with a normal route. But not that much if the message is going to be worked on, and resent.</div>

<div> </div>

<div>It depends. If you resend it with [oscformat], you don't need the slashes. If you need the "original" format of the OSC address string, it can get troublesome. Also note that there is no distinction between address string and arguments - you have to know in advance where the address string ends and the arguments start.</div>

<div> </div>

<div>I think [oscformat]/[oscparse] are fine for simple use cases, but for everything else you should use the mrpeach objects, especially if you need things like type tags, bundles, timetags, pattern patching etc. This is even mentioned in the help file of [oscparse].</div>

<div> </div>

<div>Christof</div>
</div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Freitag, 12. Juli 2019 um 17:48 Uhr<br/>
<b>Von:</b> "João Pais" <jmmmpais@gmail.com><br/>
<b>An:</b> "pd-list@lists.iem.at" <pd-list@mail.iem.at><br/>
<b>Betreff:</b> [PD] Problems with oscformat (and oscparse?) and slashes</div>

<div name="quoted-content">
<div>
<div>Hi all,</div>

<div> </div>

<div>I'm having some issues with oscformat and slashes ( / ). Many programs out there use formats such as "/parameter/bla 1", but both oscformat and oscparse don't really cope that well with them.</div>

<div> </div>

<div>For oscformat:</div>

<div>- it's not possible to send a string starting with a slash, the message "oscformat: no method for '/aa' " appears.</div>

<div>- A hack can be done by sending a message [set /aa, bang( ...</div>

<div>- ... but this doesn't work if the message to send is /aa 1, as oscparse will convert it to /aa/1</div>

<div>- defining an object as [oscformat /aa] seems to work, but it will mean that another oscformat object has to be defined for each single string being sent: /aa, /aa/a, /aa/b, ...</div>

<div> </div>

<div> </div>

<div>For oscparse:</div>

<div>- when it receives a message with slashes in it, it removes the slashes automatically. Which is kind of acceptable, if it's going to be connected with a normal route. But not that much if the message is going to be worked on, and resent.</div>

<div> </div>

<div>Or is there any other way of doing this? The documentation doesn't present anything else. It took some time of screaming at the computer until I compared the results with mrpeach's objects.</div>

<div> </div>

<div>Best,</div>

<div> </div>

<div>Joao</div>
</div>
_______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a></div>
</div>
</div>
</div></div></body></html>