Page 1 of 1

Writing System Exclusive LSB MSB 2byte Data

Posted: 09 Apr 2014 22:19
by sleeper
I'm trying to get some sysex commands to a EMU synth module, but I need a little assist on a few details.
I've been deconstructing to learn this, but I'm stuck now.
(I hope thie solution makes the manual, because it should be easy to figure out and it isn't
in part due to the forum not returning the term "sysex" in it's searches)

I've grabbed a working set of faders and scripts from the Oberheim Matrix1000 project.
it's talking to my Matrix 6 just fine and there are components in there that do the things I'm after.

for example the DAHDSR multifader. (these are in a container BTW)
for a midi control getting its x value from the 4th fader of a multifader

on expression x[3]
midiout(MIDITarg, {0xF0, 0x10, 0x06, 0x06, 0x34, x[3]*63, 0xF7});

And here is an example of working sysex as it gets written by Novation SLMk2
F0 10 06 06 34 DV F7


BUT
the emu has more complicated sysex, with LSB msb parameters and 2byte values
here's an example parameter message from the manual

F0 18 04 dd 03 pL pM vL vM F7

dd device Id (my device id is set to 1)
pL parameter lsb
mL parameter msb
vL value lsb
vM value msb

And here is an example of working sysex as it gets written to Novation SLMk2

F0 18 04 01 03 20 00 DV 00 F7

I really only have 2 question/b]
in this
midiout(MIDITarg, {0xF0, 0x10, 0x06, 0x06, 0x34, x[3]*63, 0xF7});
what exactly is Ox saying? I assuming here comes another sysex address. Anything else?

AND
why does the variable look like this?
how do I write a LSB MSB variable? or do I even have to? Is the novation value DV converting that somehow...
x[3]*63

Thanks All for any help.

Re: Writing System Exclusive LSB MSB 2byte Data

Posted: 10 Apr 2014 03:10
by Macciza
Hi
I think you need to do a bit of a search on sysex in general, as well as number formats used . . .
0x simply defines it as a hexadecimal number - base 16 - 0 to F
You can also use decimal equivalents but lots of info is in hex because that is what computers speak .. .

Those 2 byte values could be 14bit values - 2 7bit values in 2 bytes, or it could be 1 byte 'nibbled ' into 2 bytes - 2 lots of 4 bit values, or a number of other variants
You will need to find, or work out, what sort of data it is expecting - there are scripts around that can deal with either situation . . .

That 'DV' just means that that is where one byte of the 'Data Value' goes - i.e. x * 127 it might say DV DV or xx xx or whatever in the specification or examples

For the Emu device you will need its sysex info to work out what the parameter numbers are and what values it is expecting
Once you get that stuff it will all start making a bit more sense - simply a case of sticking the right numbers into it all

HTH
MM