update:
With some help from Embodme support and the Python implementation example, I managed to send a Max message to enable API mode. The components of the sysex message are in the erae_api_sysex.py code.
https://gitlab.com/embodme/erae_api_sysex/-/blob/main/erae/erae_api_sysex.py?ref_type=heads
( 240 0 33 80 0 1 0 2 1 1 4 1 1 1 3 247 )
Using the Javascript code supplied in another thread on this topic, I can now print out the data received from the Erae in Max.
Download JS code here: https://embodme.freshdesk.com/support/discussions/topics/80000662216
The next step is parsing this data to get the high resolution XYZ values for each touch point. If anyone has experience in Python and wants to help, please update this thread.
I think I've hit on the same point, but I don't have the coding knowledge to break down the sysex message and convert the bytearrays to floats in Javascript.
Have you run the example Python code for the sysex API and seen it successfully output xyz data from the Erae as high-resolution floats?
It would be good to know that it definitely works before trying to port it to JS..
Just a heads up for anyone else doing this, I had to first send the API mode enable message from Max (see screenshot above) to the Erae before the python script started working. Not sure why because there is an enable_api_mode call in run_erae_api.py.
The xyx data for each finger detection can then be sent to Max via OSC using python-osc
https://pypi.org/project/python-osc/
arvind
Does anyone know how to send the 'API Mode Enable' sysex message to the Erae 2 in Max using the [sxformat] and [midiout] objects?
I'm trying to get a Max patch that can receive high resolution XYZ data. If anyone from Embodme reads this, can you please respond with an example patch and javascript code to enable API mode and receive data?