Midi sendSysEx message unpredicable behaviour USB-MIDI library

Hello,

What a great place is this! I leaned a lot from this forum reading questions and answers. I learned a lot from that, thanks.

I am making a tally light system for a Roland V-8HD video mixer.
I use an Arduino Due with the native USB port for MIDI.
I have to send SysEx messages over USB to the Ronald V-8HD mixer and the video mixer sends a SysEx message back with in my case the tally light information.

I send always the same message but the sende messages are differing in length.

I read the send output in Hairless Midi 0.4
I post my code here.
I could not get the output as text from Hairless Midi, so I put is in as an attachment, sorry about that.

#include <USB-MIDI.h>

USBMIDI_CREATE_DEFAULT_INSTANCE();

unsigned long t0 = millis();
const byte SysExSendV8HdTally[] = {0xf0, 0x41, 0x10, 0x00, 0x00, 0x00, 0x68, 0x11, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x08, 0x6C, 0xF7};

void setup()
{  
  // Listen for MIDI messages on channel 1
  MIDI.begin(1);
  
}

void loop()
{
  // Listen to incoming Midi messages
  MIDI.read();

  // send SysExTally 10 times a second
  if ((millis() - t0) > 100)
  {
    t0 = millis();
    
    MIDI.sendSysEx(sizeof(SysExSendV8HdTally), SysExSendV8HdTally, true);
    
  }
}

Link to library page: GitHub - lathoub/Arduino-USBMIDI: Allows a microcontroller, with native USB capabilities, to appear as a MIDI device over USB to a connected computer

I hope you can help.

Greetings Floris

Please post your code and links to the libraries you're using.

Pieter

#include <USB-MIDI.h>

USBMIDI_CREATE_DEFAULT_INSTANCE();

unsigned long t0 = millis();
const byte SysExSendV8HdTally[] = {0xf0, 0x41, 0x10, 0x00, 0x00, 0x00, 0x68, 0x11, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x08, 0x6C, 0xF7};

void setup()
{  
  // Listen for MIDI messages on channel 1
  MIDI.begin(1);
  
}

void loop()
{
  // Listen to incoming Midi messages
  MIDI.read();

  // send SysExTally 10 times a second
  if ((millis() - t0) > 100)
  {
    t0 = millis();
    
    MIDI.sendSysEx(sizeof(SysExSendV8HdTally), SysExSendV8HdTally, true);
    
  }
}

This might be a Due specific problem. I'm unable to reproduce it on an Arduino Leonardo.

Thank you Pieter!

Do you have any suggestions where to look further?

Otherwise..., I need 16 pins out, so Leonardo could work for me...

Greetings, Floris

Does this work?

#include <MIDIUSB.h>

unsigned long t0 = millis();

void setup() {}

void loop() {
  // Listen to incoming Midi messages
  (void) MidiUSB.read();

  // send SysExTally 10 times a second
  if ((millis() - t0) > 100)
  {
    t0 = millis();
   
    MidiUSB.sendMIDI({0x04, 0xF0, 0x41, 0x10});
    MidiUSB.sendMIDI({0x04, 0x00, 0x00, 0x00});
    MidiUSB.sendMIDI({0x04, 0x68, 0x11, 0x0C});
    MidiUSB.sendMIDI({0x04, 0x00, 0x00, 0x00});
    MidiUSB.sendMIDI({0x04, 0x00, 0x08, 0x6C});
    MidiUSB.sendMIDI({0x05, 0xF7, 0x00, 0x00});
    MidiUSB.flush();
  }
}

No, still strange lengths (and timing), see image in attachment.

Then it might be an issue with the MIDIUSB library. I don't own a Due, so I'm afraid I can't help you any further.

Just to be sure, it might be useful to try a different MIDI monitor or a different computer. There are online MIDI monitors like Loading....

Sending and receiving SysEx massages with the code on an Arduino Leonardo works fine! Sending and receiving Tally inforation with Midi SysEx messages from Ronald V-8HD, routed via MidiFire on iPad, is working.

Hello, I was very interested to see your post as I also want to add Tally lights to my Roland V-8HD. Unfortunately I understand electronics and circuits but I am a beginner in software so do you have any advice for me or do you mind sharing your project? I have an Arduino Leonardo as I note that is how you made your project work.
Thank you very much!
David

Hello David, great that you are interested! I use the Tally system in our webinar studio. I am not experienced in writing code so it can be improved but it is working. I am routing USB Midi communication via an iPad acting as a USB host. The only problem nog solved is using the Arduin Tally system in combination with the V-8HD Remote app. Then USB trafic seems to interfere with each other creating USB Midi traffic to stall. With the V-8HD Remote app running in the background the Arduino Tally system for Ronald V-8HD runs flawwless. :slight_smile:

Here is the code:

Link to code for Tally system for Ronald V-8HD based on Arduino Leonardo.

https://create.arduino.cc/editor/florisbouwstra/c098c304-8b63-4d67-86e3-62dbe54daf37/preview

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.