MIDI

You can control the audio, serial and MIDI matrix using standard MIDI commands. You can also switch the GPOs via MIDI. This way you can control the M.1k2 from consoles or MIDI controllers easily.

Usage

The MIDI daemon is always active and listening on the destination labeled Controller in the MIDI matrix. To use the MIDI daemon, route the source of your MIDI commands to this sink.

MIDI Implementation

HEXMIDI CommandFunction
C0 Program Change Load system snapshot
B0, B1 Controller Set audio channel routing
B2 Controller Set port routing
B3 Controller Set MIDI routing
B4 Controller Set serial routing
B5 Controller Switch GPOs
B6, B7 Controller Port and channel gains
B8 Controller Run script

Load System Snapshot

Usage: C0 <system snapshot ID>

The program change command is followed by one byte, 0..127, indicating the system snapshot ID. After receiving the command, the M.1k2 will load the corresponding system snapshot (if it is configured in the system snapshot table), only restoring what is allowed under the current permission set active for the MIDI plugin.

Examples

  1. C0 07
    Load system snapshot #7
  2. C0 63
    Load system snapshot #99

Audio Channel Routing

Controlling the audio matrix is a bit more complex. First, you set the source channel to route using B0, followed by the source channel. Then you can set one or more destinations using this source channel with B1, followed by one destination channel. If you want to route one source channel to multiple destinations, this saves you from repeating the source channel.

Usage: B0 <source port> <source channel> B1 <dest port> <dest channel> [<dest port> <dest channel>..]

Important: Always set the source channel first. Any destination channel command will use the last source channel command received.

Audio channel mapping
MADI portChannelMIDI values
1100 00
1200 01
..
16300 3E
16400 3F
..
1610F 00
1620F 01
..
16630F 3E
16640F 3F
N/CN/C7F XX

Note: The N/C value makes sense for input channels only, of course.

Audio channel tool

Just select the port and channel and read out the MIDI command.

MADI port:
Channel:
Source channel CMD:
Destination channel CMD:

Examples

  1. B0 01 00 B1 01 00
    Route MADI port 2, ch 1, to port 2, ch 1
  2. B0 01 00 B1 01 00 02 00
    Route MADI port 2, ch 1, to port 2, ch 1 and port 3, ch 1. (This example uses running status)
  3. B0 0F 10 B1 01 00 B0 0F 11 B1 01 01
    Route channels 17+18 from port 16 to port 1, channels 1+2

Port Routing

To route complete ports 1:1 onto another, use the B2 command (MIDI controller on channel 3). The two bytes that follow are source port and destination port:

Usage: B2 <source port> <dest port>

Port mapping
MADI portMIDI values
100
201
..
150E
160F
N/C7F

Note: The N/C value makes sense for input ports only, of course.

Examples

  1. B2 00 08
    Route MADI port 1 to port 9
  2. B2 00 00 01 01 02 02 03 03 04 04 05 05 06 06 07 07 08 08 09 09 0A 0A 0B 0B 0C 0C 0D 0D 0E 0E 0F 0F
    Create a unity matrix (1:1) on all 16 ports. (This example uses running status)
  3. B2 7F 0E B2 10 0F
    Silence ports 15 and 16

MIDI Routing

Controller messages on MIDI channel 4 control the MIDI routing matrix. The controller command B3 is followed by two bytes, the first identifies the source port and the second the destination.

Usage: B3 <source> <dest>

Port mapping
MIDI PortMIDI values
MADI port 100
MADI port 201
..
MADI port 150E
MADI port 160F
Front MIDI10
Controller11
N/C7F

Examples

  1. B3 10 11 B3 11 10
    Route front MIDI to the controller and back
  2. B3 7F 00 7F 01 7F 02 7F 03 7F 04 7F 05 7F 06 7F 07 7F 08 7F 09 7F 0A 7F 0B 7F 0C 7F 0D 7F 0E 7F 0F
    Disable all MIDI de-embedders. (This example uses running status)

Serial Routing

Controller messages on MIDI channel 4 control the MIDI routing matrix. The controller command B3 is followed by two bytes, the first identifies the source port and the second the destination.

Usage: B4 <source> <dest>

Serial mapping
MIDI PortMIDI values
MADI port 100
MADI port 201
..
MADI port 150E
MADI port 160F
Front RS232 @ 9.6k10
Front RS232 @ 19.2k11
Front RS232 @ 38.4k12
Front RS232 @ 115.2k13
Front RS422 @ 9.6k14
Front RS422 @ 19.2k15
Front RS422 @ 38.4k16
Front RS422 @ 115.2k17
Front RS485 @ 9.6k18
Front RS485 @ 19.2k19
Front RS485 @ 38.4k1A
Front RS485 @ 115.2k1B
Front USB @ 9.6k1C
Front USB @ 19.2k1D
Front USB @ 38.4k1E
Front USB @ 115.2k1F
Controller @ 9.6k20
Controller @ 19.2k21
Controller @ 38.4k22
Controller @ 115.2k23
N/C7F

Note: Front RS422 and RS485 use the same port, the operating mode is determined by the port value you choose.

Examples

  1. B4 12 08 B4 08 12
    Route front RS232 to MADI port 9 and back with 38.4k.
  2. B4 13 08 08 09 09 13
    Route front RS232 to MADI port 9, MADI port 9 into port 10, and back to front RS232 with 115.2k. (This example uses running status)

GPO Control

You can control the 4 GPOs of the M.1k2 with controller values on channel 6. The first controller value byte is the ID of the GPO (0..3 for GPO 1..4), the second byte is the value to be set (0 for off, >0 for on).

Usage: B5 <GPO ID> <0/1>

Examples

  1. B5 00 00
    Turn GPO 0 off
  2. B5 00 01
    Turn GPO 0 on
  3. B5 03 01
    Turn GPO 3 on

Gains

Port and channels gains are set using the controller command on channels 6 and 7. The command on MIDI channel 6 sets the gain to use, while the command on MIDI channel 7 lists the ports/channels where the gain should be applied. The order has always to be B6, followed by one or more B7 commands.

Usage: B6 <gain MSB> <gain LSB> B7 <port> <channel> [B7 <port> <channel>..]

The M.1k2 offers a gain range from -60..+30dB. For the B7 command, we map this range to positive values and multiply it by 10 to give you .1 dB steps. In short, the value you submit becomes 0..900 by adding 60 to the decibel value and multiplying by 10: value = (gain+60)*10.

Gain Tool

Type in either the gain in dB or the calculated gain value and read out the converted value.

Gain: dB
Value:
MIDI command:B6 04 58

Ports and channels are identified the same way as we do with the single channel routing. In addition to that, to address the port gain we use the channel value 0x7F.

Examples

  1. B6 04 3A B7 05 7F
    Set port gain on port 6 to -3 dB.
  2. B6 04 76 B7 01 07 01 08
    Set channel gain for channels 7/8 on port 2 to +3dB. This example uses running status, so the second B7 is omitted.

Run Script

System scripts have a unique ID 1...64 If you have a defined system scripts, you can reference their ID in the second byte of the MIDI controller B8. The first parameter byte has to be 00 for the moment.

Examples

  1. B8 00 07
    Run system script #7
  2. B8 00 12
    Run system script #18

The scripts will run asynchronously. You can see failure/success and optional log output in the system script pane in the 'My Account' page.

MIDI Security

All MIDI commands are executed with the permissions for the plugin 'midi'. If you want to restrict the execution of MIDI commands to parts of the M.1k2, please choose a fitting permission class for the 'midi' plugin in the permission configuration page - or create a new permission class to suit your needs.

Questions? Suggestions?

If you have questions, found a bug or need new features, please do not hesitate to contact us: support@directout.eu.

Text and images © 2017 DirectOut Technologies, 17.03.2017