Permalink
Browse files

updated webpage to version 0.3

  • Loading branch information...
1 parent 23eb2e7 commit 6eda5a7e1510a2a0d4ac51b3167fc880d856d520 Tobias Bielohlawek committed Aug 25, 2011
Showing with 7,513 additions and 36 deletions.
  1. +3 −0 .gitignore
  2. BIN download/launchpad-0.3.zip
  3. +101 −0 examples/ColorPicker/ColorPicker.pde
  4. +32 −0 examples/Colors/Colors.pde
  5. +75 −0 examples/Doodle/Doodle.pde
  6. +105 −0 examples/DoubleBuffering/DoubleBuffering.pde
  7. +41 −0 examples/DrawingBoard/DrawingBoard.pde
  8. +44 −0 examples/Feedback/Feedback.pde
  9. +18 −0 examples/Launchpad/Launchpad.pde
  10. +27 −0 examples/LaunchpadAll/LaunchpadAll.pde
  11. +46 −0 examples/LaunchpadInput/LaunchpadInput.pde
  12. +24 −0 examples/monomic_blink_game/monomic_blink_game.pde
  13. +69 −0 examples/monomic_bounce/monomic_bounce.pde
  14. +30 −0 examples/monomic_crosshairs/monomic_crosshairs.pde
  15. +23 −0 examples/monomic_kaleidoscope/monomic_kaleidoscope.pde
  16. +44 −0 examples/monomic_lights/monomic_lights.pde
  17. +39 −0 examples/monomic_pulse/monomic_pulse.pde
  18. +20 −0 examples/monomic_sketchpad/monomic_sketchpad.pde
  19. +26 −0 examples/monomic_sketchpad_state/monomic_sketchpad_state.pde
  20. +36 −36 index.html
  21. +43 −0 reference/allclasses-frame.html
  22. +43 −0 reference/allclasses-noframe.html
  23. +694 −0 reference/com/rngtng/launchpad/LButton.html
  24. +942 −0 reference/com/rngtng/launchpad/LColor.html
  25. +409 −0 reference/com/rngtng/launchpad/LMidiCodes.html
  26. +343 −0 reference/com/rngtng/launchpad/LaunchadPAppletListener.html
  27. +1,050 −0 reference/com/rngtng/launchpad/Launchpad.html
  28. +312 −0 reference/com/rngtng/launchpad/LaunchpadListener.html
  29. +518 −0 reference/com/rngtng/launchpad/MonomeLaunchpad.html
  30. +53 −0 reference/com/rngtng/launchpad/package-frame.html
  31. +188 −0 reference/com/rngtng/launchpad/package-summary.html
  32. +156 −0 reference/com/rngtng/launchpad/package-tree.html
  33. +500 −0 reference/constant-values.html
  34. +142 −0 reference/deprecated-list.html
  35. +209 −0 reference/help-doc.html
  36. +603 −0 reference/index-all.html
  37. +36 −0 reference/index.html
  38. +158 −0 reference/overview-tree.html
  39. +1 −0 reference/package-list
  40. BIN reference/resources/inherit.gif
  41. +310 −0 reference/stylesheet.css
View
@@ -1,3 +1,6 @@
distribution
bin
+lib
+data
.DS_Store
+*.class
View
Binary file not shown.
@@ -0,0 +1,101 @@
+import themidibus.*;
+
+import com.rngtng.launchpad.*;
+
+Launchpad launchpad;
+
+LColor current_color;
+
+void setup() {
+ launchpad = new Launchpad(this);
+ launchpad.flashingAuto();
+ current_color = new LColor(LColor.YELLOW_HIGH);
+}
+
+void draw() {
+ background(0);
+ delay(1000);
+}
+
+void update_scene_buttons(Launchpad d, LColor kolor) {
+ d.changeSceneButton( LButton.SCENE1, (kolor.isRed(LColor.RED_HIGH )) ? LColor.YELLOW_HIGH : LColor.RED_HIGH );
+ d.changeSceneButton( LButton.SCENE2, (kolor.isRed(LColor.RED_MEDIUM )) ? LColor.YELLOW_HIGH : LColor.RED_MEDIUM );
+ d.changeSceneButton( LButton.SCENE3, (kolor.isRed(LColor.RED_LOW )) ? LColor.YELLOW_HIGH : LColor.RED_LOW );
+ d.changeSceneButton( LButton.SCENE4, (kolor.isRed(LColor.RED_OFF )) ? LColor.YELLOW_HIGH : LColor.RED_OFF );
+ d.changeSceneButton( LButton.SCENE5, (kolor.isGreen(LColor.GREEN_HIGH )) ? LColor.YELLOW_HIGH : LColor.GREEN_HIGH ) ;
+ d.changeSceneButton( LButton.SCENE6, (kolor.isGreen(LColor.GREEN_MEDIUM )) ? LColor.YELLOW_HIGH : LColor.GREEN_MEDIUM );
+ d.changeSceneButton( LButton.SCENE7, (kolor.isGreen(LColor.GREEN_LOW )) ? LColor.YELLOW_HIGH : LColor.GREEN_LOW );
+ d.changeSceneButton( LButton.SCENE8, (kolor.isGreen(LColor.GREEN_OFF )) ? LColor.YELLOW_HIGH : LColor.GREEN_OFF );
+ for( int red = 0; red < 8; red++) {
+ for( int green = 0; green < 8; green++) {
+ d.changeGrid( red, green, kolor);
+ }
+ }
+}
+
+public void launchpadSceneButtonPressed(int buttonCode) {
+ int number = LButton.sceneButtonNumber(buttonCode);
+ println(number);
+ if( number < 5 ) {
+ current_color.setRed( 4 - number);
+ }
+ else {
+ current_color.setGreen(8 - number);
+ }
+}
+
+public void launchpadSceneButtonReleased(int buttonCode) {
+ update_scene_buttons(launchpad, current_color);
+}
+
+public void launchpadButtonPressed(int buttonCode) {
+ switch(buttonCode) {
+ case LButton.UP:
+ for( int red = 0; red < 4; red++) {
+ for( int green = 0; green < 4; green++) {
+ launchpad.changeGrid( red, green, new LColor(red, green));
+ }
+ }
+ break;
+ case LButton.DOWN:
+ for( int red = 0; red < 4; red++) {
+ for( int green = 0; green < 4; green++) {
+ launchpad.changeGrid( red*2, green*2, new LColor(red, green));
+ launchpad.changeGrid( red*2+1, green*2+1, new LColor(red, green));
+ }
+ }
+ break;
+ case LButton.LEFT:
+ int pos_x = 0;
+ int pos_y = 0;
+ for( int red = 0; red < 4; red++) {
+ for( int green = 0; green < 4; green++) {
+ launchpad.changeGrid( pos_x, pos_y, new LColor(red, green));
+ launchpad.changeGrid( 7 - pos_x, pos_y, new LColor(red, green));
+ launchpad.changeGrid( pos_x, 7 - pos_y, new LColor(red, green));
+ launchpad.changeGrid( 7 - pos_x, 7 - pos_y, new LColor(red, green));
+ pos_y += 1;
+ }
+ pos_x += 1;
+ pos_y = 0;
+ }
+ break;
+ case LButton.RIGHT:
+ update_scene_buttons(launchpad, current_color);
+ break;
+ }
+}
+
+public void launchpadButtonReleased(int buttonCode) {
+ switch(buttonCode) {
+ case LButton.MIXER:
+ exit();
+ }
+}
+
+
+
+
+
+
+
View
@@ -0,0 +1,32 @@
+import themidibus.*;
+
+import com.rngtng.launchpad.*;
+
+Launchpad launchpad;
+
+void setup() {
+ launchpad = new Launchpad(this);
+
+ int pos_x = 0;
+ int pos_y = 0;
+
+ for( int red = 0; red < 4; red++) {
+ for( int green = 0; green < 4; green++) {
+ launchpad.changeGrid( pos_x, pos_y, new LColor(red, green));
+ launchpad.changeGrid( 7 - pos_x, pos_y, new LColor(red, green));
+ launchpad.changeGrid( pos_x, 7 - pos_y, new LColor(red, green));
+ launchpad.changeGrid( 7 - pos_x, 7 - pos_y, new LColor(red, green));
+ pos_y += 1;
+ }
+ pos_x += 1;
+ pos_y = 0;
+ }
+}
+
+void draw() {
+ background(0);
+}
+
+
+
+
View
@@ -0,0 +1,75 @@
+import themidibus.*;
+
+import com.rngtng.launchpad.*;
+
+Launchpad launchpad;
+
+LColor current_color;
+
+void setup() {
+ launchpad = new Launchpad(this);
+ launchpad.flashingAuto();
+ current_color = new LColor(LColor.YELLOW_HIGH);
+ update_scene_buttons(launchpad, current_color);
+}
+
+void draw() {
+ background(0);
+ delay(1000);
+}
+
+void update_scene_buttons(Launchpad d, LColor kolor) {
+ d.changeSceneButton( LButton.SCENE1, (kolor.isRed(LColor.RED_HIGH )) ? LColor.YELLOW_HIGH : LColor.RED_HIGH );
+ d.changeSceneButton( LButton.SCENE2, (kolor.isRed(LColor.RED_MEDIUM )) ? LColor.YELLOW_HIGH : LColor.RED_MEDIUM );
+ d.changeSceneButton( LButton.SCENE3, (kolor.isRed(LColor.RED_LOW )) ? LColor.YELLOW_HIGH : LColor.RED_LOW );
+ d.changeSceneButton( LButton.SCENE4, (kolor.isRed(LColor.RED_OFF )) ? LColor.YELLOW_HIGH : LColor.RED_OFF );
+ d.changeSceneButton( LButton.SCENE5, (kolor.isGreen(LColor.GREEN_HIGH )) ? LColor.YELLOW_HIGH : LColor.GREEN_HIGH ) ;
+ d.changeSceneButton( LButton.SCENE6, (kolor.isGreen(LColor.GREEN_MEDIUM )) ? LColor.YELLOW_HIGH : LColor.GREEN_MEDIUM );
+ d.changeSceneButton( LButton.SCENE7, (kolor.isGreen(LColor.GREEN_LOW )) ? LColor.YELLOW_HIGH : LColor.GREEN_LOW );
+ d.changeSceneButton( LButton.SCENE8, (kolor.isGreen(LColor.GREEN_OFF )) ? LColor.YELLOW_HIGH : LColor.GREEN_OFF );
+ d.changeButton( LButton.USER1, ((kolor.isMode( LColor.FLASHING )) ? LColor.GREEN_HIGH : LColor.GREEN_LOW) + LColor.FLASHING );
+ d.changeButton( LButton.USER2, (kolor.isMode( LColor.NORMAL )) ? LColor.GREEN_HIGH : LColor.GREEN_LOW );
+}
+
+public void launchpadSceneButtonPressed(int buttonCode) {
+ int number = LButton.sceneButtonNumber(buttonCode);
+ println(number);
+ if( number < 5 ) {
+ current_color.setRed( 4 - number);
+ }
+ else {
+ current_color.setGreen(8 - number);
+ }
+}
+
+public void launchpadSceneButtonReleased(int buttonCode) {
+ update_scene_buttons(launchpad, current_color);
+}
+
+public void launchpadButtonPressed(int buttonCode) {
+ switch(buttonCode) {
+ case LButton.USER1:
+ current_color.setMode( LColor.FLASHING );
+ break;
+ case LButton.USER2:
+ current_color.setMode( LColor.NORMAL );
+ break;
+ case LButton.MIXER:
+ launchpad.changeButton(LButton.MIXER, LColor.RED_HIGH);
+ break;
+ }
+}
+
+public void launchpadButtonReleased(int buttonCode) {
+ switch(buttonCode) {
+ case LButton.MIXER:
+ exit();
+ }
+ update_scene_buttons(launchpad, current_color);
+}
+
+public void launchpadGridPressed(int x, int y) {
+ launchpad.changeGrid(x, y, current_color);
+}
+
+
@@ -0,0 +1,105 @@
+import themidibus.*;
+
+import com.rngtng.launchpad.*;
+
+Launchpad launchpad;
+
+LColor current_color;
+
+int mode;
+
+int FLASHING = 0;
+int BUFFER0 = 1;
+int BUFFER1 = 2;
+
+void setup() {
+ launchpad = new Launchpad(this);
+ launchpad.reset();
+ launchpad.flashingAuto();
+ mode = FLASHING;
+ current_color = new LColor(LColor.YELLOW_HIGH);
+
+ update_scene_buttons(launchpad, current_color);
+}
+
+void draw() {
+ background(0);
+ delay(1000);
+}
+
+void update_scene_buttons(Launchpad d, LColor kolor) {
+ d.changeSceneButton( LButton.SCENE1, (kolor.isRed(LColor.RED_HIGH )) ? LColor.YELLOW_HIGH : LColor.RED_HIGH );
+ d.changeSceneButton( LButton.SCENE2, (kolor.isRed(LColor.RED_MEDIUM )) ? LColor.YELLOW_HIGH : LColor.RED_MEDIUM );
+ d.changeSceneButton( LButton.SCENE3, (kolor.isRed(LColor.RED_LOW )) ? LColor.YELLOW_HIGH : LColor.RED_LOW );
+ d.changeSceneButton( LButton.SCENE4, (kolor.isRed(LColor.RED_OFF )) ? LColor.YELLOW_HIGH : LColor.RED_OFF );
+ d.changeSceneButton( LButton.SCENE5, (kolor.isGreen(LColor.GREEN_HIGH )) ? LColor.YELLOW_HIGH : LColor.GREEN_HIGH ) ;
+ d.changeSceneButton( LButton.SCENE6, (kolor.isGreen(LColor.GREEN_MEDIUM )) ? LColor.YELLOW_HIGH : LColor.GREEN_MEDIUM );
+ d.changeSceneButton( LButton.SCENE7, (kolor.isGreen(LColor.GREEN_LOW )) ? LColor.YELLOW_HIGH : LColor.GREEN_LOW );
+ d.changeSceneButton( LButton.SCENE8, (kolor.isGreen(LColor.GREEN_OFF )) ? LColor.YELLOW_HIGH : LColor.GREEN_OFF );
+ d.changeButton( LButton.SESSION, (mode == FLASHING) ? LColor.YELLOW_HIGH : LColor.YELLOW_LOW );
+ d.changeButton( LButton.USER1, (mode == BUFFER0) ? LColor.YELLOW_HIGH : LColor.YELLOW_LOW);
+ d.changeButton( LButton.USER2, (mode == BUFFER1) ? LColor.YELLOW_HIGH : LColor.YELLOW_LOW );
+}
+
+public void launchpadSceneButtonPressed(int buttonCode) {
+ int number = LButton.sceneButtonNumber(buttonCode);
+ println(number);
+ if( number < 5 ) {
+ current_color.setRed( 4 - number);
+ }
+ else {
+ current_color.setGreen(8 - number);
+ }
+}
+
+public void launchpadSceneButtonReleased(int buttonCode) {
+ update_scene_buttons(launchpad, current_color);
+}
+
+public void launchpadButtonPressed(int buttonCode) {
+ switch(buttonCode) {
+ case LButton.SESSION:
+ mode = FLASHING;
+ launchpad.flashingAuto();
+ break;
+ case LButton.USER1:
+ mode = BUFFER0;
+ launchpad.bufferingMode(Launchpad.BUFFER0, Launchpad.BUFFER0);
+ break;
+ case LButton.USER2:
+ mode = BUFFER1;
+ launchpad.bufferingMode(Launchpad.BUFFER1, Launchpad.BUFFER1);
+ break;
+ case LButton.MIXER:
+ launchpad.changeButton(LButton.MIXER, LColor.RED_HIGH);
+ break;
+ }
+}
+
+public void launchpadButtonReleased(int buttonCode) {
+ switch(buttonCode) {
+ case LButton.MIXER:
+ exit();
+ }
+ update_scene_buttons(launchpad, current_color);
+}
+
+public void launchpadGridPressed(int x, int y) {
+ switch(y) {
+ case 0:
+ launchpad.changeGrid(x, y, current_color);
+ break;
+ case 1:
+ launchpad.bufferingMode(Launchpad.BUFFER1, Launchpad.BUFFER0);
+ launchpad.changeGrid(x, y, current_color.getRed() + current_color.getGreen() + LColor.FLASHING );
+ launchpad.flashingAuto();
+ break;
+ default:
+ launchpad.changeGrid(x, y, current_color.getRed() + current_color.getGreen() + LColor.BUFFERED );
+ break;
+ }
+}
+
+
+
+
@@ -0,0 +1,41 @@
+import themidibus.*;
+
+import com.rngtng.launchpad.*;
+
+Launchpad launchpad;
+
+LColor current_color;
+
+boolean[] flags = new boolean[64];
+
+void setup() {
+ launchpad = new Launchpad(this);
+}
+
+void draw() {
+ background(0);
+ delay(1000);
+}
+
+public void launchpadButtonPressed(int buttonCode) {
+ switch(buttonCode) {
+ case LButton.MIXER:
+ launchpad.changeButton(LButton.MIXER, LColor.RED_HIGH);
+ break;
+ }
+}
+
+public void launchpadButtonReleased(int buttonCode) {
+ switch(buttonCode) {
+ case LButton.MIXER:
+ exit();
+ }
+}
+
+public void launchpadGridPressed(int x, int y) {
+ int coord = y*8 + x;
+ flags[coord] = !flags[coord];
+ launchpad.changeGrid(x, y, (flags[coord]) ? LColor.YELLOW_HIGH : LColor.YELLOW_OFF);
+}
+
+
Oops, something went wrong.

0 comments on commit 6eda5a7

Please sign in to comment.