Replies: 5 comments 9 replies
-
As an update, the problem almost completely goes away if I do NOT assign the call back functions. In other words if I use the raw midi message data after the read() and process them myself, I do not have the issues of the control change messages doing bad things. But if I really beat on the keybaord while twiddling a controller knob I can sometimes get invalid midi data (like values > 127 for the 2nd data byte). So I'm going to proceed with this method. |
Beta Was this translation helpful? Give feedback.
-
As a side note, the line |
Beta Was this translation helpful? Give feedback.
-
I just posted an issue I'm having a few minutes ago. My program also misses note-on and off messages. However, this only seems to be happening when I have the the MIDI Clock enabled. I'm curious if you are testing it with clock on or off... |
Beta Was this translation helpful? Give feedback.
-
I had a similar issue where my really old keyboard controller would put out bad data when it was being taxed. A newer model didn’t have that issue!
Jim
…Sent from my iPhone
On Sep 4, 2022, at 1:28 PM, François Best ***@***.***> wrote:
Well if the code is the same and it works well on one hardware and not well on another, I'd wager it's not the code 😄
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
I was still having dropped note messages (as far as my code was concerned), so I followed instructions from this link (https://www.hobbytronics.co.uk/arduino-serial-buffer-size) (modified to find the correct location of the sketch folder on my windows machine). I was able to increase the RX and TX buffer sizes from 64 to 256 bytes and now I have trouble forcing any lost messages. My main arduino loop (turning on 60 LEDs takes about 6 mSecs to complete, which is about 6 3-byte midi messages at full baudrate. So I can see where if I get lots of CC messages very quickly, it could overrun my input buffer. Fingers crossed! |
Beta Was this translation helpful? Give feedback.
-
Hello -
First thanks so much for the work on this library!
I have been using the library with an Arduino Mega 2560, and the Adafruit MIDI featherwing midi interface (https://www.adafruit.com/product/4740) . I am really only interested in reading MIDI and controlling some lights based on the MIDI input.
I have created callbacks for noteon noteoff and pitchchange. In general things are very responsive (low-latency) and accurate.
My problem is that when control change messages are sent I get bad behavior in my code. It seems to miss note-off messages and interprets other CC messages as note ons. It doesn't happen with pitch-bend, so I'm not sure if it is a hardware or serial port issue or if it is something in the library.
Of course, I will do some more debugging, but that also adds latency to the system so my question is does anyone have this same experience?
For code, here are the important things I am doing:
Beta Was this translation helpful? Give feedback.
All reactions