Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding processing sketch emulation of the lights, adding java api for…

… lights
  • Loading branch information...
commit fb3d42a7250e7da92412147ebe23fe972a5436c8 1 parent c985e9c
@rjmarsan rjmarsan authored
Showing with 577 additions and 0 deletions.
  1. +69 −0 java/TwitterMelodyGenerator/src/edu/uiuc/sigmusic/twittersounds/chroma/ChromaInterface.java
  2. BIN  processing/lights_emulator/applet/core.jar
  3. +170 −0 processing/lights_emulator/applet/index.html
  4. BIN  processing/lights_emulator/applet/lights_emulator.jar
  5. +51 −0 processing/lights_emulator/applet/lights_emulator.pde
  6. BIN  processing/lights_emulator/applet/loading.gif
  7. BIN  processing/lights_emulator/applet/oscP5.jar
  8. BIN  processing/lights_emulator/application.linux/lib/core.jar
  9. BIN  processing/lights_emulator/application.linux/lib/lights_emulator.jar
  10. BIN  processing/lights_emulator/application.linux/lib/oscP5.jar
  11. +4 −0 processing/lights_emulator/application.linux/lights_emulator
  12. +51 −0 processing/lights_emulator/application.linux/source/lights_emulator.pde
  13. +75 −0 processing/lights_emulator/application.macosx/lights_emulator.app/Contents/Info.plist
  14. BIN  processing/lights_emulator/application.macosx/lights_emulator.app/Contents/MacOS/JavaApplicationStub
  15. BIN  processing/lights_emulator/application.macosx/lights_emulator.app/Contents/MacOS/JavaApplicationStub64
  16. +1 −0  processing/lights_emulator/application.macosx/lights_emulator.app/Contents/PkgInfo
  17. BIN  processing/lights_emulator/application.macosx/lights_emulator.app/Contents/Resources/Java/core.jar
  18. BIN  processing/lights_emulator/application.macosx/lights_emulator.app/Contents/Resources/Java/lights_emulator.jar
  19. BIN  processing/lights_emulator/application.macosx/lights_emulator.app/Contents/Resources/Java/oscP5.jar
  20. BIN  processing/lights_emulator/application.macosx/lights_emulator.app/Contents/Resources/sketch.icns
  21. +51 −0 processing/lights_emulator/application.macosx/source/lights_emulator.pde
  22. +3 −0  processing/lights_emulator/application.windows/lib/args.txt
  23. BIN  processing/lights_emulator/application.windows/lib/core.jar
  24. BIN  processing/lights_emulator/application.windows/lib/lights_emulator.jar
  25. BIN  processing/lights_emulator/application.windows/lib/oscP5.jar
  26. BIN  processing/lights_emulator/application.windows/lights_emulator.exe
  27. +51 −0 processing/lights_emulator/application.windows/source/lights_emulator.pde
  28. +51 −0 processing/lights_emulator/lights_emulator.pde
View
69 java/TwitterMelodyGenerator/src/edu/uiuc/sigmusic/twittersounds/chroma/ChromaInterface.java
@@ -0,0 +1,69 @@
+package edu.uiuc.sigmusic.twittersounds.chroma;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.util.Random;
+
+import com.illposed.osc.OSCMessage;
+import com.illposed.osc.OSCPortOut;
+
+public class ChromaInterface {
+
+
+ OSCPortOut oscout;
+
+ public ChromaInterface() throws IOException {
+ //InetAddress out = InetAddress.getByAddress(new byte[] {(byte) 255,(byte) 255,(byte) 255,(byte) 255});
+ InetAddress out = InetAddress.getByAddress(new byte[] {(byte) 127,(byte) 0,(byte) 0,(byte) 1});
+ //InetAddress out = InetAddress.getByAddress(new byte[] {(byte) 192,(byte) 17,(byte) 96,(byte) 105}); //if broadcasting doesn't work, hardcode it here.
+ oscout = new OSCPortOut(out, 11661);
+
+ }
+
+
+ public void sendLightArray(int[][] colors) throws IOException {
+ OSCMessage oscmessage = new OSCMessage("/setcolors");
+ for (int i=0; i<colors.length; i++) {
+ oscmessage.addArgument(colors[i][0]);
+ oscmessage.addArgument(colors[i][1]);
+ oscmessage.addArgument(colors[i][2]);
+// oscmessage.addArgument(colors[i]);
+ }
+ oscout.send(oscmessage);
+ }
+
+
+
+
+
+ public static void main(String[] args) {
+ try {
+ ChromaInterface c = new ChromaInterface();
+ int[][] colors = new int[24][];
+ for (int i=0; i<colors.length; i++) {
+ int[] color = new int[3];
+ colors[i] = color;
+ }
+ for (int i=0; i<100; i++) {
+ long time = System.currentTimeMillis();
+ System.out.println("Sending.... NOW "+(System.currentTimeMillis()%10000));
+ randomizeColors(colors);
+ c.sendLightArray(colors);
+ System.out.println("Timediff: "+(System.currentTimeMillis() - time));
+ Thread.sleep(100);
+ }
+
+ } catch (Exception e) { e.printStackTrace(); }
+ }
+
+ public static void randomizeColors(int[][] colors) {
+ for (int i=0; i<colors.length; i++) {
+ Random r = new Random();
+ int color[] = colors[i];
+ color[0] = r.nextInt()%1024;
+ color[1] = r.nextInt()%1024;
+ color[2] = r.nextInt()%1024;
+ }
+
+ }
+}
View
BIN  processing/lights_emulator/applet/core.jar
Binary file not shown
View
170 processing/lights_emulator/applet/index.html
@@ -0,0 +1,170 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <!-- charset must remain utf-8 to be handled properly by Processing -->
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+
+ <title>lights_emulator : Built with Processing</title>
+
+ <style type="text/css">
+ /* <![CDATA[ */
+
+ body {
+ margin: 60px 0px 0px 55px;
+ font-family: verdana, geneva, arial, helvetica, sans-serif;
+ font-size: 11px;
+ background-color: #ddddcc;
+ text-decoration: none;
+ font-weight: normal;
+ line-height: normal;
+ }
+
+ a { color: #3399cc; }
+ a:link { color: #3399cc; text-decoration: underline; }
+ a:visited { color: #3399cc; text-decoration: underline; }
+ a:active { color: #3399cc; text-decoration: underline; }
+ a:hover { color: #3399cc; text-decoration: underline; }
+
+ /* ]]> */
+ </style>
+ </head>
+
+ <body>
+ <div id="content">
+ <div id="lights_emulator_container">
+
+ <!-- This version plays nicer with older browsers,
+ but requires JavaScript to be enabled.
+ http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html
+ http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/ -->
+ <script type="text/javascript"
+ src="http://www.java.com/js/deployJava.js"></script>
+ <script type="text/javascript">
+ /* <![CDATA[ */
+
+ var attributes = {
+ code: 'lights_emulator.class',
+ archive: 'lights_emulator.jar,oscP5.jar,core.jar',
+ width: 1000,
+ height: 200,
+ };
+ var parameters = {
+ image: 'loading.gif',
+ centerimage: 'true',
+ };
+ var version = '1.5';
+ deployJava.runApplet(attributes, parameters, version);
+
+ /* ]]> */
+ </script>
+
+ <noscript> <div>
+ <!--[if !IE]> -->
+ <object classid="java:lights_emulator.class"
+ type="application/x-java-applet"
+ archive="lights_emulator.jar,oscP5.jar,core.jar"
+ width="1000" height="200"
+ standby="Loading Processing software..." >
+
+ <param name="archive" value="lights_emulator.jar,oscP5.jar,core.jar" />
+
+ <param name="mayscript" value="true" />
+ <param name="scriptable" value="true" />
+
+ <param name="image" value="loading.gif" />
+ <param name="boxmessage" value="Loading Processing software..." />
+ <param name="boxbgcolor" value="#FFFFFF" />
+ <!--<![endif]-->
+
+ <!-- For more instructions on deployment,
+ or to update the CAB file listed here, see:
+ http://java.sun.com/javase/6/webnotes/family-clsid.html
+ http://java.sun.com/javase/6/webnotes/install/jre/autodownload.html -->
+ <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+ codebase="http://java.sun.com/update/1.6.0/jinstall-6u20-windows-i586.cab"
+ width="1000" height="200"
+ standby="Loading Processing software..." >
+
+ <param name="code" value="lights_emulator" />
+ <param name="archive" value="lights_emulator.jar,oscP5.jar,core.jar" />
+
+ <param name="mayscript" value="true" />
+ <param name="scriptable" value="true" />
+
+ <param name="image" value="loading.gif" />
+ <param name="boxmessage" value="Loading Processing software..." />
+ <param name="boxbgcolor" value="#FFFFFF" />
+
+ <p>
+ <strong>
+ This browser does not have a Java Plug-in.
+ <br />
+ <a href="http://www.java.com/getjava" title="Download Java Plug-in">
+ Get the latest Java Plug-in here.
+ </a>
+ </strong>
+ </p>
+
+ </object>
+
+ <!--[if !IE]> -->
+ </object>
+ <!--<![endif]-->
+
+ </div> </noscript>
+
+ </div>
+
+ <p>
+
+ oscP5sendreceive by andreas schlegel
+ example shows how to send and receive osc messages.
+ oscP5 website at http://www.sojamo.de/oscP5
+/
+
+import oscP5.*;
+import netP5.*;
+
+OscP5 oscP5;
+int numboxes = 24;
+color[] colors = new color[numboxes];
+
+void setup() {
+ size(1000,200);
+ frameRate(60);
+ /* start oscP5, listening for incoming messages at port 12000 */
+ oscP5 = new OscP5(this,11661);
+
+}
+
+
+void draw() {
+ background(0);
+
+
+ float boxwidth = width/numboxes;
+ for (int i=0; i<numboxes; i++) {
+ fill(colors[i]);
+ rect(i*boxwidth, 0, boxwidth, height);
+ }
+
+}
+
+
+
+/* incoming osc message are forwarded to the oscEvent method. */
+void oscEvent(OscMessage theOscMessage) {
+ /* print the address pattern and the typetag of the received OscMessage
+
+ </p>
+
+ <p>
+ Source code: <a href="lights_emulator.pde">lights_emulator</a>
+ </p>
+
+ <p>
+ Built with <a href="http://processing.org" title="Processing.org">Processing</a>
+ </p>
+ </div>
+ </body>
+</html>
View
BIN  processing/lights_emulator/applet/lights_emulator.jar
Binary file not shown
View
51 processing/lights_emulator/applet/lights_emulator.pde
@@ -0,0 +1,51 @@
+/**
+ * oscP5sendreceive by andreas schlegel
+ * example shows how to send and receive osc messages.
+ * oscP5 website at http://www.sojamo.de/oscP5
+ */
+
+import oscP5.*;
+import netP5.*;
+
+OscP5 oscP5;
+int numboxes = 24;
+color[] colors = new color[numboxes];
+
+void setup() {
+ size(1000,200);
+ frameRate(60);
+ /* start oscP5, listening for incoming messages at port 12000 */
+ oscP5 = new OscP5(this,11661);
+
+}
+
+
+void draw() {
+ background(0);
+
+
+ float boxwidth = width/numboxes;
+ for (int i=0; i<numboxes; i++) {
+ fill(colors[i]);
+ rect(i*boxwidth, 0, boxwidth, height);
+ }
+
+}
+
+
+
+/* incoming osc message are forwarded to the oscEvent method. */
+void oscEvent(OscMessage theOscMessage) {
+ /* print the address pattern and the typetag of the received OscMessage */
+ print("### received an osc message.");
+ print(" addrpattern: "+theOscMessage.addrPattern());
+ println(" typetag: "+theOscMessage.typetag());
+ int len = theOscMessage.arguments().length;
+ for (int i=0; i<min(len/3, numboxes); i++) {
+ int r = theOscMessage.get(i*3+0).intValue() / 4;
+ int g = theOscMessage.get(i*3+1).intValue() / 4;
+ int b = theOscMessage.get(i*3+2).intValue() / 4;
+ colors[i] = color(r,g,b);
+ println("Color: "+r+","+g+","+b+".");
+ }
+}
View
BIN  processing/lights_emulator/applet/loading.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  processing/lights_emulator/applet/oscP5.jar
Binary file not shown
View
BIN  processing/lights_emulator/application.linux/lib/core.jar
Binary file not shown
View
BIN  processing/lights_emulator/application.linux/lib/lights_emulator.jar
Binary file not shown
View
BIN  processing/lights_emulator/application.linux/lib/oscP5.jar
Binary file not shown
View
4 processing/lights_emulator/application.linux/lights_emulator
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+APPDIR=$(dirname "$0")
+java -Djava.library.path="$APPDIR" -cp "$APPDIR/lib/lights_emulator.jar:$APPDIR/lib/core.jar:$APPDIR/lib/oscP5.jar" lights_emulator
View
51 processing/lights_emulator/application.linux/source/lights_emulator.pde
@@ -0,0 +1,51 @@
+/**
+ * oscP5sendreceive by andreas schlegel
+ * example shows how to send and receive osc messages.
+ * oscP5 website at http://www.sojamo.de/oscP5
+ */
+
+import oscP5.*;
+import netP5.*;
+
+OscP5 oscP5;
+int numboxes = 24;
+color[] colors = new color[numboxes];
+
+void setup() {
+ size(1000,200);
+ frameRate(60);
+ /* start oscP5, listening for incoming messages at port 12000 */
+ oscP5 = new OscP5(this,11661);
+
+}
+
+
+void draw() {
+ background(0);
+
+
+ float boxwidth = width/numboxes;
+ for (int i=0; i<numboxes; i++) {
+ fill(colors[i]);
+ rect(i*boxwidth, 0, boxwidth, height);
+ }
+
+}
+
+
+
+/* incoming osc message are forwarded to the oscEvent method. */
+void oscEvent(OscMessage theOscMessage) {
+ /* print the address pattern and the typetag of the received OscMessage */
+ print("### received an osc message.");
+ print(" addrpattern: "+theOscMessage.addrPattern());
+ println(" typetag: "+theOscMessage.typetag());
+ int len = theOscMessage.arguments().length;
+ for (int i=0; i<min(len/3, numboxes); i++) {
+ int r = theOscMessage.get(i*3+0).intValue() / 4;
+ int g = theOscMessage.get(i*3+1).intValue() / 4;
+ int b = theOscMessage.get(i*3+2).intValue() / 4;
+ colors[i] = color(r,g,b);
+ println("Color: "+r+","+g+","+b+".");
+ }
+}
View
75 processing/lights_emulator/application.macosx/lights_emulator.app/Contents/Info.plist
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+ <dict>
+ <key>CFBundleName</key>
+ <string>lights_emulator</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>CFBundleAllowMixedLocalizations</key>
+ <string>true</string>
+ <key>CFBundleExecutable</key>
+ <string>JavaApplicationStub</string>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleIconFile</key>
+ <string>sketch.icns</string>
+ <key>CFBundleIdentifier</key>
+ <string>lights_emulator</string>
+
+ <!-- http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html#//apple_ref/doc/uid/20001431-113616 -->
+ <key>LSUIPresentationMode</key>
+ <integer>0</integer>
+
+ <!-- make sure that applications open in 32-bit mode on Snow Leopard,
+ otherwise video and most other native libraries will choke
+ http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW1 -->
+ <key>LSArchitecturePriority</key>
+ <array>
+ <string>i386</string>
+ <string>ppc</string>
+ </array>
+
+ <key>Java</key>
+ <dict>
+ <key>VMOptions</key>
+ <string></string>
+ <key>MainClass</key>
+ <string>lights_emulator</string>
+ <key>JVMVersion</key>
+ <string>1.5*</string>
+ <key>JVMArchs</key>
+ <array>
+ <string>i386</string>
+ <string>ppc</string>
+ </array>
+ <key>ClassPath</key>
+ <string>$JAVAROOT/lights_emulator.jar:$JAVAROOT/core.jar:$JAVAROOT/oscP5.jar</string>
+
+ <!-- http://developer.apple.com/releasenotes/Java/java141/system_properties/chapter_4_section_1.html#//apple_ref/doc/uid/TP30000285 -->
+ <key>Properties</key>
+ <dict>
+ <key>apple.laf.useScreenMenuBar</key>
+ <string>true</string>
+ <key>apple.awt.showGrowBox</key>
+ <string>false</string>
+ <key>com.apple.smallTabs</key>
+ <string>true</string>
+ <key>apple.awt.Antialiasing</key>
+ <string>false</string>
+ <key>apple.awt.TextAntialiasing</key>
+ <string>true</string>
+ <key>com.apple.hwaccel</key>
+ <string>true</string>
+ <key>apple.awt.use-file-dialog-packages</key>
+ <string>false</string>
+ </dict>
+ </dict>
+ </dict>
+</plist>
View
BIN  processing/lights_emulator/application.macosx/lights_emulator.app/Contents/MacOS/JavaApplicationStub
Binary file not shown
View
BIN  processing/lights_emulator/application.macosx/lights_emulator.app/Contents/MacOS/JavaApplicationStub64
Binary file not shown
View
1  processing/lights_emulator/application.macosx/lights_emulator.app/Contents/PkgInfo
@@ -0,0 +1 @@
+APPL????
View
BIN  processing/lights_emulator/application.macosx/lights_emulator.app/Contents/Resources/Java/core.jar
Binary file not shown
View
BIN  ...ssing/lights_emulator/application.macosx/lights_emulator.app/Contents/Resources/Java/lights_emulator.jar
Binary file not shown
View
BIN  processing/lights_emulator/application.macosx/lights_emulator.app/Contents/Resources/Java/oscP5.jar
Binary file not shown
View
BIN  processing/lights_emulator/application.macosx/lights_emulator.app/Contents/Resources/sketch.icns
Binary file not shown
View
51 processing/lights_emulator/application.macosx/source/lights_emulator.pde
@@ -0,0 +1,51 @@
+/**
+ * oscP5sendreceive by andreas schlegel
+ * example shows how to send and receive osc messages.
+ * oscP5 website at http://www.sojamo.de/oscP5
+ */
+
+import oscP5.*;
+import netP5.*;
+
+OscP5 oscP5;
+int numboxes = 24;
+color[] colors = new color[numboxes];
+
+void setup() {
+ size(1000,200);
+ frameRate(60);
+ /* start oscP5, listening for incoming messages at port 12000 */
+ oscP5 = new OscP5(this,11661);
+
+}
+
+
+void draw() {
+ background(0);
+
+
+ float boxwidth = width/numboxes;
+ for (int i=0; i<numboxes; i++) {
+ fill(colors[i]);
+ rect(i*boxwidth, 0, boxwidth, height);
+ }
+
+}
+
+
+
+/* incoming osc message are forwarded to the oscEvent method. */
+void oscEvent(OscMessage theOscMessage) {
+ /* print the address pattern and the typetag of the received OscMessage */
+ print("### received an osc message.");
+ print(" addrpattern: "+theOscMessage.addrPattern());
+ println(" typetag: "+theOscMessage.typetag());
+ int len = theOscMessage.arguments().length;
+ for (int i=0; i<min(len/3, numboxes); i++) {
+ int r = theOscMessage.get(i*3+0).intValue() / 4;
+ int g = theOscMessage.get(i*3+1).intValue() / 4;
+ int b = theOscMessage.get(i*3+2).intValue() / 4;
+ colors[i] = color(r,g,b);
+ println("Color: "+r+","+g+","+b+".");
+ }
+}
View
3  processing/lights_emulator/application.windows/lib/args.txt
@@ -0,0 +1,3 @@
+
+lights_emulator
+lights_emulator.jar,core.jar,oscP5.jar
View
BIN  processing/lights_emulator/application.windows/lib/core.jar
Binary file not shown
View
BIN  processing/lights_emulator/application.windows/lib/lights_emulator.jar
Binary file not shown
View
BIN  processing/lights_emulator/application.windows/lib/oscP5.jar
Binary file not shown
View
BIN  processing/lights_emulator/application.windows/lights_emulator.exe
Binary file not shown
View
51 processing/lights_emulator/application.windows/source/lights_emulator.pde
@@ -0,0 +1,51 @@
+/**
+ * oscP5sendreceive by andreas schlegel
+ * example shows how to send and receive osc messages.
+ * oscP5 website at http://www.sojamo.de/oscP5
+ */
+
+import oscP5.*;
+import netP5.*;
+
+OscP5 oscP5;
+int numboxes = 24;
+color[] colors = new color[numboxes];
+
+void setup() {
+ size(1000,200);
+ frameRate(60);
+ /* start oscP5, listening for incoming messages at port 12000 */
+ oscP5 = new OscP5(this,11661);
+
+}
+
+
+void draw() {
+ background(0);
+
+
+ float boxwidth = width/numboxes;
+ for (int i=0; i<numboxes; i++) {
+ fill(colors[i]);
+ rect(i*boxwidth, 0, boxwidth, height);
+ }
+
+}
+
+
+
+/* incoming osc message are forwarded to the oscEvent method. */
+void oscEvent(OscMessage theOscMessage) {
+ /* print the address pattern and the typetag of the received OscMessage */
+ print("### received an osc message.");
+ print(" addrpattern: "+theOscMessage.addrPattern());
+ println(" typetag: "+theOscMessage.typetag());
+ int len = theOscMessage.arguments().length;
+ for (int i=0; i<min(len/3, numboxes); i++) {
+ int r = theOscMessage.get(i*3+0).intValue() / 4;
+ int g = theOscMessage.get(i*3+1).intValue() / 4;
+ int b = theOscMessage.get(i*3+2).intValue() / 4;
+ colors[i] = color(r,g,b);
+ println("Color: "+r+","+g+","+b+".");
+ }
+}
View
51 processing/lights_emulator/lights_emulator.pde
@@ -0,0 +1,51 @@
+/**
+ * oscP5sendreceive by andreas schlegel
+ * example shows how to send and receive osc messages.
+ * oscP5 website at http://www.sojamo.de/oscP5
+ */
+
+import oscP5.*;
+import netP5.*;
+
+OscP5 oscP5;
+int numboxes = 24;
+color[] colors = new color[numboxes];
+
+void setup() {
+ size(1000,200);
+ frameRate(60);
+ /* start oscP5, listening for incoming messages at port 12000 */
+ oscP5 = new OscP5(this,11661);
+
+}
+
+
+void draw() {
+ background(0);
+
+
+ float boxwidth = width/numboxes;
+ for (int i=0; i<numboxes; i++) {
+ fill(colors[i]);
+ rect(i*boxwidth, 0, boxwidth, height);
+ }
+
+}
+
+
+
+/* incoming osc message are forwarded to the oscEvent method. */
+void oscEvent(OscMessage theOscMessage) {
+ /* print the address pattern and the typetag of the received OscMessage */
+ print("### received an osc message.");
+ print(" addrpattern: "+theOscMessage.addrPattern());
+ println(" typetag: "+theOscMessage.typetag());
+ int len = theOscMessage.arguments().length;
+ for (int i=0; i<min(len/3, numboxes); i++) {
+ int r = theOscMessage.get(i*3+0).intValue() / 4;
+ int g = theOscMessage.get(i*3+1).intValue() / 4;
+ int b = theOscMessage.get(i*3+2).intValue() / 4;
+ colors[i] = color(r,g,b);
+ println("Color: "+r+","+g+","+b+".");
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.