Tuesday, February 26, 2008

Monome and akaRemote Classes

Here are some experimental classes that someone might find interesting. I am naming these classes C2_ so if you find a class with this prefix, you know where it's come from.

(update: I should make clear these were made and tested on OS X.)

C2_interfaces are classes for interfacing with the Monome and akaRemote on the iPhone / iPod Touch. These are pretty experimental and have not been beta-tested by anyone except myself. However, they are working for my purposes. The Monome one allows you to specify an area that will act as one "button". For example, this:

m.registerFunction(

key: "test1",
column: 2, row: 0,
width: 4, height: 4,
defaultLed: 1,
actionType: \down,
buttonResponse: \toggle,
responseParam: 0,
function: {arg val, status; [val, status].postln}

);


will give you a 4 x 4 "button" that is "on" to begin with, and will toggle on or off with every down press, and post its status as it does so.

I managed to get a third led status out of the Monome. By making a button flash very fast, the illusion of a slightly dimmer button can be created. I have found this useful in my own project.

In addition, I have a few boring-but-useful classes in C2_base that handle relative instead of absolute GUI positioning (which has recently been added to SC proper) and interface into the GUI class for cross-platform support (although I'm unsure if and when I'll ever cross platforms, it doesn't hurt to be prepared.) There is a "C2_Color" class that allows selecting colours by name, and being able to pick them from a gui. Also, a "scroll text box" that can act as a button or a scroller for names or numbers, along with a few other miscellaneous bits and pieces.

Any feedback from these classes would be appreciated. E-mail address is in the code files.

Chris.

1 comment:

Chris Hahn said...

Chris, is there anything special you need to do to get aka.remote working? The instructions are a bit vague. I know you don't support this application, but I figured since you have gotten it to work, you might throw some pointers?