Midi system exlusive and “not implemented in xod”

Hi.
I’m trying to do a hobby project and making a simple midi controller that can send and recieve sysex.

First of all, I want to do the sending.
I have an encorder pot. I can read it in fine.

I want to convert pot reading to hex code and send it via usb.
So pot reading zero should be, for instance E0 00 00.
Pot reading max, should send for instance E0 7f 7f

Somehow I need to convert the encoder up/down and min/max it. Then convert it to hex/sysex.
I tried the math/map" node. But the math/map can’t compile for some reason. It says “not implemented in XOD”. I tried using: gweimer/utils/cast-number-to-hex-string. but this has the same issue. How do I fix it?
Thanks

Thanks :slight_smile:

This is what you are trying to do? (replacing POT with tweak-number so I don’t need hardware to test)
image
This works fine for me on Arduino Uno.

Where are you seeing “not implemented in XOD”? When compile failed, did you scroll back to see what the initial error was?

1 Like

thanks for replying @gweimer. Im on xod 0.38.0.
This works fine if I test on the web version, but fails if I upload it on the real windows version.
Tried uploading to a raspberry Pi PICO and Arduino Uno.

With the exact same nodes in my project as you, except i leave out the “cast number” node, for simplicitys sake, I get an error (and I can’t do a simulation either, it says I have no internet connection?).

Why would there be a difference between the cloud version and the downloaded version?

Do I need to install other software than xod itself?

Error:

Begin compiling code for the board Arduino Uno :package:

C:\Users\TRJ1\AppData\Local\Temp\xod_temp_sketchbookV5xxXO\xod_1717132345250_sketch\xod_1717132345250_sketch.ino:1014:9: error: ‘xod__math__map’ does not name a type
typedef xod__math__map::Node Node_5;
^~~~~~~~~~~~~~

C:\Users\TRJ1\AppData\Local\Temp\xod_temp_sketchbookV5xxXO\xod_1717132345250_sketch\xod_1717132345250_sketch.ino:1015:1: error: ‘Node_5’ does not name a type
Node_5 node_5 = Node_5(0);
^~~~~~

C:\Users\TRJ1\AppData\Local\Temp\xod_temp_sketchbookV5xxXO\xod_1717132345250_sketch\xod_1717132345250_sketch.ino: In function ‘void xod::runTransaction()’:
C:\Users\TRJ1\AppData\Local\Temp\xod_temp_sketchbookV5xxXO\xod_1717132345250_sketch\xod_1717132345250_sketch.ino:1079:13: error: ‘Node_5’ has not been declared
Node_5::ContextObject ctxObj;
^~~~~~
C:\Users\TRJ1\AppData\Local\Temp\xod_temp_sketchbookV5xxXO\xod_1717132345250_sketch\xod_1717132345250_sketch.ino:1082:13: error: ‘ctxObj’ was not declared in this scope
ctxObj._input_X = node_0_output_VAL;
^~~~~~

C:\Users\TRJ1\AppData\Local\Temp\xod_temp_sketchbookV5xxXO\xod_1717132345250_sketch\xod_1717132345250_sketch.ino:1092:13: error: ‘node_5’ was not declared in this scope
node_5.evaluate(&ctxObj);
^~~~~~

Error during build: exit status 1
Compilation failed
Command Process exited with code 1
The generated C++ code contains errors. It can be due to a bad node implementation or if your board is not compatible with XOD runtime code. The original compiler error message is above. Fix C++ errors to continue. If you believe it is a bug, report the problem to XOD developers.

I’m having issues with cloud compile while it is working for others…I wrote it off as being a problem with my web proxy server.

I am running same version of XOD. Seeing that errors seem to be related to node definitions, I’m guessing somewhere along the line you modified a built-in node, so you have a __lib__\xod* folder in your workspace with old versions of built-in nodes. If this is the case, simply close XOD, rename any xod* folders in your __lib__ folder and restart XOD. If you are unsure where your workspace is on your drive, you can try to change workspace from the File menu & it should default to the current path.

Tried a different machine and it worked. Did not test your solution yet.

Thanks:)

Ok. Got this far:

Basically I am trying to convert my encoder input to sysex (a type of midi that uses hex for numbers I guess) and then send it.

How do I get any further? I can´t seen to find any sysex functionality in XOD. So with the help of chatgpt, i tried to make it myself with concat nodes. But I need to pack them into a single “thing” that will be sent as a midi message and can go into the “send” node, in the far right lower corner.
Thanks! :slight_smile:

sysex expects string input, so you can just tie the last concat output to send-MSG.

Concat is an expandable node. Rather than have 5 concat nodes daisy-chained, you can expand one node to have 6 inputs using the tab at the right side of the node. Your 2-4 strings are just static strings, so they can be combined into a single string so you only need 4 inputs.

If your 1st and last input are trying to send hex values, you need to convert that value to an bytes rather than sending a hex string. You are currently sending the characters “0xf0” as the first 4 bytes. I assume you actually want to send 240 as the 1st byte. The easiest option is to have the character representing ASCII 240 as the first character of your string, but it is an extended ASCII character, so there is no keyboard character you can use. At least in Windows, you can hold down the ALT key and type 240, then release the ALT key to get the ACII character for 240.

Thanks. The thing is that I can’t send the output of the last concat to send msg, because the msg in doesnt allow string. Don’t know what type it allows.

But thanks for the other tips :slight_smile:

Looks like input is type “Message”, which can be built using the e/midi/message node. The message can only be 1 or 2 bytes long, hence the D1 & D2 inputs for the 2 bytes.

TYPE is likely used to generate the ASCII 240 that you have hard-coded. XOD code doesn’t specify what valid types are…I guess you could try using 240 as the TYPE

CH is to designate channel 1-16

Hey there,
I understand the frustration you’re facing with MIDI system exclusive messages not being implemented in XOD. Here’s what you can try:

  • Check XOD Documentation: See if XOD’s docs mention anything about MIDI system exclusive messages.
  • Community Help: Ask for advice on XOD forums or online. Others might have ideas or solutions.
  • Customize: If XOD doesn’t support it, you might need to create your own solution.
  • Ask for Help: Don’t be afraid to ask XOD support or the community for assistance.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.