-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SysEx mode not work #6
Comments
This issue will be resolved by #8 |
@lathoub @YANG-Mingcong |
I performed additional tests.
In Due, it seems that you have to wait after the flash. Arduino-USBMIDI/src/USB-MIDI.h Lines 111 to 112 in 866947c
I tried this and it worked. if (byte != MidiType::SystemExclusiveEnd){
SENDMIDI(mPacket);
delay(1);
} Reproduce code. #include "MIDIUSB.h"
#define ENABLE_WAIT
#define WAITTIME 1
void sendSysEx(){
midiEventPacket_t sysEx1 = {0x04, 0xF0, 0x43, 0x20};
MidiUSB.sendMIDI(sysEx1);
MidiUSB.flush();
#ifdef ENABLE_WAIT
delay(WAITTIME);
#endif
midiEventPacket_t sysEx2 = {0x04, 0x7E, 0x4C, 0x4D};
MidiUSB.sendMIDI(sysEx2);
MidiUSB.flush();
#ifdef ENABLE_WAIT
delay(WAITTIME);
#endif
midiEventPacket_t sysEx3 = {0x04, 0x20, 0x20, 0x38};
MidiUSB.sendMIDI(sysEx3);
MidiUSB.flush();
#ifdef ENABLE_WAIT
delay(WAITTIME);
#endif
midiEventPacket_t sysEx4 = {0x04, 0x39, 0x37, 0x33};
MidiUSB.sendMIDI(sysEx4);
MidiUSB.flush();
#ifdef ENABLE_WAIT
delay(WAITTIME);
#endif
midiEventPacket_t sysEx5 = {0x06, 0x50, 0xF7, 0x00};
MidiUSB.sendMIDI(sysEx5);
MidiUSB.flush();
}
void setup() {
Serial.begin(115200);
}
void loop() {
sendSysEx();
delay(1000);
} |
Glad you found the issue. Based on your finding, it went to look on MIDIUSB (on which the library relies) and found a related issue: arduino-libraries/MIDIUSB#44 that in its turn relies on PluggableUSB. From what I read briefly, it is the In the above example, you can replace Patching for the Due in this library is a last resort, and the issue should really be addressed in @YuuichiAkagawa you want to raise this issue with Arduino? |
It's a deep-rooted problem. @YANG-Mingcong Are you okay with this workaround? |
Hello, first of all thank you very much for this great work!
When I tried your “example\SysEx” on the Arduino Due platform, I found that the package was not complete.
Image below is from MIDI Monitor on macOS
And I try to use USBPcap to capture the USB port data( file below can be open by wireShark)
test_20210121.pcap.zip
seems only first 3 byte transport stable
The text was updated successfully, but these errors were encountered: