Fixed? a problem with MIDI when running Processing sketch Music_Controls and playing notes from sequencer program (like Ableton Live) at the same time.

This commit is contained in:
Jakob Bak
2013-06-06 16:39:18 +02:00
parent fadc5cc783
commit 5243d6c845
8 changed files with 304 additions and 196 deletions
+3
View File
@@ -1268,6 +1268,7 @@ void MMidi::init()
void MMidi::checkMidi()
{
//while(Serial.available() > 32) Serial.read();
while(Serial.available() > 0) {
data = Serial.read();
@@ -1283,6 +1284,7 @@ void MMidi::checkMidi()
midiBuffer[midiBufferIndex] = data;
midiBufferIndex++;
if (midiBufferIndex > 2) {
midiRead = false;
midiHandler();
}
}
@@ -1472,6 +1474,7 @@ void MMidi::controller(uint8_t channel, uint8_t number, uint8_t value) {
Music.setRelease(value);
break;
default:
//Music.setFM2(value);
break;
}
}