SYSEX Communication


#1

Hi everyone,
I'm looking for a way to communicate with SYSEX.
I make my GUI on Liine Lemur atm that's why sysex seems to be the best way to get more than simple midi data.

I need it for various purposes:
* sending a list of every parameters names of a patch (to emulate LCD character)
* getting/setting patch parameters
* sending/receiving more complex data than the usual 7bit midi data

I tried to use the Push library c++ files by @thetechnobear (I can code in c++, c, a bit of assembler) but don't quite understand how to actually use it:
* Are the C sources compiled everytime the push object is added to the a patch?
* How can I use those sources to create another project in an IDE (say XCode) ?
* How do I create my own library in Axoloti using external C files ?

Since Lemur can receive patchs (that are XML files) via OSC(simple UDP messages) I was also thinking in storing a patch inside an Axoloti and having an Arduino bridging Serial and OSC (and adding OSCQuery to Axoloti ...)


#2

You cannot create libraries in this version of Axoloti, nor create other compileable units.
That is why the C files are included.


#3

@thetechnobear Ok but you can add file sources to an axoloti object and they will be compiled if they are referenced?
My question is more about how did you manage to develop the push object outside Axoloti:

Did you created a project with include files not showing up in the end result?
Did you compile your files with Axoloti or directly using gcc in an IDE?

I'm asking that because looking at your code I'm guessing that you didn't do it without autocompletion ...
and also because I didn't find a thread about it :confused:


#4

you can add a HEADER file , and you can see in include axo_push.h , which then just 'includes' the source files.
this is perfectly valid in C, just not a common thing to do, as you normally want separate compilation units.

there are a few issues with this approach, the main one I stumbled over was that functions defined (i.e. with code block) in a header file default to being inlined - this causes major code bloat, and was unnecessary for my needs.
this is why you can see I forward declare functions , and explicitly tell them not to be inlined using

__attribute__((noinline))

(if you need to do this, depends on complexity of your project, if its trivial is unnecessary)


workflow - hmm, was a while ago....

Its unlikely I used an IDE, its more likely a coding editor, possibly SublimeText as Ive been using it for a while, but mostly just to be able to get indentation etc.

I then would have likely been compiling in Axoloti...
if you use 'expert mode' , you can just compile , rather than going live, you can even stop it generating the code.

so process would have been something like
- keep code editor open
- make changes
- compile,
- use editor to fix code errors,
- rinse/repeat
- go live, to test new functionality

it's possible i might have been compiling the patch from the command line too, you'll find some scripts in the axoloti release if you dig a bit :wink: ... but they doesn't really save you much effort.


#5

Thank you for your help @thetechnobear
Unfortunately there's no Sysex for the MIDI DIN outputs : midi.c is incomplete :frowning:

void MidiSendSysEx(midi_device_t dev, uint8_t port, uint8_t bytes[], uint8_t len) {
    switch (dev) {
        case MIDI_DEVICE_USB_HOST: {
            usbh_MidiSendSysEx(port,bytes,len);
            break;
        }
        default: {
            // nop
        }
    }
}

I love a lot of things about axoloti but I have to say that this is quite frustrating


#6

hi,
I started a new thread about osc receiver project based on esp8266 for axoloti here : https://sebiik.github.io/community.axoloti.com.backup/t/opensoundcontrol-wifi-osc-through-esp8266-esp12-e-via-uart-beta/5291
I also use Lemur from old Ipad to send osc mess and it work (more or less...)


#8

Hey there I'm also interested in using axoloti for sending sysex to my gear via 5pin midi.

Does this mean it's not possible at all, or there is no code written yet?


#9

I don’t think it is impossible.

What do you want to use SysEx for?


#10

I want to change some parameters on my voice live touch via sysex.
I already managed to send the right sysex strings via max for live and now I want to do the same thing on axoloti. My USB port is already in use, that is why want to use din midi.


#11

I came across this just now, too bad ...
Oh, found this in another thread

sdWrite(&SDMIDI,sysexArray,13);