mySoftware [Updates]

Once you create a user profile on Motifator and update with the appropriate information, the updates shown here will be specific to you.

newProducts [YOK]

rssFeeds [Syndicate]


Old Motifator threads are available in the Archive.

Viewing topic "FOR PROGRAMMERS:  Problems with MIDIoUSB to Motif Rack ES"

Posted on: January 09, 2017 @ 01:13 AM
Total Posts:  5
Joined  12-28-2016
status: Newcomer

I develop my own MIDI software under MS visual studio/MFC, using the winmm.lib library. For years my connectivity has been done using native MIDI, through adaptors such as the Roland UM-ONE, with no problems at all. My main sound source is a Yamaha Motif Rack ES.

Recently I changed to MIDI over USB, and immediately encountered problems in sending data to the YMR. A typical sequence would be a sound change, consisting of a bundle of a few messages, such as…

SYSEX (about 8 bytes):  Switch from voice to performance mode.
BANK/PROGRAM CHANGE (9 bytes):  Set required program
SYSEX (about 10 bytes):  Set volume of part.

When I sent these sorts of bundles over MoUSB, sometimes there was no action at all, and sometimes the wrong action occurred. The only simple thing I could think of doing was to insert delays between the messages using the WIN32 Sleep function, as follows:

SYSEX (about 8 bytes):  Switch from voice to performance mode.
Sleep (20) ; // 20mS delay
BANK/PROGRAM CHANGE (9 bytes):  Set required program
Sleep (20) ; // 20mS delay
SYSEX (about 10 bytes):  Set volume of part.

That seems to have solved the problem, but I’d like to understand a bit more about what’s actually happening, and whether there is an officlal fix for these sorts of problems.

At a guess, it looks like the input queuing within the YMR is not up to the job. 

Can anyone provide any more information?

  [ Ignore ]  

Posted on: January 09, 2017 @ 07:04 AM
Total Posts:  10839
Joined  09-16-2010
status: Legend

As you’re likely aware, the MIDI data rate via 5-pin-DIN ports is 31.25 kbits/sec. That results in about three bytes per millisecond.

Even USB 1.0 at its slowest (Low Speed) can handle data at 1.5 Mbits/sec, although it has more latency and jitter (which can be on the order of several milliseconds). At that rate the Motif hardware gets very little time to recognize the End of Sysex byte (F7) and process a message before the next one immediately follows.

You could try pacing the individual bytes of the SysEx so that the timing is somewhat closer to that of 5-pin MIDI, which might allow the Motif to recognize and process each individual message. Even so, a few milliseconds between messages will likely still be required. If you’re familiar with the MIDI-OX utility, the need for such a pause by some hardware is acknowledged by the fact that the default delay after each F7 is 60 milliseconds, which can be changed for hardware having more (or less) tolerance.

I wouldn’t expect anything more will ever be done by Yamaha to change how MIDI data over USB is handled by the Rack ES than what’s implemented in the most recent OS version. Inserting the delay you found necessary to eliminate the message garbling would seem the correct approach.

  [ Ignore ]