Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

fix bug in midi_message_available #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ardumidi/ardumidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ int midi_message_available() {
in the buffer. At least we get first one right! */
byte command = Serial.peek() & 11110000;
if (command != MIDI_PROGRAM_CHANGE && command != MIDI_CHANNEL_PRESSURE) {
return (Serial.available()/2);
return (Serial.available()/3);
}
return (Serial.available()/3);
return (Serial.available()/2);
}

MidiMessage read_midi_message() {
Expand Down