arduino_midi_library
arduino_midi_library copied to clipboard
More SysEx issues.
Context
Board Info:
- Custom ATMega1284p board
- Uses Serial1 for MIDI communication, no other relevant hardware for this specific issue.
- Arduino IDE
1.8.13 - How are you using MIDI ?
- [x] Hardware Serial (DIN plugs)
- [ ] USB
- [ ] Other (please specify)
- Is your problem related to:
- [x] MIDI Input (reading messages from other devices)
- [ ] MIDI Output (sending messages to other devices)
- How comfortable are you with code ?
- [ ] Complete beginner
- [ ] I've done basic projects
- [x] I know my way around C/C++
- [ ] Advanced / professional
Describe your project and what you expect to happen:
My project needs to receive a maximum of 2100 bytes of sysex data.
Describe your problem (what does not work):
Changing the SysExMaxSize following instructions and using the MIDI_CREATE_CUSTOM_INSTANCE macro does not work. Also, the Settings need the midi BaudRate. The attached code works when bypassing the macro.
Steps to reproduce
struct MySettings : public midi::DefaultSettings { static const long BaudRate = 31250; static const unsigned SysExMaxSize = 2100; // Accept SysEx messages up to 1024 bytes long. static const bool UseRunningStatus = true; };
//MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial1, MIDI, MySettings); // This does NOT change the Sysex Settings !!! midi::SerialMIDI<HardwareSerial> Serial1MIDI(Serial1); midi::MidiInterface<midi::SerialMIDI<HardwareSerial>, MySettings> MIDI((midi::SerialMIDI<HardwareSerial>&)Serial1MIDI);
see #167