how to send data from python to max8

hyelee choi's icon

hello everyone I'm a student in college , major in sound
I'm sorry that I can't speak English very well.. but I can read all request with google haha
I want to make a sound art with emotion recognize with python
I learn a year about max8, but I'm a newbie in python

I found 2ways

1. Using "shell" object in max
2. Sending strings from Python to Max using an Arduino

but these three methods are not completely understood

and this is my question

1. Which form of python real-time data to send "shell" object
2. I watched this video and I want to know about way of Arduino and max patch
>https://www.youtube.com/watch?v=AyAGFtYR8Pc

if you know about connecting between python and max, please help

thanks a lot

Bradley Korth's icon

I think you might be looking for the Max object called "serial". Both Python and Max can interface with the serial port.

Source Audio's icon

I would say it depends on what the communication needs to look like.
Shell can work with python, but i am not sure to which extent.
You can try it, but remember shell object needs absolute path
to python executable to run.
You can't simply run python give me a beer
You must send it /Dev/MyCrazyPythonVersion/python give me a beer

And Max is tricky when dealing with paths, symbols etc
What you see is not allways what you get

Or try some implementation of python –OSC.
Depends on python version, win or mac etc
I am sure your friend google will give you enough infos about that.
to simplify : python outputs OSC via UDP, max receives it