Skip to content

USBMIDI-Adapter example doesn't send SysEx #1127

@alsoduck

Description

@alsoduck

Describe the bug
USBMIDI-Adapter example doesn't send SysEx message.
Even though SYSEX_BUFFER_SIZE set to 512 (in Settings.hpp) and SERIAL_BUFFER_SIZE set to 4096, it doesn't send SysEx messages.

To Reproduce
Steps to reproduce the behavior.

  1. Connect Arduino Due to PC
  2. (optional)set SYSEX_BUFFER_SIZE to 512(default value 128) in file C:\Users\user\Documents\Arduino\libraries\Control_Surface\src\Settings\Settings.hpp
  3. (optional)set SERIAL_BUFFER_SIZE to 4096(default value 128) in file C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\cores\arduino\RingBuffer.h
  4. upload USBMIDI-Adapter example to arduino due
  5. send any SysEx to Arduino Due device
  6. no sysex sent.

Expected behavior
SysEx messages should be sent.

Code

  • Please post the full code required to reproduce the problem.
  • If the code doesn't do what you expect, include a detailed description of what you expected the code it to do.
  • Don't post code that is too long. Try to narrow down the problem, try one component or aspect of your project at a time.
  • Don't post snippets, always post a complete (compilable) sketch.
  • Post your code between triple back ticks with the cpp language specifier, as shown below. This ensures that the code is displayed correctly and that syntax highlighting is enabled. (See the GitHub Markdown guide.)
// just example. no changes made.
#include <Control_Surface.h>

// Instantiate a MIDI over USB interface
USBMIDI_Interface midi_usb;
// Instantiate a 5-pin DIN MIDI interface (on the TX and RX pins of Serial1)
HardwareSerialMIDI_Interface midi_ser {Serial1};
// Instantiate the pipe to connect the two interfaces
BidirectionalMIDI_Pipe pipes;

void setup() {
  // Manually route MIDI input from the serial interface to the USB interface,
  // and the MIDI input from the USB interface to the serial interface
  midi_ser | pipes | midi_usb;
  // Initialize the MIDI interfaces
  MIDI_Interface::beginAll();
}

void loop() {
  // Continuously poll all interfaces and route the traffic between them
  MIDI_Interface::updateAll();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions