Skip to content

Commit

Permalink
Removed unused object attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
olavolav committed Nov 22, 2012
1 parent 5ef83ba commit 929a29d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Axis.pde
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Axis {
int value;
int old_value, temp_value;
int old_value;
int value_min, value_max;
int signal_group = 0;
boolean is_instrument = true;
Expand All @@ -22,7 +22,7 @@ class Axis {
}

void update_past_value() {
old_value = value;
this.old_value = this.value;
}

float normalized_value() {
Expand Down
6 changes: 3 additions & 3 deletions MIDIDance.pde
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ boolean[] MIDI_SIGNAL_IS_AN_INSTRUMENT = {true,true,true,true,true,true};
float TONE_LENGTH = 300.; // in ms

// The serial port:
boolean SIMULATE_SERIAL_INPUT = false;
boolean SIMULATE_SERIAL_INPUT = true;
int SERIAL_PORT_NUMBER = 0;
String inStrings[];
Signal input;

int BLENDDOWN_ALPHA = 20;
int ROLLING_INCREMENT = 2;
int NUMBER_OF_SIGNALS = 6;
int NUMBER_OF_SIGNALS = 6/2;
boolean DO_SIGNAL_REWIRING = false;
// int[] SIGNAL_REWIRING = {0,0,0,1,1,1};
// int[] SIGNAL_REWIRING = {0,1,0,2,3,2};
Expand Down Expand Up @@ -89,7 +89,7 @@ void draw() { //////////////////////////////////////////////////////////////////
}
screen.update_graphs();
}
input.update_temp_values();
input.update_past_values();
}
delay(40);
screen.simple_blenddown(BLENDDOWN_ALPHA);
Expand Down
4 changes: 2 additions & 2 deletions Signal.pde
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Signal {
if (!simulation) {
println(Serial.list());
println("Setting up connection to serial port: "+Serial.list()[SERIAL_PORT_NUMBER]);
myPort = new Serial(app, Serial.list()[SERIAL_PORT_NUMBER], 9600); // (fails at the moment)
myPort = new Serial(app, Serial.list()[SERIAL_PORT_NUMBER], 2*9600);
if(myPort == null) {
println("Error! Null serial port."); exit();
} else {
Expand Down Expand Up @@ -107,7 +107,7 @@ class Signal {
return found_a_number;
}

void update_temp_values() {
void update_past_values() {
for(int k=0; k<NUMBER_OF_SIGNALS; k++) {
axis_dim[k].update_past_value();
}
Expand Down
2 changes: 1 addition & 1 deletion Tone.pde
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Tone {
durationMS = d;
startMS = millis();
signal = s;
println("DEBUG: sending note with pitch "+pitch+" ...");
// println("DEBUG: sending note with pitch "+pitch+" ...");
myBus.sendNoteOn(channel, pitch, velocity);
// append it to the list of active tones unless there is one with same the parameters c,p
boolean is_present = false;
Expand Down

0 comments on commit 929a29d

Please sign in to comment.