Connecting Ableton Live and Arduino to Max/MSP - issues with ports

blops's icon

Operting System: Windows 10
Ableton version: Ableton Live 10
Max/MSP version: Max 8
Hardware: Arduino UNO

I want to route midi data from Ableton Live into a Max patch and use that data to control an Arduino UNO.
I was able to route the midi data from Ableton Live to Max using the 3rd party driver loopMIDI (which is needed when using Windows).
I'm also able to send data from Max/MSP to the Arduino.
However, when I try to have both in the same patch, I get the error "serial - Serial error writing to serial port". I believe the issue is with the use of the ports (perhaps it tries to write to Ableton as well?), but I'm not quite sure how to debug it or fix it.

Please let me know if you have any ideas or how to learn more about it.
Thanks

Ableton to Max.maxpat
text/plain 3.70 KB

Source Audio's icon

patch you posted shows nothing.

You need to capture midi sent from Live
into max patch, to see what gets in, and what causes
problems when you try to reroute it to serial port.
I guess you have some reasons not to talk directy from Live to arduino ?

Or maybe you do, having 2 serial ports assigned to same arduino board ?
That won't work.

blops's icon

patch you posted shows nothing.

Sorry not sure why it shows as empty for you. I attached a screenshot of my patch below. The notein object correctly captures the midi from Ableton Live when I don't use the serial object. The serial object correcly sends data to my Arduino if I don't have the notein object. What doesn't work is having both.

I guess you have some reasons not to talk directy from Live to arduino ?

Yeah, I want to make use of the functionality of Max.

That won't work.

Do you mean I can't use Max as an interface between Ableton and Arduino?

Thanks

Source Audio's icon

What I meant with "shows nothing" is not that patch is empty, but that it
shows no link between midi input and serial object.
Live sends tons of midi messages if one does not filter them,
which might trouble your serial object.

but if you don't even connect midi from Live to serial object,
and just existance of notein object in the patch breaks serial port,
then I can't say what the problem could be.

what are your OS, max, live versions, and what does arduino code do ?

if you have rev3 UNO with ATMEGA16U2 which makes it native USB Midi capable if one flashes it so, maybe there lays the problem ?