Jotting down my notes on having finally succeeded at getting Ableton Live to move a servo using Arduino. Will update it as I learn more and hopefully refine it.
Most of what I learned came from this YouTube tutorial from Beat Lab.
Here are some things I figured out…
- The Max for Live device you are looking for cannot be found by searching “Connection Kit”, try searching “Arduino”
- Before opening up Ableton, your Arduino Uno needs to be connected and also have the following sketch pre-installed: Standard Firmata (File -> Examples -> Firmata)
- Don’t run Ableton and the Arduino IDE at the same time, they both cannot simultaneously talk to the Arduino.
- You can force the Arduino to a particular COM Port. You shouldn’t need to do this as Ableton should be able to find it, but in case you have to on Windows, it is in Device Manager -> Ports -> Arduino Uno -> Properties -> Port Settings -> Advanced -> COM Port Number
- Open a Midi Track, add the Arduino device. Select the right Port in the drop down (Device Manager will tell you which one it is), hit rescan if you can’t find it.
- Add an empty Audio Effect Rack after Arduino and open up the Macros view
- Select Digital and then look for the ID corresponding to the pin you used for the servo signal, such as D9 for Pin 9
- Important: make sure the servo arm is not attached to anything just yet since it may swing wildly and could stress it.
- Select Servo under Type. Click Map in the Parameter column and then select Macro 1 to complete the mapping.
- The servo should move as you adjust the Macro, but I noticed sometimes it doesn’t quite work and I’m not sure why. Experimentation may be necessary here, such as messing around by switching the Type to PWM and/or Output before readjusting the Macro button got mine to finally “connect” with the servo.
- Add a Drum Rack to the track and place a sample on a pad. The sample Gain will affect the servo movement so you may need to adjust it (see below)
- Add an Envelope Follower. It can be found in the Max for Live Essentials pack. I do notice however this has been marked as Discontinued so we’ll need to figure out another way to do this some time soon.
- On the Envelope Follower, click the map button and then select the Macro 1 knob. Once you do this you can no longer manually change the Macro yourselves as the Envelope Follower is controlling it.
- Important, when you’re experimenting around and it stops working, sometimes the fix is to delete the Envelope Follower map (blue X) and re-map.
- The Min and Max values of Envelope Follower affect the servo travel.
- The Min and Max values in the Arduino device affect the servo travel.
- The Gain on the Envelope Follower affects the servo travel.
- Put your sample in the loop and mess with all four ways to affect servo travel (circled red in image below). Once you see the arm moving in the range that you want it, then connect the servo arm to the horn of whatever object you are manipulating.
This was my first pass. I will probably learn more ways to improve the setup and will update this page accordingly.