MAX/MSP java externals — Part 1
So, I’ve had a lemur for a while but this week it’s getting a new friend, a grayscale 64 monome!!! I am so excited. The potential may seem like less with this device in comparison. But, A) pairing them could be amazing B) the simplicity of the monome device allows for a much easier debugging process (since you don’t have to worry about UI creation and logic) if you’re planning on experimenting outside of the beaten path. Here’s some stuff I learned this week:
After much avoidance of adding another language to the learning list, I am biting the bullet on max/msp. The reasons of knowing it completely outweigh from-scratch development if you intend to interface with Ableton Live or even use msp to create standalone anything for audio. But, for me and my specific interests, this would be a pointless avenue without a way to also interface with java somehow for the visual stuff. Unfortunately, since processing uses the Applet, I have not found a way to integrate processing and I have a feeling it cannot be done. However here is my success using Java2d. which by the way, toxiclibs is built to be independent from PApplet so we can still use that in conjunction with Java2d.
here’s my first time at toying with all this stuff.
maxbar.zip
inside you will find a max patch and another zip called java classes. unzip java classes and place them in the classes folder under your max5 runtime cycling ’74/java/classes directory
now you can just run the patch in max5 runtime and you will see a button. click the button, not the toggle. sorry it’s not stupid proof but the toggle is for nothing. the button should start a new jframe. now change the number input and you should see the response in the jframe. that’s it! you can change the input to be whatever you want as long as it outputs floating point numbers to the external. and the 100 at the end is a maximum so java can normalize the input.
here’s the java source. it’s really easy.
maxbar_src.zip
3 classes. the max object, the jframe and the jpanel, which hosts the graphics2d stuff. you will also see a p5 class in there. ignore that unless you have an answer to something i didn’t.
good luck! i hope this helps somebody.
Posted: January 6th, 2010 | Author: Brad | Filed under: ideas, java | No Comments »
Leave a Reply