[chuck-dev] osc bug & example flaw (fwd)

joerg piringer joerg at piringer.net
Wed Apr 26 13:43:22 EDT 2006


Philip Davidson wrote:
> we have bugs on both sides! In reverse order...
> 
> for the second:
> 
> you will notice that your request - getString(), does not match the 
> expected 'f' float tag.


i know, i know, but it shouldnt crash the program?

> 
> Our OSC implementation returns a null pointer with such an argument 
> mismatch, and we weren't handling that correctly. I have just checked in 
> a fix that returns an empty string instead.  If you run with 
> "--verbose4" you will see the associated warnings.

great!

  > as to the first issue:
> 
>  > instead of recv.event( "/foo/notes, i f" ) @=> OscEvent oe;
>  > it should be: recv.event( "/foo/notes", "i f" ) @=> OscEvent oe;
> 
> both forms are acceptable.
> 
> In the second, the second argument is the type string.
> 
> In the first, we treat everything following the first occurrence of ' ' 
> or ',' as the type string ( all additional spaces or commas are ignored 
> ). As per OSC spec, the type string is a contiguous string of format 
> specifiers. In your example, our parser implicitly performs the 
> translation from  "s i i f f f f f f f f" to ",siiffffffff"

the difference is:
the second works, the first doesn't.

joerg

-- 
http://joerg.piringer.net
http://www.transacoustic-research.com
http://www.iftaf.org
http://www.vegetableorchestra.org/


-- 
http://joerg.piringer.net
http://www.transacoustic-research.com
http://www.iftaf.org
http://www.vegetableorchestra.org/


More information about the chuck-dev mailing list