Jeremy Keenan

<<back

 

Java External for Serial Data Input in Max/MSP

 

 

My project will result in the data input section of an interactive sound-based work involving pressure and proximity sensors as a means to

determine various parameters of recorded input material in the style of "Foley recording", or the live overdubbing of acoustic sound effects

(footsteps, etc.) as a means to recreate an acoustic environment in film.

In terms of the physical input, the platform I will employ in the creation of this work is the Arduino micro-controller board. In working with the

Arduino board together with my favourite sampling and synthesis environment, Max/Msp, I noticed a that the process of getting Max to

recognise the serial data output by Arduino is quite arcane and circuitous in comparison with it's code based correlate in the Arduino

programming language.

To illustrate, below is and example of some code used to format serial data for output by Arduino:

Serial.print("R");

Serial.println(analogRead(redPin));

Serial.print("G");

Serial.println(analogRead(greenPin));

Serial.print("B");

Serial.println(analogRead(bluePin));

delay(100);

And here is an example of how this data is interpreted by Max:

¨

 

An external in Max is any extra bit of code which is added by a userto extend the programs functionality. In this case, I will use Java to

extend Max, which is conveniently supported by a built in Java "sketchbook" environment inside of Max/Msp itself. The way that separate

streams of serial data are formatted to interact with Max/Msp, as can be seen in the example Arduino code, are through the addition of an

ASCII prefix which define a "gate" for the data stream to pass through in Max. My hope is to design a Max/Msp external to replace the

current multiple object solution to serial data routing which can be a single object, with the argument of the ASCII character as it's argument.

The physical object itself will be a simple box, with two IR sensors, 6 analog pressure sensors, which I will wire along a ribbon cable and

attach to various points on the box itself at one end, and the Arduino at the other. The box will be played by using its surface to scrape various

objects along, while the pressure sensors register the hardness, velocity, and location of each sonic event, and an X/Y grid produced by the IR

sensors to provide real-time control of the sample playback. Ideally, I will have at least a rough prototype of the physical interface completed

to demonstrate it's use with the Java external.