davekrnavek.com
8Mar/100

arduino -> max/MSP

so i wanted to hook up my arduino to maxMSP so i could use data grabbed from the microcontroller to do fun stuff with audio.  maxMSP has some dead-simple serial objects which just read data off a serial port, but i wanted to go a bit further and have my arduino send OpenSoundControl packets.  unfortunately, the arduino needs an ethernet shield to send network packets, but since they're usually connected to a computer, i decided to write a c++ program to grab data off the serial port and format it into OSC packets.  gave me a chance to play around some more with visual studio...

so here's a screenshot of the program -- it's got a dropdown box showing your serial ports, along with some IP address/port text boxes and a preface string.  so far, i'm just grabbing a single byte sent on the port, but i'll probably modify it a bit to allow more precision than 0-255.

and here's a basic arduino program that just sends a random byte every second, for testing purposes.

i made a pretty simple maxMSP patch that grabbed the OSC packet and just changed the frequency of a sine wave, but there's so many possibilities here.  multiple people can send data with unique preface strings, and i could do whatever i want with the audio.  fun, fun! :)

--dave

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.