[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] Is there a bug with asRawOSC?



Well, I don't have a lot of cycles to burn on what is a really minor point, but if it's a command name rather than number, the result is totally different. It doesn't make sense to me that asRawOSC would throw out the whole message.

[ \s_new, \default, 1000, 0, 1, \freq, 600, \amp, 0.1 ].asRawOSC

Int8Array[ 115, 95, 110, 101, 119, 0, 0, 0, 44, 115, 105, 105, 105, 115, 105, 115, 102, 0, 0, 0, 100, 101, 102, 97, 117, 108, 116, 0, 0, 0, 3, -24, 0, 0, 0, 0, 0, 0, 0, 1, 102, 114, 101, 113, 0, 0, 0, 0, 0, 0, 2, 88, 97, 109, 112, 0, 61, -52, -52, -51 ]

OK, I kind of get it now:

// a 1-message bundle
[ 1, [9, \default, 1000, 0, 1, \freq, 600, \amp, 0.1] ].asRawOSC

Int8Array[ 35, 98, 117, 110, 100, 108, 101, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 9, 44, 115, 105, 105, 105, 115, 105, 115, 102, 0, 0, 0, 100, 101, 102, 97, 117, 108, 116, 0, 0, 0, 3, -24, 0, 0, 0, 0, 0, 0, 0, 1, 102, 114, 101, 113, 0, 0, 0, 0, 0, 0, 2, 88, 97, 109, 112, 0, 61, -52, -52, -51 ]

So, "how should it detect bundles"... it's only a bundle if it's a nested array :) so it could behave differently if the array is flat.

Anyway, I don't have a lot of time to spend on this so I'll let it go.
hjh


On Dec 23, 2008, at 6:40 AM, Sciss wrote:

[ 9, \default, 1000, 0, 1, \freq, 600, \amp, 0.1 ].asRawOSC.collect(_.asAscii)

--> [ #, b, u, n, d, l, e,

... how else should it detect bundles? don't know how the abbreviated number commands from Node etc. get through though...


: H. James Harkins
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman