Go Down

Topic: Arduino2Max with Adafruit wave shield (Read 156 times) previous topic - next topic

cklkaren

Hello,

I am new to arduino and max/msp.
I made a patch on max/msp and would like to hook it up with my adafruit waveshield.
There are 4 digital out pins (2,3,4,5) as you could see at the very bottom from the tutorial here.

I am frustrated at how to link my Arduino2max patch to my max patch - do I link the 4 digital out pins all to the output (speaker)? Or am I doing it in a wrong way?

I really hope to get some help here, thanks!><

Grumpy_Mike

Quote
Or am I doing it in a wrong way?
Yes.

First of all you need Max to talk to the arduino through the serial port. This means writing a Max patch to send stuff to the serial port. If you want the wave shield to play a sample when max tells it to you need to send the file name of the sample, as a string, down the serial port of the Arduino.

Then on the Arduino end you need a program to look at the serial port for a string. When it gets one then pass it along to the wave play command shown in that example as being called when it detects an input change.

cklkaren

Hi Mike,

Thank you very much for your reply.
I intend to have Max to collect sound from the microphone that attach with my wave shield and play the distorted and delayed sound with the speaker that is too attach with my wave shield.

Will these still apply with what you have suggested above?

Cheers,
Karen

Grumpy_Mike

That is not what I understood you to say before.
To send raw data samples backwards and forwards through the serial port is asking a lot. Especially to be able to do it at a constant rate without glitching.
It might not work as you expect.
Can you be more clear about the steps you want it to do.

cklkaren

Hi Mike,

I have an arduino wave shield with a microphone and speaker attached to it and would like to connect it with my Max/MSP patch.

Here are the steps of what I attempt to do:
1) User speak to the microphone on wave shield
2) Sound collected will run in the Max patch for sound distortion
3) Distorted sound play out from the speakers on wave shield

Cheers!

Grumpy_Mike

How quickly do you want this to happen.

There is limited memory in the arduino so you would have to store the data in the SD card as an intermediate storage. This requires the SD file system that is optimised for recording, not the standard one you use with the SD shield.

cklkaren

Hi Mike,

I would not need it to be quick as long as it works.
When you were talking about the SD file system above, do you mean I will have to reformat the SD card?

Cheers,
Karen

Grumpy_Mike

Quote
When you were talking about the SD file system above, do you mean I will have to reformat the SD card?
No I mean the SD library that you use.
Like this one
http://robertgetzner.com/PersonalWordpress/arduino-writing-to-sd-card-next-test-based-on-fat16libs-fast-data-logging-sketches/

Go Up