loading

Arduino to Max Msp Audio Signal?

Hi, Guys i was hoping some one could help with getting a audio signal from Arduino in to max msp then converted back to audio.
I have been a member a month and have been searching like crazy. I cant really find any evidence that this has been done so any support would be very appreciated. 

Maybe some thing similar that can get me started any thing would help i'm desperate lol :P


Regard 
Kunal :)

sort by: active | newest | oldest
so you want to output an audio signal from an arduino and send it into max? you can do that by simply plugging the arduino audio output into your comp via the line in jack and using the ezadc~ object in max to receive the signal.

i this what you mean, or were you thinking of sending something via usb?
krsstyles (author)  amandaghassaei4 years ago
Hi, Amand the units needs to be standalone so no computer inputs or sound card. I would like audio signal- Arduino analog pins - Arduino serial (usb)- max map ready to be messed up.

Thanks:)
there is the maxmsp library for arduino:
http://www.arduino.cc/playground/interfacing/MaxMSP
this way you can pull data from your analog input pins directly into max. I doubt this is fast enough to deal with audio though. have you tried this already? what kind of sampling rate are you looking for?
krsstyles (author)  amandaghassaei4 years ago

Regarding max msp i got some sort of connection but the sound was so mangled you could just make out the percussive beeps and squeaks.

Arduino at the moment its just for prototyping. I know the Arduino cant handle the higher sample rates or bit rate but i have just bought the chip-kit 32, that should be able to pull off 44.1 or higher sample rates with 24 bit rate.

I was trying a this with chipkit 32 but now get this i think it don't understand all Arduino code but not sure yet.

arduino_fast_ADC_001.cpp: In function 'void setup()':
arduino_fast_ADC_001.cpp:66:3: error: 'ADCSRA' was not declared in this scope
arduino_fast_ADC_001.cpp:66:3: error: '_SFR_BYTE' was not declared in this scope
arduino_fast_ADC_001.cpp:66:3: error: 'ADPS2' was not declared in this scope
arduino_fast_ADC_001.cpp:67:3: error: 'ADPS1' was not declared in this scope
arduino_fast_ADC_001.cpp:68:3: error: 'ADPS0' was not declared in this scope
arduino_fast_ADC_001.cpp:73:3: error: 'ADMUX' was not declared in this scope
arduino_fast_ADC_001.cpp:73:3: error: 'ADLAR' was not declared in this scope
arduino_fast_ADC_001.cpp:74:3: error: 'REFS0' was not declared in this scope
arduino_fast_ADC_001.cpp:75:3: error: 'REFS1' was not declared in this scope
arduino_fast_ADC_001.cpp:76:3: error: 'MUX0' was not declared in this scope
arduino_fast_ADC_001.cpp:77:3: error: 'MUX1' was not declared in this scope
arduino_fast_ADC_001.cpp:78:3: error: 'MUX2' was not declared in this scope
arduino_fast_ADC_001.cpp:79:3: error: 'MUX3' was not declared in this scope
arduino_fast_ADC_001.cpp:83:3: error: 'TCCR2A' was not declared in this scope
arduino_fast_ADC_001.cpp:83:3: error: 'COM2A0' was not declared in this scope
arduino_fast_ADC_001.cpp:84:3: error: 'COM2A1' was not declared in this scope
arduino_fast_ADC_001.cpp:85:3: error: 'WGM20' was not declared in this scope
arduino_fast_ADC_001.cpp:86:3: error: 'WGM21' was not declared in this scope
arduino_fast_ADC_001.cpp:88:3: error: 'TCCR2B' was not declared in this scope
arduino_fast_ADC_001.cpp:88:3: error: 'WGM22' was not declared in this scope
arduino_fast_ADC_001.cpp:94:3: error: 'CS20' was not declared in this scope
arduino_fast_ADC_001.cpp:95:3: error: 'CS21' was not declared in this scope
arduino_fast_ADC_001.cpp:96:3: error: 'CS22' was not declared in this scope
arduino_fast_ADC_001.cpp:99:3: error: 'DDRB' was not declared in this scope
arduino_fast_ADC_001.cpp:102:3: error: 'TIMSK0' was not declared in this scope
arduino_fast_ADC_001.cpp:102:3: error: 'TOIE0' was not declared in this scope
arduino_fast_ADC_001.cpp:103:3: error: 'TIMSK2' was not declared in this scope
arduino_fast_ADC_001.cpp:103:3: error: 'TOIE2' was not declared in this scope
arduino_fast_ADC_001.cpp: In function 'void loop()':
arduino_fast_ADC_001.cpp:127:3: error: 'OCR2A' was not declared in this scope
arduino_fast_ADC_001.cpp: At global scope:
arduino_fast_ADC_001.cpp:153:4: error: expected constructor, destructor, or type conversion before '(' token
yeah that makes sense, all of those commands are specific to the actual hardware setup of the Arduino. The arduino can do a pretty good sampling rate with the code in my audio input tutorial (38.5kHz). I think the issue here is the speed of the usb connection. At 115200 baud I think you will only be able to send over 115200/8 bits/byte = 14kHz.
when you tried the serial connection did you use the maxmsp library? maybe try just Serial.print(incomingAudio); and then using one of the serial objects in max. I still don;t think this will get you up to 38kHz, but maybe 14....
why do you want to use Arduino for this? tell me more about your setup.