1

I just did the tutorial "How to Set Up Arduino with Max/MSP". I’m new to Arduino and Max but I’ve used the tutorial to get digital inputs into max working – great start as I failed with several other tutorials!

Now I’m stuck what to do next in Max. What I want to do eventually is have my sensors on arduino play instruments in Ableton Live (be able to use them to play notes or map to effect/synth parameters etc). Could you please provide some basic instruction on next steps or point me towards another tutorial if you know of one?

Thanks again, AndyJ


Well I got my hands on the maxuino v.009 which has a Max4Live patch which should, in theory, make it easy for someone like me to use the arduino in Ableton Live.

However, being new to Live and M4L I can’t work out how to use the M4L device to do anything musical.

The device is seeing my board and sensors OK as the A_in and the PWm sliders move up & down with sensor actuation.

I want, for example, a sensor to play a particular note or modify a parameter of a built in Live analog synth.

If anyone has a chance to look at this Max4Live device and could give any advice on how to 'connect' it to play a live instrument, it would be greatly appreciated.

Thanks

1
  • @AndyJ Do you have Max4Live? Feb 23, 2010 at 9:37

5 Answers 5

1

Hey AndyJ,

Once you get values from your sensor into Max/MSP, you will need to scale your sensor's range to the range of the parameter you want to map.

Here's a very basic way you could go about it:

  • You'll need to find the range from your sensor. One way is to use the objects [peak] and [trough] to see the highest and lowest value. Try get your sensor to output the minimum and the maximum value. Here's the Max patch:

----------begin_max5_patcher----------
558.3oc2VEsaaBCE8Y3qvxOyhvl.jr252QW0DAbS7FXi.iV1p5+9LWSRnqDj
SAQp1K1wWbN5bN2qu1u35f2IOxpwnuhdD437hqiCDpMfS2ZGbQxwz7jZXa3T
YQASnvdluoXGUPb8l3EMEeSTkH1yN84btfkJaDvdncAEMExFUNSAH52EsrhU
qANQwkhuWwRUFVEudkuGhDBS9cCnm59SOKEpZ9eXs6kPWcFqDU5AtXeebBL3
PZmh.zBV2CIdFHC4te7EJE2CdQRA.O9gJdRN9hF3hSRfzF6UW21Auo5ibwz7
Q6sjsFGIvBGgbGcj15BEdlzLIHDDpuQ6vD0eXUS1t.pdWiRIECKORWTSH0uK
YFQf2oqMvmo7PxjDeQlzwUY7roEA6WZDeWBToOxNt.uR96c594bYhxFgGtAj
b7nBObARuZFqwXX0S+Pp2yhzeDHbR.E7hwS+z+ecA6MA+6X+M8sd0xJDWT1L
as4fx+0Vzia8mvrOMbUbjOIb6LUBPga31B9PPzv9vlEvGtV6wJYy9CWsGYvG
87AWbdZLKxb+OwOnWeyqTrbqsJnymIUxR94cyhh56Pi2HYBNDfG7Ru+4A4.i
Zi+VaqV1TkdRRmtIGcgVYrZEW.umt+lBeylNvyxXh9MYJ3YkRsizQBzSClDs
lSgVvIccEh74hRjEkRarzjtg7FIbUnGZST6XD8zumHOo13b2HQMjiXdqVbz4
EKfkRV1iB1vH+IPI8hWc+KPfpZpm
-----------end_max5_patcher-----------
  • You will then need to set the range you want to scale. If for example, the range you got from step 1 is 0.0 to 19.5 and you want to change the pitch of a synth from middle C (264Hz) to one octave above (528Hz), you would setup the scale object like this: [scale 0. 19.5 264 528]. Here's the Max patch:

----------begin_max5_patcher----------
403.3ocyTEsaCBBE8Y8qfvycMhJVcusuiklEpRaYQAihacqo+6Ctpc1MWqMK
qYu.gKWN2y8vA165fWo1wqwn6QOhbb1653.grAb5V6fKX6RyY0PZ3TUQAWpw
yZ2Sy2og3uvxa3HsBUvJQ86JaJTM5btFNqWWzxJdsABlVnjOUwS0s02OZt2L
Dg3Ym5GPK6NzZkTWKdmayk3O+HVLc5VgbyPbB.bBAHHTXxeHThLfwpUOeW.d
.7RVA.O9gJAKePOHj8s.wF6fqqcX1DUr04JCFiKI9WPRBgdvO4hRhOc9hHOB
Moau1Zneqj2hjkELysFBuhI2fOhwX5GAJpGLk.UMHZb4idCjuexvYzqZUERH
Kazm2uc0VmjI3bB+m3b9SMAAwW1CDeCDBI+USo9tEHkkyMOIr2XTy+GgHpe7
3xE47dguoTSPbVrn8wI8b1DxUpNQCTG.ObtP90enAJYiepjUqZpR6afthi9j
UY7ZsPBewLHG5I4rUjkwkCe7THxJUBotiBnkid8MUFEOAFQ9ELxr3f6GhRXk
7B
-----------end_max5_patcher-----------

This approach will get you started. The hard bit is the tweaking and smoothing of the data.

I recommend you especially go through the "Data Scaling" Max tutorial, but the more tutorials you can get through, the better. If you specifically want to use Ableton Live, then Max for Live is perfect for your needs. A great resource is Max4Live.info, and of course the Max for Live tutorials.

I hope this gets you started.

2
  • Great - thanks Andrew. Your patches were very useful. I've experimented with scaling for a potentiometer and a light sensor on the arduino. I haven't worked out max4live yet so I've just used midiyoke to send the output to Live straight from Max. I'm off now to work through some of the Max and Max4Live tutorials - they all look good. However when you first start on a project it's very useful to be able to dive straight in and get something up and running without wading through the entire manual. These patches have helped me do just that. Thanks again.
    – AndyJ
    Feb 23, 2010 at 20:49
  • I know what you mean, it can be overwhelming when trying to find specific information but have to go through dozens of tutorials. I also learn mostly by just doing it (and suffering through hours of trial and error). Glad these patches will help you get started. Feb 24, 2010 at 7:34
1

I see...well, ctlout is definitely what you need! You'll need to give the ctlout object a channel number and value, and assign the MIDI output to "From Max/MSP 1" (using the midiinfo object). Also, set Ableton to listen out for that midi port. This patch might help?


----------begin_max5_patcher----------
855.3oc2W00aaBCE84jeEWwyoQXf.g8Vj5KUpQpRU6o0oIGvIwqfMBLsoqp+
220FHKYMzjPR6p1KP7Gw2y8bteXdteOqYxUrBK3Kv2fd8dteudlozSzqdbOq
T5pnDZgYaVQxzTlPYMnZMEakxLeJ8dFTTly.0RpB3BXxrDlRJfmjkvR5C5EX
vzqt7Jnfo.kDnQQrLEbm07bYJLktZ5s2.j6rf4xbHRJT4xjF6jvErHYovXrQ
0SlkyJPrPUbo3G4rHUkiDPHCsG.dtlW10OfuW+u3wF.Km8yKbHMm+bzbBZJy
rzjbNcskynpnkbwhVM.wIT+JXzF1PTlxEn6a3LxF1nf+KiMHN3+Y8dkkplMa
qm7k980OF7+il3E3YnLh2d0D6NoIaafOuZhliKJ3KDH0yKLTNjQyQ2Twx0Rz
07GXCfER8R5eCTQLDsTJKXviZYTqcOREF4pVQFB2fzdAnMJt8KlpWq5HRoYY
HSAoxX7XwMvfYzn6gkr7lilJVvpPC51yX4C2o.O90REIrSRUHwHNDWeyqQUi
HAe5zpBVBBZSNRJOlCnYxJ2QxwN4Km2NgXjN1b.3DDruDBxnNwxaaf5DBWu+
Yjrf8H5MuhiiTI3ACDXco3MccuN459gFe1MTienJ9xwtMO28ejmWDQSXnnCD
aGugfMZzflMUYQ0SYrJOxxZmQFtchdF6a5a4L1tJwaO7i+wvOjNvOkXxWYqd
NWmXhDvf1HAmNQBtg9UoGUEgBHuhDzXn9pQmgTllnLthkVepVS9Jb402B29j
PsTG+CVCzO1p5xNm0AYhyWfXhjFOCaBzpDXVbmbu8ov8j.Sjmu8aG+Qdui+l
Upv6Dc7de3ADdQVGWcHt3o6KsHw51Wbwb4wUeI3jxr7LN8Hm210cduU24IR7
PZ0wwkolBLsJy9mRQVBopGz4LF24LdEmpa7AlhKSxiK4BI9o.hBY9NZG2sJs
gN08YpREHmSpXy1wliybGr+5CZMXRO+17SgrLOpILnocJ7GTEyJTbg4daatI
us1zRdbLyrdC.wTsLI1zpFDiCrGNBuKRvXyGjX6udTKkvOXzhpAdsoyKZ8FS
L3y0dSz5Zexn0+PnV2iCrmHjBNDH47gBIc+z8hovOTHEd.HJ3DPDN3k9+Ffn
NtFZ
-----------end_max5_patcher-----------
1
  • Fantastic! Thanks. I now have my sensors controlling whatever I like in Live just like I would with an off-the-shelf controller. The "From Max/MSP 1" port seems to be Mac only (cycling74.com/forums/topic.php?id=24241) so I'm continuing to use midiyoke at the moment. Looks like my next step is to take this out of being a Max/msp patch and putting it into Max4Live.
    – AndyJ
    Mar 5, 2010 at 12:51
1

As one of the ppl on the Maxuino team, it might be helpful to know that we actually are doing a couple things that you will find most useful. First, we are writing the translation from the current javascript for max over to compiled Max externals and are expecting/hoping for a 10fold increase in speed. Currently anything changing quicker than every 20ms starts to become shakey. SO that problem should get much better. Secondly Ali Momeni has done a great job making a maxuino GUI that you can use in Max for Live, just add it to the rack! We will roll these changes out very soon, in the next week or so. The GUI change might be ready even sooner. We look forward to any and all feedback on the patch and programming, we are actively trying to make this a great and easy way to bridge the Max <-> Arduino gap.

3
  • fantastic! Can't wait to try it out. Mar 11, 2010 at 21:18
  • @digital Coleman - I'm very excited about this development! Can't wait to try directly in Max4Live. Also looking forward to the speed increase rewrite. Thanks!
    – AndyJ
    Mar 12, 2010 at 19:24
  • @digitalColeman - just wondering if Ali Momeni's Max4Live maxuino gui is ready for playing with? Where will I find it? On Maxuino.org? Thanks!
    – AndyJ
    Mar 24, 2010 at 9:27
0

Aduino, Max, and Ableton - all at once?

I've only tried Arduino to Max (Maxuino is very useful) and it works well, but does add significant lag time.

Could it make real-time manipulation even less reactive if you were to add another programme into the mix (i.e Ableton)?

MaxMSP purists might argue that there's nothing you can do in Ableton that you can't do in Max...

Let me know how you get on with this, it'd be great to be proven wrong.

Good luck!

1
  • @Dan I found that Arduino and Max together are pretty responsive. I guess it depends what you do with them. Regarding Max and Ableton, there is Max For Live now, and I think even Max purists are happy it's here. The beauty of it is that you can use Live for all the stuff that would involve a lot of programming and be CPU heavy (sequencing, timing etc.) and save resources in Max. You can integrate all your programing into your compositions easily. I think it's great. Feb 28, 2010 at 10:46
0

Just a quick thing I wanted to add...you mention using MIDIyoke to send midi data from Max/MSP to Ableton, but that strikes me as needlessly complicated! if you scale your data to 0-127 like Andrew mentioned, you can just use the ctlout or noteout objects in Max to send the data out the native Max/MSP MIDI port, which Ableton can respond to.

Apologies if I misunderstood, just thought I'd point that out.

1
  • Thanks Yann, No, you didn't misunderstand. I am completely new to max & max4live (and arduino) and I've been floundering around in the dark! I'm pretty new to ableton as well. I've understood how to use the noteout object but I can't get to grips with ctlout - although I'm sure this is what I want. Basically I'd like to be able to control any parameter in Live using my arduino sensors.
    – AndyJ
    Mar 4, 2010 at 21:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.