"crossing the bridge" with bit accuracy from js to max
Sep 19 2013 | 9:05 pm
Hello, I'm generating bit patterns via javascript to send over the serial port (via serial object). It seems that max interprets all non-string variables as floats, and so I get rounding errors on the output of the js object. Some of these patterns are headers, so need to be bit accurate. I tried an ArrayBuffer to "cast" to Uint32, which works as long as I'm in javascriptland, but max ignores this, and treats it as a float anyway; I try to force it to an int with:
outlet(0, "int", myOutput);
but this rounds the float on the conversion, and changing the bit pattern.
Any ideas for a work-around?
Thanks!
Christopher Deckard
Seattle, Wa