You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do they get stored in the buffer? Is there a way to clear that buffer?
I'd like to be able to turn input on and off as I need, but I'm finding that when I go from input off to input on, and then read, it reads all of the messages that were received while input channel was turned off.
Is there another way of doing this?
Thanks!
The text was updated successfully, but these errors were encountered:
Yes, when the MIDI input is turned off, messages are not read and remain in the input buffer. You can flush it before re-activating the MIDI input with this code:
while (Serial.available() > 0)
{
Serial.read();
}
Replace Serial with the serial port used for MIDI (can be Serial1 on some boards, check out the default value).
Do they get stored in the buffer? Is there a way to clear that buffer?
I'd like to be able to turn input on and off as I need, but I'm finding that when I go from input off to input on, and then read, it reads all of the messages that were received while input channel was turned off.
Is there another way of doing this?
Thanks!
The text was updated successfully, but these errors were encountered: