[PD-dev] sendOSC bug - cannot send numeric symbols

Claude Heiland-Allen claudiusmaximus at goto10.org
Tue Mar 7 20:53:18 CET 2006


Hi Frank, all,

Frank Barknecht wrote:
> Hallo,
> Claude Heiland-Allen hat gesagt: // Claude Heiland-Allen wrote:
 >
>>I'm trying to send the symbol output of [makefilename %d] using sendOSC, 
>>but it gets sent as a number instead of as a string.  If I use 
>>[makefilename x%d] it is sent as a string, but I don't want that x 
>>there.  
> 
> 
> How are you sending? You cannot conserve "symbol 2" in a list- or
> meta-message as in 
>   
>   [4(
>   |
>   [makefilename %d]
>   |
>   [send /test $1(
>   |
>   [sendOSC]
> 
> as that would be sending the equivalent of [send /test 4( and your
> "symbol" is gone before it reaches the [sendOSC]. You could of course
> send: [send /test symbol 4( though you wouldn't need [makefilename] for
> that (and it still wouldn't be a string for most apps...)


I can quite imagine that $args in "messsagebox $1" get 'reinterpreted', 
by which I mean converted to a string and then back into whatever type 
Pd thinks that string should be (this is necessary for constructs like 
"messagebox $1-blah".

But, I'm using [pack s s s], and as the attached patch shows the real 
type of each atom in the list is preserved as it should be, it's only 
when it reaches sendOSC that the 'reinterpretation' occurs.

Anyway, I rewrote the receiving program to accept numbers instead of 
strings, because I had that option, but this won't always be possible, 
so my conclusion is that sendOSC is broken.


Claude
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: numeric-symbol-pain.pd
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20060307/28ef7c2b/attachment.txt>


More information about the Pd-dev mailing list