View Single Post
Old 10-01-2014, 01:24 AM   #106
Celphor
Human being with feelings
 
Join Date: Jan 2013
Location: Austria
Posts: 73
Default Sysex

As discussed earlier in this thread, sysex support is urgently required to make OSCII-bot the perfect tool.

I extended it for myself to allow sysex sending. This is an easy task when using a string.

To receive sysex I need a special section (like @sysex). Easy too. What I didn't find out is the how to map data from C++ to the EEL memory.
I could put the data in a string, but that's not working, because strings are NULL-terminated in EEL.

Does anybody now how to achieve this? :

@sysex

// Data is stored in memory at sysexmsg and length in sysexmsg_length
// Access data

sysexmsg[0] == 0xF0 ? (
... bla bla

);

--- and ---

@init

buf = 23;
buf[0] = 0xF0;
..
buf[n] = 0xF7;

sendsysex(buf, n);


--

A function like this exists in JSFX, so Justin, if you won't copy it yourself, could you be so kind and hand over a sniplet ?

Thanks in advance
Celphor is offline   Reply With Quote