Forums > MaxMSP

Arduino & max msp

November 12, 2007 | 5:30 pm

Has anyone used the arduino interface board to communicate with Max MSP?
How easy is it to set it up to send/receive data from? Do you need to
install software on your computer/firmware on the eeprom?
I saw somewhere that it has some PWM outputs. What level of control do you
have over this output? e.g. could I set an output with a 1-2ms pulse every
20 ms?


November 12, 2007 | 8:50 pm

you could try this:
http://www.parasitaere-kapazitaeten.net/max_msp/pduino_for_max
and also sms http://www.arduino.cc/playground/Interfacing/MaxMSP.
with both you will have to upload a firmware to your arduino board (use
arduino software for that).
for real fast connection you might want to write your own firmware.
marius.

ilikepie wrote:
> Has anyone used the arduino interface board to communicate with Max MSP?
> How easy is it to set it up to send/receive data from? Do you need to
> install software on your computer/firmware on the eeprom?
> I saw somewhere that it has some PWM outputs. What level of control do you
> have over this output? e.g. could I set an output with a 1-2ms pulse every
> 20 ms?
>
>
>
> ————————————————————————
>


November 12, 2007 | 9:09 pm

On 12-nov.-07, at 18:30, ilikepie wrote:

> Has anyone used the arduino interface board to communicate with Max
> MSP?
> How easy is it to set it up to send/receive data from?

Very easy. But if you don’t have any experience with the Arduino or
serial ports, check http://www.arduino.cc/playground/Interfacing/MaxMSP

> Do you need to install software on your computer/firmware on the
> eeprom?

You need a driver on your computer. On the arduino side, you just need
to send what you want to the serial port (with the Serial.print()
function for instance).

> I saw somewhere that it has some PWM outputs.

6 on the arduino diecimila.

> What level of control do you have over this output? e.g. could I set
> an output with a 1-2ms pulse every 20 ms?

the analogWrite() function controls the pwm outputs, the duty cycle is
coded on 8 bits, i.e. 256 values and as stated on arduino’s website,
the frequency of the pwm is +/- 490 Hz.
If you only need to send a pulse, you could use digitalWrite() in
conjunction with delay() or delayMicroseconds()

Anyway, you should have a look at arduino.cc, all your questions are
answered there!

p



k
November 13, 2007 | 12:39 am

check out the arduino2max object on the arduino homepage. seems like the simplest option.
i’ve just ordered an arduino, so i’ll let you know what happens when it arrives.
k


January 18, 2008 | 10:52 am

has anybody tried to send data from max to arduino, resp. take use of the analogwrite function via max?
my idea is to control a led with a slider in max. as far as i know i cannot send values/pulses in the arduino2max-object. please correct me in the case im wrong
rhe


January 18, 2008 | 11:29 am

Have a closer look at the Serial.print and Serial.read functions in the
reference section of http://www.arduino.cc
Also have a look at the serial object in Max MSP.
>From there, I believe, you’ll have to work out your own way of sending data
between Arduino and Max MSP.
In my experience, sending from Arduino is easy, you just need a way to
organise the data in Max MSP.
I’m currently working on ways of sending multiple bytes from Max to Arduino.
Sending a byte (a number between 0-255) is as simple as sending a message
into the left inlet of the serial object.
I’m not sure whether you can send several bytes then read them with the
arduino like a FIFO stack, but I’ve been able to send multiple data using a
call/response method.

On 18/01/2008, ivo wrote:
>
>
> has anybody tried to send data from max to arduino, resp. take use of the
> analogwrite function via max?
> my idea is to control a led with a slider in max. as far as i know i
> cannot send values/pulses in the arduino2max-object. please correct me in
> the case im wrong
> rhe
>


January 18, 2008 | 11:37 am

On 18 janv. 08, at 11:52, ivo wrote:

> has anybody tried to send data from max to arduino, resp. take use
> of the analogwrite function via max?
> my idea is to control a led with a slider in max. as far as i know i
> cannot send values/pulses in the arduino2max-object. please correct
> me in the case im wrong

You have to do some work, the arduino2max abstraction wors only to get
values from the arduino to Max.

On the Max side, you should check the [serial] object’s help file, it
is bidirectional. If your serial connection works from the arduino to
Max (i.e. speeds match, cable correctly pluggd, etc.), then it should
also work the other way round.
On the arduino side, use Serial.available() and Serial.read(), parse
the datas then send them with analogwrite().

If I were you, I would first try to program the Arduino and send
values to it using their development software. Once this works, then
it’s time to patch!

BTW, did you look the examples provided with the arduino? The
Dimmer.pde example is exactly what you’re looking for (there is even a
Max patch at the end of this 10 lines code)

Have fun.

____________________________
Patrick Delges

Centre de Recherches et de Formation Musicales de Wallonie asbl

http://www.crfmw.be/max



k
January 18, 2008 | 4:16 pm

there are a couple of other max objects on the arduino site if you’re looking for an easy solution.
can’t remember the names, but one allows output.
just read up on the arduino site.
k


January 18, 2008 | 11:00 pm

mister k wrote:
> there are a couple of other max objects on the arduino site if you’re looking for an easy solution.
> can’t remember the names, but one allows output.
> just read up on the arduino site.

one possibility is to use pduino for max, available from
http://www.parasitaere-kapazitaeten.net/max_msp/pduino_for_max
analog output handling included. it comes with the arduino code
(pd_firmware) and a max patch.
marius.


January 18, 2008 | 11:22 pm

hello
it wasnt actually too difficult via the serial object. it takes some effort to translate the arriving, as well as the sent data.
what i also found is mark davids MD_Arduino collection (found here: http://www.mdhosale.com/md_arduino/), which includes examples how to controll servo-motors via max. i will strip that patch and arduino code until it suits for my plans.
thanks


January 18, 2008 | 11:55 pm

and i just checked maruis’ pduino for max. hm.. everything included. there is nothing to do anymore.


January 19, 2008 | 9:55 pm

I love my arduino. I’m planning on controlling an analog synth with it and a knooby analog style control box. Do you maxers have any projects you’re planning on trying with it? I’d love to see what others are thinking about or working on using the arduino (or other controllers) for in max.


January 19, 2008 | 10:16 pm

Don K skrev:
> I love my arduino. I’m planning on controlling an analog synth with it and a knooby analog style control box. Do you maxers have any projects you’re planning on trying with it? I’d love to see what others are thinking about or working on using the arduino (or other controllers) for in max.
> –
We are going into Arduino dev. too. This will be for producing short-run
or one-off custom controllers for our clients. We are also considering
building a monome-clone with RGBs and a large, rubberized tactile
surface. That will take some time, though.

a.


January 19, 2008 | 10:41 pm

I’m currently working on a university project for my final year. Using Max
MSP and arduino, I’m making a beat-detecting dancing robot.
I’ve got my servos doing what I want them to do, and my software works
pretty much as I expect, just need to hone it’s self-tuning abilities
(currently settings need to be altered to make it react to every different
song).
I hope to upload photos and details to the arduino exhibition area when I’m
done.
If you want any specific details, feel free to ask me!

On 19/01/2008, Andreas Wetterberg wrote:
>
> Don K skrev:
> > I love my arduino. I’m planning on controlling an analog synth with it
> and a knooby analog style control box. Do you maxers have any projects
> you’re planning on trying with it? I’d love to see what others are thinking
> about or working on using the arduino (or other controllers) for in max.
> > –
> We are going into Arduino dev. too. This will be for producing short-run
> or one-off custom controllers for our clients. We are also considering
> building a monome-clone with RGBs and a large, rubberized tactile
> surface. That will take some time, though.
>
> a.
>


December 31, 2009 | 12:59 pm

I am trying make comparation by load firmata to arduino for puredata and max/msp on windows OS, result is puredata is more easy and also process more fast than using max/msp, my patch in max/msp make my computer so heavy, different when I using same patch on Puredata I dont have problem. until now I am still dont know why ?


Viewing 15 posts - 1 through 15 (of 15 total)