# External MIDI Instruments

External MIDI Instrument window

An External MIDI Instrument sends the track's MIDI data to the corresponding MIDI Out device. A MIDI Out Device is usually hardware, connected to the computer via USB. But it could also be a network connection or software emulation.
MultitrackStudio Pro supports four MIDI Out devices, lower editions support two. To select MIDI Out devices, go to the Studio menu's Devices window.

### Patch section

The large box in the Patch section shows the name of the patch. You can click it to select a patch by name. The names come from a Patchmap file. The ☰ button menu can be used to select the Patchmap file that corresponds to your MIDI Out Device. Also see the MIDI-CI paragraph below.

Tip: You can use the Up/Down Arrow keys to step through the patches.

The Bank Hi:Lo:Prog box indicates the bank (optional) and the program used. The values can be altered by clicking it. Bank Hi, Bank Lo, and Prog are numbers (0..127), separated by colons (for example: 0:1:2 means Bank 1 and Program 2). Bank Hi and Lo, also known as Bank MSB and LSB, correspond to MIDI controllers #0 and #32 respectively. Press Enter to accept the new value, or Esc to cancel the operation.

Channel (top-right corner) indicates the MIDI channel being used.

### Controls section

The Controls section affects the way the patch sounds.

Bright, Reverb, and Chorus control MIDI controllers #74, #91, and #93 respectively. They only work if your synthesizer supports them, of course. Different controllers can appear if the MIDI Out Device supports MIDI-CI, or if a patchmap file specifies supported controls.

Detune detunes the patch using Pitch Bend messages. The value is stored in the MIDI file as RPN 1.

### Virtual MIDI channels

A MIDI Out Device contains 16 MIDI channels. MIDI Out devices are virtualized by MultitrackStudio, meaning a single MIDI channel on a MIDI Out device can be used by multiple tracks. MultitrackStudio will automatically handle playing each note using its own track's patch and controllers. Obviously, this only works correctly if tracks using the same MIDI channel do not play notes at the same time.

The following controllers have default values and do not require attention:

- Modulation (#1)
- Volume (#7)
- Pan (#10)
- Expression (#11)
- Sustain (#64)
- Soft (#67)
- Brightness (#74)
- Reverb (#91)
- Chorus (#93)
- Aftertouch
- Pitch Bend

All other controllers do not have default values. If they are used in one track they should be defined in all other track using the same channel on the same MIDI Out Device.

Note: strictly speaking, virtualization works per-stream rather than per-track.

### MIDI 2.0

The MIDI 2.0 protocol is used if the MIDI Out Device supports it. This offers higher resolutions (16-bit note velocities and 32-bit controls) and new possibilities such as per-note controls.

### Multi-timbral expression

If the MIDI Out Device doesn't support the MIDI 2.0 protocol, "Multi-timbral expression" is used to convert a few MIDI 2.0 per-note controls to MIDI 1.0 channel controls. This works multitimbral devices (this means it can play 16 instruments on 16 channels).

Like MPE, each note gets its own MIDI channel. Channels 12..16 and the channel used by the track are used for this purpose, giving a total of 6 channels (or 5 if the track uses channel 12 or above). The other channels remain available for other tracks.

"Multi-timbral expression" works with per-note Pitch Bend, Brightness, Aftertouch, and Expression. These messages are converted to their channel counterparts. "Multi-timbral expression" is used automatically when one of the per-note controls mentioned (minus aftertouch) is sent.

Pitch bend range values used won't exceed 24 semitones, to ensure good compatibility. If your hardware doesn't support 24 semitones, you can set a lower value in the per-note pitch bend editor. Pitch bend values will be converted to the range used automatically if necessary.

Tip: per-note Pitch Bend, Brightness, and Aftertouch work with an MPE keyboard. To use per-note expression, you can use the MIDI Keyboard Mapper. Set it up to map per-note aftertouch or per-note brightness to per-note expression.

### MIDI-CI

MIDI-CI is part of MIDI 2.0 and allows a sender to retrieve information from a receiver. MultitrackStudio supports MIDI-CI to retrieve program names and controller names from a MIDI Out Device. This only works with devices that support MIDI-CI.

The Patchmap menu, available via the ☰ button, features an "Allow MIDI-CI" option. It's enabled by default. It reads "Allow MIDI-CI (available)" if program names are actually available. If they are, the MIDI-CI information replaces the selected patchmap automatically. You can switch "Allow MIDI-CI" off if you prefer to use a patchmap file instead.

MIDI-CI works automatically with USB MIDI 2.0 class-compliant devices. See MIDI-CI for information on how to set up MIDI-CI using two MIDI 1.0 ports.

Under the hood
The part of MIDI-CI used is called Property Exchange. The ResourceList, ChannelList, ProgramList, ChCtrlList, and Korg's X-ParameterList resources are used. MultitrackStudio subscribes to the ChannelList resource, so it gets notified when something changes.

Several MIDI-CI profiles are supported.