Skip to content
Browse files

More API streamlining, renamend ruby stylez into java stylez, updated…

… examples
  • Loading branch information...
1 parent 9157f5c commit 289a5df2e31d963ad645e2db175b7d9aed65c7d1 rngtng committed Dec 22, 2009
View
2 examples/ColorPicker/ColorPicker.pde
@@ -8,7 +8,7 @@ LColor current_color;
void setup() {
launchpad = new Launchpad(this);
- launchpad.flashing_auto();
+ launchpad.flashingAuto();
current_color = new LColor(LColor.YELLOW_HIGH);
}
View
2 examples/Doodle/Doodle.pde
@@ -8,7 +8,7 @@ LColor current_color;
void setup() {
launchpad = new Launchpad(this);
- launchpad.flashing_auto();
+ launchpad.flashingAuto();
current_color = new LColor(LColor.YELLOW_HIGH);
update_scene_buttons(launchpad, current_color);
}
View
12 examples/DoubleBuffering/DoubleBuffering.pde
@@ -15,7 +15,7 @@ int BUFFER1 = 2;
void setup() {
launchpad = new Launchpad(this);
launchpad.reset();
- launchpad.flashing_auto();
+ launchpad.flashingAuto();
mode = FLASHING;
current_color = new LColor(LColor.YELLOW_HIGH);
@@ -60,15 +60,15 @@ public void launchpadButtonPressed(int buttonCode) {
switch(buttonCode) {
case LButton.SESSION:
mode = FLASHING;
- launchpad.flashing_auto();
+ launchpad.flashingAuto();
break;
case LButton.USER1:
mode = BUFFER0;
- launchpad.buffering_mode(Launchpad.BUFFER0, Launchpad.BUFFER0);
+ launchpad.bufferingMode(Launchpad.BUFFER0, Launchpad.BUFFER0);
break;
case LButton.USER2:
mode = BUFFER1;
- launchpad.buffering_mode(Launchpad.BUFFER1, Launchpad.BUFFER1);
+ launchpad.bufferingMode(Launchpad.BUFFER1, Launchpad.BUFFER1);
break;
case LButton.MIXER:
launchpad.changeButton(LButton.MIXER, LColor.RED_HIGH);
@@ -90,9 +90,9 @@ public void launchpadGridPressed(int x, int y) {
launchpad.changeGrid(x, y, current_color);
break;
case 1:
- launchpad.buffering_mode(Launchpad.BUFFER1, Launchpad.BUFFER0);
+ launchpad.bufferingMode(Launchpad.BUFFER1, Launchpad.BUFFER0);
launchpad.changeGrid(x, y, current_color.getRed() + current_color.getGreen() + LColor.FLASHING );
- launchpad.flashing_auto();
+ launchpad.flashingAuto();
break;
default:
launchpad.changeGrid(x, y, current_color.getRed() + current_color.getGreen() + LColor.BUFFERED );
View
2 examples/LaunchpadInput/LaunchpadInput.pde
@@ -7,7 +7,7 @@ byte[] data = new byte[64];
void setup() {
launchpad = new Launchpad(this);
- launchpad.flashing_auto();
+ launchpad.flashingAuto();
}
void draw() {
View
20 src/com/rngtng/launchpad/Launchpad.java
@@ -347,7 +347,7 @@ public void changeAll(int[] colors) {
* [Launchpad::NoValidBrightnessError] when brightness values aren't within the valid range
* [Launchpad::NoOutputAllowedError] when output is not enabled
*/
- public void change_all(PImage image) {
+ public void changeAll(PImage image) {
int param1, param2;
// send normal MIDI message to reset rapid LED change pointer
@@ -384,8 +384,8 @@ public void change_all(PImage image) {
* Errors raised:
* [Launchpad::NoOutputAllowedError] when output is not enabled
*/
- public void flashing_on() {
- buffering_mode(BUFFER0, BUFFER0);
+ public void flashingOn() {
+ bufferingMode(BUFFER0, BUFFER0);
}
/**
@@ -395,8 +395,8 @@ public void flashing_on() {
*
* [Launchpad::NoOutputAllowedError] when output is not enabled
*/
- public void flashing_off() {
- buffering_mode(BUFFER1, BUFFER0);
+ public void flashingOff() {
+ bufferingMode(BUFFER1, BUFFER0);
}
/**
@@ -406,8 +406,8 @@ public void flashing_off() {
* Errors raised:
* [Launchpad::NoOutputAllowedError] when output is not enabled
*/
- public void flashing_auto() {
- buffering_mode(BUFFER0, BUFFER0, MODE_FLASHING);
+ public void flashingAuto() {
+ bufferingMode(BUFFER0, BUFFER0, MODE_FLASHING);
}
/**
@@ -419,8 +419,8 @@ public void flashing_auto() {
* Errors raised:
* [Launchpad::NoOutputAllowedError] when output is not enabled
*/
- public void buffering_mode(int display_buffer, int update_buffer) {
- buffering_mode(BUFFER0, BUFFER0, 0);
+ public void bufferingMode(int display_buffer, int update_buffer) {
+ bufferingMode(BUFFER0, BUFFER0, 0);
}
/**
@@ -433,7 +433,7 @@ public void buffering_mode(int display_buffer, int update_buffer) {
* Errors raised:
* [Launchpad::NoOutputAllowedError] when output is not enabled
*/
- public void buffering_mode(int display_buffer, int update_buffer, int flags) {
+ public void bufferingMode(int display_buffer, int update_buffer, int flags) {
int data = display_buffer + 4 * update_buffer + 32 + flags;
output(STATUS_CC, STATUS_NIL, data);
}

0 comments on commit 289a5df

Please sign in to comment.
Something went wrong with that request. Please try again.