MPU6050 to max and then to Ableton

Tatart's icon

Hello everybody!

I am trying to build up a project but my knowledge about sensors, max and programming is not enough so I might ask for some help and thank you in advance for that.
So, because of an exam that I have in a couple of weeks, I need to use an MPU6050 sensor in order to activate midi channels in Ableton. I have already connected my sensor to an arduino Uno and I have uploaded a short code that reads the angles (tested, works-). Although I have tried lots of tutorials I still don't have any result... Since my knowledge of the software is too less, I need some step-by-step instructions on how to build this project and I would be very grateful if I had some.
Thanks a lot,
greetings,
Tassos

brendan mccloskey's icon

Hi
a couple of weeks is plenty of time to do a little bit of research and practice, and to learn some new skills ;)

What Arduino sketch are you using to read the MPU?

Brendan

Tatart's icon

Hi Brendan!
Thanks for answering. At the beginning I uploaded the basic simple sketch that reads the values from the sensor and I have found it in the forums of the arduino community.
Then I didn't know how I can send these values to Ableton and how they can be received as commands by ableton. So, I have found the Maxuino and I have uploaded the Firmata in the Arduino (so this means no interpreting values from the sensor?) and then I used the maxuino patch in Ableton.
Now, I am happy to see the analog pins in the maxuino in ableton responding but I am totally stuck. I have no idea if and how ableton reads and interprets these values, or what I have to map in Ableton. Is there any code that I have to write in Max?.... Really don't know...

good evening,
Tassos

brendan mccloskey's icon

Hi
there are a number of alternative solutions for getting Arduino sensor data into Ableton Live, for example:
https://cycling74.com/forums/arduino-ableton-live/

I don't use Maxuino (I write my own sketches in Arduino), so I don't know exactly what you mean by "see the analog pins in the maxuino in ableton responding". I presume you use Max4Live? Have you looked here:
http://makezine.com/2009/10/14/using-arduino-with-abletons-max-for/
or here:
https://vimeo.com/74423384 (Maxuino for Live)

Is the problem that you are able to read the MPU in Arduino serial monitor, and in Max4Live, but unable to assign the data to a device or track in Live?

Part of the problem might be that there are too many unknowns in your data flow. Can I suggest that you use the simple MPU example from the Arduino website, and take note of the data it is printing to the serial monitor window in Arduino - it's probably something like AcX:, AcY:, etc. followed by the actual readings. If you post your code I could maybe hack something together, but certainly not this week I'm afraid . . .
Brendan

brendan mccloskey's icon

. . . and in case you don't want to hear about "alternative solutions", try rephrasing your question on the Max4Live forum here, maybe get better quicker help there ;)

Brendan

Tatart's icon

Hi Brendan!

First of all thanks a lot for your replies.
So I have some great progress due to the great help of a friend of mine WITHOUT Maxuino.
Code in Arduino uploaded V
Patch in Max that reads the Gyroscope V
Patch that activates 4 different sounds in Max when you use the 4 different angles of the X axe of the gyroscope. V

So now, the only problem is that we cannot make a trigger that is going to activate my four different channels or groups of channels in Ableton.

PS: What I need is that the arduino will activate the channels but I need to have live access to my channels through my APC key controller mostly because of controlling effects.
My steps until now, could allow me to record my channels seperately and just play them through Max, but I still need the control of the effects that's why I need to find out the way of activating the midi channels through Max for live (I guess...)...

Thanks a lot for the support.

Cheers and best,
Tassos

brendan mccloskey's icon

Ok, good to hear you are making progress.

Make your way over to the Max for Live forum here, and ask about [live.object] and [live.remote~]. I've been pounding the forum recently regarding M4L, and various solutions and help are offered here:

Good luck

Brendan

Tatart's icon

Great to receiving that...!

Thanks a lot!
Tassos