On Sun, 14 Jul 2013 11:40:59 +0200
"Sean M. Pappalardo - D.J. Pegasus"
<[email protected]> wrote:
> On 07/14/2013 01:53 AM, petah wrote:
> > From your experience do you think SysEx can be used to pass around any type
> > of binary data?
>
> No. The high bit cannot be set in any of the data bytes since doing so
> signals a status byte and will abort the SysEx.
Right, that's why I wrote an 8->7->8 bit codec.
> For arbitrary data, I'd use HID which Mixxx fully supports now.
Well "common-hid-packet-parser.js" is rather large and complex and I'm
interfacing a soft-device so simulating a virtual "HID device" may not be
trivial without root access. Theoretically SysEx should do the job because I
can choose whatever data format on both ends and my 7-to-8 bit decoder is quite
small:
function Decode7(encoded7_data)
{
var dec8data = [];
var mask = 0;
for (var i = 0, j = 0; i < encoded7_data.length; i++, j++)
{ if (0 == (i & 7))
{ // get new mask
mask = encoded7_data[i++];
}
// recompute cycle index
var ind = (i & 7);
// retrieve high-bit
var highbit = (mask & (0x80 >> ind)) << ind;
// combine low-7 with high-bit
dec8data[j] = encoded7_data[i] | highbit;
}
return dec8data;
}
It looks like I just need to make sure I don't use an existing SysEx
manufacturer ID or are there more caveats?
thx & cheers,
-- p
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel