Max Magic Microtuner MIDI Tutorial

Excerpts from the Max Magic Microtuner 1.5.4 MIDI Tutorial file (valid for versions up to 1.6.0) - © 2006-2008 Victor Cerullo – All rights reserved

 

Contents 

 

Basic MIDI setup      

 

Please make sure that your MIDI setup contains at least one source (your MIDI interface) and that at least one MIDI controller (a keyboard or any other MIDI device capable of sending note data) is connected to this source, as shown in figure 1. This is the basic MIDI hardware setup.

 

Max Magic Microtuner will also accept virtual MIDI sources as input sources and it will automatically create a virtual source called “Microtuner THRU” and a virtual destination called “Microtuner IN” once the program is run, allowing for other MIDI programs (notation software, sequencers, etc.) to send data to the Microtuner windows. The incoming MIDI data will be routed to the Microtuner windows if the “Microtuner THRU” virtual source is selected as MIDI source in the MIDI Settings window (see next paragraph).

 

 

 

 

The MIDI Settings window and the channels status matrix

 

The MIDI Settings window contains all the controls you need to operate Max Magic Microtuner with external MIDI devices connected to your Mac and with other MIDI software running on the same computer. You can play multiple Microtuner windows simultaneously (e.g. in case of comparative scale analysis), and keep up to five Microtuner windows open at the same time; each Microtuner window can be used to store a different scale and it can be played by different performers through MIDI channel filtering (see below). Please refer to the diagram in figure 2 left for a complete overview of the functionalities that can be accessed from the MIDI Settings window.

 

 

 

 

By clicking on the instrument name fields appearing on the MIDI Settings window you can open the Instrument Selection window (fig. 2 right), that allows for a faster selection of the QuickTime synth instrument to assign to each Microtuner window.

 

If you want to route the MIDI Note-In data to a different Microtuner window depending on the MIDI input channel, you will need to set up a MIDI channel status matrix (see figure 3). This is basically a MIDI channel filter table that can be accessed through the Preferences window and it will be saved along with the Preferences file.

 

 

 

Fig. 3 – MIDI Channels Status Matrix

 

 

 

Sending Midi Tuning Standard system exclusive messages

 

The tool shown in fig. 4 allows you to send MIDI system exclusive tuning messages to a specified MIDI destination using a standard format defined by the Midi Tuning Standard (MTS) specifications known as the Bulk Tuning Dump and the Key-Based Tuning Dump messages. These two message types are almost identical to each other, the only difference being the presence of one additional byte that is used to store the tuning bank information in the Key-Based Tuning Dump message.

 

 

 

Fig. 4 – Midi Tuning Standard system exclusive messages

 

 

These messages make it possible to transfer 128-note microtonal keymaps to a MIDI device compatible with the Midi Tuning Standard in less than one second.

 

Blank intonation table cells will be converted into a "no change" condition in the SysEx message (hex 7F 7F 7F); the frequency data in hexadecimal format can be previewed by selecting the "MTS" tab in the Scale Inspector tool. The tuning resolution of an MTS keymap is 100/16384 cents (0.006104 cents); the approximation errors can be previewed as well by selecting the "MTS Errors" tab in the Scale Inspector tool.

 

The Key-Based Tuning Dump is nothing more than an improved version of the Bulk Tuning Dump message as originally conceived by Robert Rich and Carter Scholz and implemented in 1992. The different naming convention was adopted in 1999 by the Midi Manufacturers Association (MMA) in order to avoid any confusion with the octave-based messages also introduced the same year. Following this decision the name “Bulk Tuning Dump” became a rather generic definition; the two message types are both called “Key-Based Tuning Dump” in the MTS Settings window displayed in Max Magic Microtuner: you have an option for selecting which message type to use, i.e. with or without the tuning bank byte.

 

 

Receiving Midi Tuning Standard system exclusive messages

 

Max Magic Microtuner is capable of receiving and interpreting both the MTS Bulk Tuning Dump and Key-Based Tuning Dump system exclusive messages described in the previous paragraph. In order to prevent unwanted overwriting of intonation tables you may be working on, this function must be enabled first by ticking the checkbox placed in the upper right corner of the Microtuner window, as shown in fig. 5.

 

 

 

Fig. 5 – Enabling a Microtuner window to receive MTS SysEx messages

 

 

 

Sending MTS messages to other Microtuner windows via internal routing

 

You may need to test your MIDI Tuning Standard keymaps “on the fly” within Max Magic Microtuner before sending them to an external device (e.g. to verify the effects of the dump on the receiving MIDI device or any other testing purposes): thanks to the virtual source and the virtual destination described in the first paragraph you can do that by setting up an internal routing for the SysEx messages. More in detail, if you want to send an MTS Tuning Dump SysEx message from a certain Microtuner window to another Microtuner window via internal routing, just follow these simple steps:

 

  1. open a second Microtuner window, with a blank intonation table;
  2. tick the MTS SysEx enable checkbox on this new window to allow it receive data;
  3. click on the “All Active Windows” button on the MIDI Settings window;
  4. set the MIDI Source selector to “Microtuner THRU” (MIDI Settings window);
  5. set the MIDI Destination selector to “Microtuner IN” (MTS System Exclusive window);
  6. bring the original Microtuner window containing your tuning on the foreground so that its name is displayed as “Current” in the MTS System Exclusive window;
  7. click on the “Send Tuning via SysEx” button and send the system exclusive message.

 

 

 

 

MIDI Tuning Standard system exclusive messages implementation

1. MTS BULK TUNING DUMP (408 bytes, sub-ID 08-01, introduced in 1992)

A bulk tuning dump comprises frequency data in a 3-byte format for all 128 MIDI key numbers, in order from note 0 (earliest sent) to note 127 (latest sent), enclosed by a system exclusive header and tail. For more detailed information about the frequency data format see below (source: Midi Tuning Standard specifications published by the Midi Manufacturers Association).

F0 7E <device ID> 08 01 tt <tuning name> [xx yy zz] ... chksum F7

    F0 7E         Universal Non-Real Time SysEx header
 
    <device ID>   ID of target device (7F=all devices)
 
    08            sub-ID#1 = "MIDI tuning standard"
 
    01            sub-ID#2 = "BULK TUNING DUMP"
 
    tt            tuning preset number: 0-127
 
    <tuning name> 16 characters (ASCII 32-127)
 
    [xx yy zz]    frequency data for one note (repeated 128 times)
 
    checksum      see "Checksum calculation", below
 
    F7            EOX
 

2. MTS KEY-BASED TUNING DUMP (409 bytes, sub-ID 08-04, introduced in 1999)

This message is identical to the Bulk Tuning Dump except for the addition of the tuning bank select byte (bb). The message was renamed Key-Based Tuning Dump to differentiate it from the new scale/octave tuning messages also introduced in 1999.

F0 7E <device ID> 08 04 bb tt <tuning name> [xx yy zz] ... chksum F7
 
    F0 7E         Universal Non-Real Time SysEx header
 
    <device ID>   ID of target device (7F=all devices)
 
    08            sub-ID#1 = "MIDI tuning standard"
 
    04            sub-ID#2 = "KEY-BASED TUNING DUMP"
 
    bb            tuning bank: 0-127
 
    tt            tuning preset number: 0-127
 
    <tuning name> 16 characters (ASCII 32-127)
 
    [xx yy zz]    frequency data for one note (repeated 128 times)
 
    checksum      see "Checksum calculation", below
 
    F7            EOX

 

 

Frequency data format

 

xx = MIDI note number to retune to (semitone = 100 cents)
yy = MSB of fractional part (1/128 semitone = 100/128 cents = 0.78125 cents)
zz = LSB of fractional part (1/16384 semitone = 100/16384 cents = 0.006104 cents)
 
hex 7F 7F 7F is reserved for no change to the existing note tuning

 

 

Tuning Name

 

Valid tuning names should only contain ASCII characters within the 32-127 range. Names shorter than 16 characters will be automatically padded with spaces when sending SysEx messages with Max Magic Microtuner.

 

 

Checksum calculation

 

Checksum calculation for both the message types is performed as a XOR on all data bytes excluding F0, F7 and the checksum itself. This means the checksum is calculated as a XOR on 405 data bytes in the case of the Bulk Tuning Dump and on 406 data bytes in the case of the Key-Based Tuning Dump with the tuning bank byte. The result is then AND’ed with 7F to make sure the checksum byte is a seven-bit number, as all data bytes are expected to be according to the MIDI protocol.

 

 

Important:  MTS checksum calculation in Max Magic Microtuner versions older than 1.5.4

 

The online documentation on the original Bulk Tuning Dump message currently available through the Midi Manufacturers Association official website is misleading due to some errors and to some missing information. Because of that, earlier versions of Max Magic Microtuner used a wrong checksum calculation rule in the MTS file import and export functions for the Bulk Tuning Dump message; as of version 1.5.4 this has been corrected to conform to the checksum calculation rule used for the Key-Based Tuning Dump described above. Information about this topic contained in the old user manual of version 1.4 should be disregarded and replaced with the technical specifications reported on this document.

 

Credits

 

Thanks to Robert Rich, Carter Scholz and Jim Heintz for their technical advice.