By accepting you will be accessing a service provided by a third-party external to https://www.midi.org/

MIDI 2.0 Scope-A Development and Test Tool for MIDI 2.0 Messages

ScopeTx_20190522-163138_1

In the summer of 2018, the MIDI Manufacturers Association invited me to join a group of developers that would be tasked with creating prototype implementations of the protocol that is now being adopted as MIDI 2.0. 

Most of the other developers taking part in this effort were from companies that make existing MIDI hardware or software, and set to adding this new protocol to their existing systems as a proof of concept.

Art+Logic, the company that I work for, doesn't make any products of our own -- we build custom software projects for clients, and have been doing so since the company was founded in 1991 by a trio of developers who had worked together creating MIDI and audio software at Hybrid Arts back in the 1980s.

Since I didn't have anything already on hand as a starting point for my prototyping work, I took advantage of the blank page that I was given, and asked myself: "If a client hired us to add MIDI 2.0 support to their existing product, what kind of tools would I wish existed to make that process easier?"

If I were building something that generates MIDI data, I would want to have something that I could send data to that would decode those messages, display their contents, and give a clear indication of any errors in the data that my system was creating.

If I were building a system that receives data, I'd want a utility that makes it easy to generate any valid messages in the protocol without needing to manually twiddle bits around. I'd also want something that can save a sequence of messages and play them back to me perfectly.

The MIDI 2.0 Scope application that I've written is the tool that I would want to have available:

* Sends and receives MIDI 2.0 Channel Voice messages
* Sends timed data
* Will display any incoming MIDI 2.0 message (including the new System Exclusive formats, Mixed Data, MIDI 1 Messages in Universal Midi Packets, and Jitter Reduction Timestamps)
* Cross-platform, built with the JUCE application framework
* Open-source (GPL 3.0 or later) C++ code

Transmit View 

Launching the Scope app displays its Transmit tab. This view lets the user:

* Select any of the MIDI 2.0 Channel Voice message types
* Assign a group and MIDI channel to the message
* Enter numeric values as appropriate for the current message type.
* Select/clear boolean toggle values as appropriate (for example -- the MIDI 2.0 Program Change message contains an optional bank selection value in the message that only takes action in combination with the 'Bank Valid' bit being set, so that changing bank and program now only requires a single command instead of sending a control change to set the bank followed by a program change within that bank).
* Enter 32-bit controller data using a slider or directly entering a numeric value.

Below the controls to specify the type and contents of a message are these controls:

* For debugging purposes, the message specified in the interface is displayed as 8 bytes of hexadecimal values.
* Pressing the "Send" button will create a MIDI 2.0 message and send it to the output port (or echo it back to the application's Receive tab)
* A checkbox labeled "Continuous controller" will generate and send any of the controller message types when the Controller Data slider is dragged without needing to press the Send button for each message.

The application can generate the MIDI 2.0 Channel Voice message types seen in the list below:

Receive view 

The Receive tab will display information about all incoming messages.

Here, we see a MIDI 2.0 Note On event. The "UMP:" prefix indicates that the data being displayed is contained in the new Universal MIDI Packet format defined in the MIDI 2.0 specification. From left to right, we have

* Event type = Note On
* Key = C4
* Velocity = 65535 (maximum velocity for a MIDI 2.0 Note On/Off event -- forget about those old 7-bit limitations of velocity between 0-127!)
* Group 1, Channel 2 -- MIDI 2.0 defines 16 groups of 16 channels each. You can think of these groups as being 16 separate MIDI cables all carried in a single data stream.

You may also configure the app to display incoming data in a raw hexadecimal format before showing the parsed version:

Many messages in the MIDI 2.0 spec are defined such that some of the bits within them are reserved and according to the standard must be set to zero. The Receive view will also validate each incoming message and display any bit or bits that are in error:

Here, we're being shown that this Note On message that must be restricted to a 7-bit note number (0-127) is trying to turn on note 188 (BC in hexadecimal).

Timed Test view  

The third tab in the application provides a way to send out timestamped data from a file for verifying a receiver's behavior with known MIDI messages.

Files used by this view can be created by saving data received by the application (whether that data was generated by the Transmit tab of the Scope application, or some other MIDI 2.0 device), or edited by hand; the file format is simple plain-text that's easy to create and work with:

```
# Midi 2 Scope file format description/example.
# Any text following an '#' octothorpe is treated as a comment and ignored
# Blank lines are ignored.
# column zero: Decimal integer delta time in ms since previous event (or
# beginning of playback)
# data: Space-delimited hex values to interpret as MIDI 2.0 data.
# Any number of spaces may be used to delimit.
# Upper or lower-case hex digits accepted.
# Line terminated with carriage return (hex 0D).
#
# Ascending C major scale, eighth notes at 60 bpm. 

250 40 90 3c 00 00 6e 00 00
250 40 80 3c 00 00 6e 00 00

250 40 90 3e 00 00 6e 00 00
250 40 80 3e 00 00 6e 00 00

250 40 90 40 00 00 6e 00 00
250 40 80 40 00 00 6e 00 00

250 40 90 41 00 00 6e 00 00
250 40 80 41 00 00 6e 00 00

250 40 90 43 00 00 6e 00 00
250 40 80 43 00 00 6e 00 00

250 40 90 45 00 00 6e 00 00
250 40 80 45 00 00 6e 00 00

250 40 90 47 00 00 6e 00 00
250 40 80 47 00 00 6e 00 00

250 40 90 48 00 00 6e 00 00
250 40 80 48 00 00 6e 00 00

```
The file listed above will display in the Timed Test tab as:

The controls at the top of the window let you:

* Start/stop the test
* Set the currently loaded test to loop continuously
* Control the playback rate -- when the slider is set to zero as shown here, events will be sent out according to the millisecond count that begins each line in the file. Dragging this slider to a different value will instead pause that many milliseconds between sending each message.

During playback, the current event will be highlighted:

Availability 

The MIDI 2 Scope application will be available in both source and pre-compiled binary formats later in 2019 via both the Art+Logic and MIDI Manufacturers Association websites.

I've already had the opportunity to incorporate feedback from other members of the prototyping group that's been working with the protocol in its pre-release state, and I'm looking forward to this tool receiving wider use and continuing to become more useful to other hardware and software developers as MIDI 2.0 adoption begins.  

Roland Announces "MIDI 2.0 Ready" A-88MKII MIDI Ke...
MIDI 2.0 at the 2020 NAMM Show