### Adding and Editing Audio Unit Instruments

Summary: This section describes how to add an Audio Unit Instrument Input Track to the document and how to edit an existing instrument track. An Audio Unit Instrument is an Audio Unit that generates audio in response to input from a MIDI device. To add an Audio Unit Instrument to the document, select Add Audio Unit Instrument… from the Edit menu. To edit an existing instrument, double-click on the AU Instrument group's title bar, or select the AU Instrument by clicking on its group in the document and choosing Edit Selected Group… from the Edit menu. The Add Audio Unit Instrument sheet provides facilities for specifying the Audio Unit to be used for the instrument as well as the MIDI Input Source. There are two modes of operation: basic and advanced (toggled via the Show/Hide Audio Unit Details disclosure triangle). The advanced edit mode provides more detailed Audio Unit configuration facilities.

An Audio Unit Instrument (or AU Instrument) is an Audio Unit that can generate audio in response to input from a MIDI device. Apple ships an AU Instrument named DLSMusicDevice that can respond to MIDI input and generate audio data using audio samples stored in SoundFont or DownLoadableSound (DLS) files.

To add an AU Instrument to the document, select Add Audio Unit Instrument… from the Edit menu. This will display the Add Audio Unit Instrument sheet. To edit an existing AU Instrument, double-click on the AU Instrument group's title bar, or click the group to select it and choose Edit Selected Group… from the Edit menu.

The Add Audio Unit Instrument sheet is nearly identical to the Edit Audio Unit Instrument sheet except that the add sheet allows the selection of the AU Instrument.

Add Audio Instrument sheet in basic

The Add Audio Unit Instrument sheet has two modes: a basic mode (as shown in the image above) and an advanced mode that provides more detailed Audio Unit configuration. In the basic mode, the sheet contains the following items:

MIDI Input Source popup menu: Used to specify the MIDI device and endpoint that will be used for input to the instrument. You may also select none from this list, but keep in mind that AU Instruments rely on a MIDI input source and will not produce audio without a source of MIDI data. An AU Instrument also publishes a MIDI virtual destination- this can be seen by other applications running on the system, so you can send MIDI data directly to the AU Instrument.

Color Well: Displays the current group color. When clicked, this color well invokes the standard Apple color picker and allows the user to choose a new color.

Instrument popup menu: (Add Audio Unit Instrument sheet only). Selects the AU Instrument that will be used for the track. AU Instruments are sorted in a hierarchical menu grouped by manufacturer.

Show/Hide Audio Unit Details disclosure triangle: Toggles between basic and advanced editing mode. Basic mode is the default mode, but the sheet will remember the mode that it was left in.

Add Audio Instrument sheet in advanced mode

In the advanced mode, the sheet contains an Audio Unit configuration section. Additionally, the Edit Audio Unit Instrument sheet has an additional button labeled Edit Thru Params… Clicking this button allows you to filter specific MIDI messages and controllers to limit velocities, key ranges and other properties. For more information about MIDI thru params, see Editing MIDI Thru Params.

#### Editing the AU Instrument Audio Input Settings

Some AU Instruments can accept audio input. These AUs will have either a fixed or variable number of inputs.

Configuring Fixed Inputs

If a device has a fixed number of inputs, the Instrument Audio Input Settings will display a graphical representation of the input channel and bus configuration of the Audio Unit.

For example, this image shows an audio unit that has a single audio input with a stereo channel configuration. If this instrument supported two inputs, you would see a second group labeled Input 2 (or whatever name the vendor chose to give the input).

If there is more than one input supported by the instrument, you can switch between the inputs by either clicking directly in the graphical representation, or selecting the input via the Selected Input popup menu.

By default, new instruments are created without an audio input assignment. To choose a source for audio input, select the Audio Input radio button from the Input Source group.

Once the Audio Input radio button is selected, you will see a representation of the available input channels on the audio device. You may change the channel assignment by dragging the channel group box to a different starting channel. You may also change the number of input channels (if the instrument supports additional channel configurations) by choosing a channel count from the Input Channels popup menu. Note that the above image indicates that the instrument will process stereo audio input from ADAT channels 1 and 2 (device channels 9 and 10) on the current multichannel device.

Selecting the None radio button removes any input source from the selected input.

Configuring Variable Inputs

Some AU Instruments support a dynamic or variable input configuration that is specified by the user. For these instruments the graphic representation of the Audio Unit will indicate the maximum number of channels that the instrument can support. The instrument can support any configuration of inputs as long as the total number of channels does not exceed the maximum.

The user can add any number of inputs by clicking on the Add Input button, or remove unwanted tracks by selecting the track and clicking the Remove Input button.

Each input that is added must have an audio source, and each source track can have an independent channel configuration. The image above illustrates a configuration with a stereo input (Input 1 - channels 1 and 2 of the audio device) and a mono input (Input 2 - channel 2 of the audio device).

#### Editing the AU Instrument Output Settings

All AU Instruments have at least one output and some support more than one output. The visual appearance of the output configuration varies based on the particular Audio Unit.

Configuring the DLS Synth

Apple's DLS Synth has a custom editor to change its configuration.

This simple editor consists of a radio button that sets the mode of the DLS Synth. The DLS Synth has an internal reverb effect that can be enabled or disabled. If the reverb is turned on, the synth will have a single output track. If the reverb is turned off, the synth will have two output tracks. One for the dry output, and one for the reverb.

If you want more precise control of the reverb of the DLS Synth, or to use a single reverb unit for multiple tracks, set the synth to Send Mode. Then for each send track you can disengage its direct output (using the output bus-assign buttons), and send each of these tracks to a bus where you can place a reverb, or some other effect.

Configuring Fixed Outputs

Many AU Instruments support a fixed number of outputs. The output settings editor will display a visual representation of all of the outputs that are available for a given AU Instrument.

The image above shows an AU Instrument that supports eight (8) stereo outputs. For each output that is enabled, a separate track will be added to the document within the AU Instrument group. To enable an output (which becomes a source for the track in the document), select the output from the Selected Output menu or click on the track in the view. Then click the Track radio button in the Output Destination radio group. Tracks that are enabled will have a colored box in the track to indicate that the track is in use. You can enable as many tracks as the instrument supports, but you must have at least one output enabled.

Note that you can also specify the name of the selected track.

Configuring Variable Outputs

Some AU Instruments support a variable number of outputs. Similar to the variable input editor, the output channels can be configured arbitrarily.