Skip to content

Setup Monomic with OpenSound Control

jonobr1 edited this page Sep 12, 2010 · 2 revisions
  1. Things You’ll Need:
  2. Place OscP5 and Monomic libraries in the libraries folder of Processing ( usually within ~Documents/processing )
  3. Open up monomeSerial and make sure its set to OpenSound Control. Make sure you have an address pattern. Doesn’t really seem to matter what it is, but it does seem to matter that one exists.
  4. Open up Processing
  5. Dump this code:
import oscP5.*;
import netP5.*;
import jklabs.monomic.*;

Monome m;
int mWidth = 8;  // the number of leds across
int mHeight = 8; // the number of leds down

void setup() {
  m = new MonomeOSC( this );
  frameRate( 30 );
}

void monomePressed( int x, int y ) {
  if(m.isLit( x, y )) {
    m.lightOff( x, y );
  } else {
    m.lightsOff();
    m.lightOn( x, y );
  }
}

void stop() {
  m.lightsOff();
}

Start clicking the Monome. This source code originally from and slightly modified http://post.monome.org/comments.php?DiscussionID=5985

Clone this wiki locally