Multichannel routing in Live with Max - the Audio Routes Max For Live system

With the release of Live 10, an important (and previously unavailable) feature was added to the Live API: the opportunity for a programmer to access audio anywhere within a Live session through a Max for Live device. This opens the door for many new M4L options, including audio spatialization, side-chaining and massive multi-channel audio routings. In order to make this new functionality more easily accessible, we’ve created a free set of Max for Live-based tools called Audio Routes , provided as a set of devices, example Live Sets and detailed documentation.

This package is targeted to both Live users and Max for Live programmers, and can be seen as either ready-to-use devices or as examples for creating your own multichannel devices. It comes with more than ten pre-built devices and a series of Live sets that show these devices in action:

Example: 01 Audio Routing Example.als

This Live set embeds a device named Audio Routing Example that serves as a base for the main principles that need to be well-understood in order to use (and program) multichannel devices in Live:

The device resides in a central channel location in the Live set, and shows a number of possibilities using the Live API for audio routing from within any M4L device. With this device, you can:

grab audio from Live tracks into the device,

alter or re-route grabbed audio,

send the re-routed audio to other tracks in Live.

You’ll notice that the inputs and outputs have to either be Live tracks or hardware I/O connections : that’s a required constraint in the Live API. In this device, you can see that the routings are processed through dedicated popups - which resemble the routings popups in regular Live tracks. There is a second constraint of routing in Live - and, by extension: routings have to be set as stereo pairs . That’s why you will find that the routing options are all labeled in pairs.

Example: 02 Audio Send Receive.als

To illustrate the possibilities offered by the routing features within a M4L device, two devices are provided named Audio Sender and Audio Receiver :

These are very simple devices that each have the same popup as we saw in the Audio Routing Example device, used as audio output routing in Audio Sender and input routing in Audio Receiver. You may ask: “Why use stereo routing in a device rather than using the regular Live track routing.” The answer resides in the question itself: Live’s track routing does not allow you to choose the routing location from within a Live track.

If you look closely in the picture above, you’ll see that, in this case, the audio is grabbed (with the Audio Sender) and sent before the Echo device - thus before processing the delay effect. The un-processed audio is then sent to the “2 Audio” track, to be used for any other purpose, free from the delay effect:

Similarly, in the “3 Audio” track, audio is grabbed at the output of the “1 Audio” track (our delayed effect) using the Audio Receiver device, and inserted into the local signal chain. Notice that the remote signal is inserted after the Resonators effect, so it is not affected by that process. And since the device has a “Thru” option, both signals are mixed together at the output of the track.

These handy devices can be very useful in some situations where you need to grab or insert a part of an existing audio chain without having to deal with the sole routing of a Live track, and without having to break an existing work.

Example: 03 Side Chaining.als

Now that we know how useful it might be to freely route audio, let’s use our devices for a classic production effect: side-chaining. Often used for compression or gating purposes (like in the native Compressor or Gate devices) side-chaining may be used in the context of a M4L device - thanks to the routing features that we’ve seen. We’ve created two devices that are spectral effects, and use side-chaining principles to process a local audio signal using a remote audio signal: The Source Filter device filters the local sound - in this case named “Harmony” - using a remote sound - named “Rhythm” . The spectral process decomposes both signals into frequency bands, detects the amplitude of each band, then multiplies the amplitudes of the “Harmony” signal with those of the “Rhythm” signal. This results in having the Harmony signal “rhythm-isized” by the Rhythm signal.

Since Harmony and Rhythm are meaningful names (for our example), it is up to the user to provide a harmonic signal for the Harmony path, and a rhythmic - or noise - signal for the Rhythmic path. When we insert the remote Rhythm signal into our device, we use the same input routing popup as before. In the example shown here, the audio being grabbed as rhythm resides in the Rhythm track of the Source Filter group. The Cross Synthesis device works in a similar way, except that instead of filtering a sound with another sound, both sounds may have their spectral content (frequencies and amplitudes) exchanged and tuned:

This device has a two-dimensional slider that performs a spectral mix between both sounds (A & B). The X dimension represents the mix of spectral amplitudes between sound A and sound B, and the Y dimension represents the mix of spectral frequencies between A and B. Adjustments to the Convolution control allows you to tune the mix between sound A and B in both amplitudes and frequency dimensions simultaneously, resulting in spectrally-morphed sounds.

Example: 04 Audio Sends.als

Have you ever wanted more Sends and Returns in your Live set? Return tracks are special tracks in which you typically place audio effects. You then send some amount of each regular track’s signal (using the send controls) into one or more of the different Return tracks - and the effects they contain. Effects in Return tracks are often “common” effects, such as delay or reverb, and are shared among the sending channels Live only offers twelve of these Return tracks, which is normally sufficient for standard audio production. But you may find this to be a problem if you use the Sends/Returns as audio outputs for multi-speakers setups - such as theater productions - in which you need to adjust several speaker volumes for a given track. The Audio Sends device lets you create additional audio busses. In the example set, each of the tracks (named FX1, FX2 … FX8) has a particular effect in its audio chain. By inserting the Audio Sends in any other track, each of these FX tracks become available as a target. You’re free to define up to eight targets, using the routing popups, and adjust the amount of a tracks’s signal using a gain slider.

This device can be very useful if all available Send/Return chains are being already used and you would like to add a couple of additional “sends” to your Live set.

Example: 05 Audio Matrix.als

The Audio Matrix device is an extended version of the very first Audio Routing Example device described earlier in this article. The Audio Matrix device lets you capture 16 stereo signals from Live tracks, and freely route each of these stereo signals to any other Live tracks, using a matrix to connect the inputs to various outputs. In order to make it easier to control, the editing window is separate from the core device, and can be set as floating or non-floating:

The routing popup let you select the source and destination for each stereo channel, and each of the inputs and outputs has its own gain scaler. In the example set, 8 stereo tracks (“1 Audio”, “2 Audio”, …, “8 Audio”) play some audio, but the track output is set to “Sends Only”. This means that no signal is output to the master Live mixer. The Audio Matrix device captures the audio of these tracks, and the 8 first outputs of the device are set to target 8 “output” tracks (“10 Audio”, “11 Audio”, …, “17 Audio”). With the current settings, there are no input-to-output connection, so no audio is heard. Clicking inside the matrix display will connect inputs to specific outputs, and provides a completely flexible audio routing system for the selected audio tracks.It is possible to create presets for the routing of the matrix by clicking in the slots at the bottom of the matrix. By default, presets slots are empty. Click on a preset number and continue editing parameters. All values are then saved into that slot. Click on another slot to start a variation of the current state of the device.

This allows you to change complex routings for different situations with a single click. By adjusting the Ramp slider, it is also possible to create smooth transitions between one preset and another, providing for more musical changes even in the most challenging routing situations.

Example: 06 Panner.als

When you start thinking about multichannel audio, notions such as sound spatialization or “surround sound” come to mind. Using the routing tools we’ve used in the previous devices, we’ve created a device that provides solutions to those who would like to mix audio in Live using more than two speakers. The Panner device allows for multichannel panning of a stereo source from a Live track to a planar (2D) sound system with up to 32 speakers. The position of the sound source is represented by a cursor in a plane, and speakers are represented by “nodes”.

The panning technique used here is a distance-based algorithm that calculates the amplitude of the source for one given speaker (node) relatively to the distance between the cursor and the center of the node, and to the size of the speaker. If two or more speaker’s nodes overlap, or if the cursor is placed at an intermediate position, the amplitude of each speaker will be weighted accordingly, producing a balance between speakers. This is how we create a sensation of sound localization within the sound field. The 06 Panner.als Live set embeds three audio tracks that each contains a panner device. Each panner device will send its (panned) multichannel audio - in pairs, remember - to the different Return tracks. Each Return track has its output sent to a pair of 16 possible speakers (in our example), and one additional Return track is used for a LFE (subwoofer) channel.

The Panner device has a floating window where you manipulate the virtual position of the sound source using your mouse:

In the example, spatialization is performed for a 5.1 speakers system. Note that, for this kind of setup (with a central speaker), we’ve adjusted the order of channels in respect of Live’s stereo design (L-R-Ls-Rs-C-LFE) rather than trying to match the typical industrial formats (typically L-C-R-Ls-Rs-LFE). So channels 1-2 output the L-R signals, channels 3-4 output the Ls-Rs signals, and channel 5 outputs C signal (with channel 6 going unused). The LFE channel has its own (17) channel number. Note: VU-meters in the panner may differ form the VU-meters in the Return tracks, as we’re playing 3 panned sources together. The Panner’s meters reflect the panning in the track it is processing, and Return meters reflect the global mix of each panned track. You get to choose or modify the routing that you want. To facilitate the construction of a sound field in a given format (5.0, 7.0…), you can load some typical speakers configurations using the Presets menu:

Controlling the position of the sound source The orange source cursor initially responds to polar localization controls such as Azimuth (Az - which is measured clockwise in degrees toward the vertical axis, with 0° in front of the listener) and relative Distance (Dist - which is measured from the center of the sound field that represents the position of the listener).

Polar coordinates are more convenient when controlling the position of the source using automation. Cartesian (XY) coordinates may be more appropriate for MIDI-mapping of a 2D controller, or using a pair of simple MIDI faders. By switching the Mode from AD (Az/Dist) to XY, it is possible to control the position of the source using cartesian coordinates.

The Width parameter controls the width, in degrees, of the stereo image of the input sound, around the position of the cursor. Since Live tracks are stereo, the panning needs to be applied to both left and right channels of a track. The left and right channels of the input sound are represented by two additional cursors, which you may decide to display or hide. Setting a width of 0° will “mix” the two input channels - i.e. the same panning will be applied on both channels. A width of 180° will apply a mirrored image, spacing the left and right channels +/-90° from the position of the cursor. Panner LFO Instead of having to control the position of a sound source using either automation or MIDI controllers, you may want to use an automator such as a LFO, which would play for you some basic shapes of movements. The Panner LFO device lets you control the Azimuth and Distance remotely using the Live API mapping features. Movements are based on a full rotation of the source around the listener, and cyclic or random variations such as 8-figures (crossing), acceleration, deviation, etc. You may link the rate of the rotation to Live’s tempo for synced applications.

Example: 07 Rand and Step Panner.als

Following the idea of automated spatialization tools, we’ve provided a couple of related devices. The Rand Panner and Step Panner devices let you apply rhythmic amplitude envelopes on the incoming sound. Each of the enveloped signal can then be sent to a different output channel, resulting in “rhythmicized” sound spatialization. Rand Panner

When the Run parameter is engaged, an internal metronome (running either in sync with Live's transport or in a free fashion) triggers a random choice of one or more output channels. When an output channel is selected, the system produces an amplitude envelope, which is used to control the volume of the incoming audio into that output channel. The shape of the envelope can be tweaked using simple parameters such as Time and Slope, and may also be slightly - and randomly - modified on each metronome tick.

The rate of the metronome may also vary, as well as the gain of the amplitude envelope. Several in/out connections may be selected together using the Voices parameter, and each output can have its gain adjusted separately. All together, the system creates a randomized rhythmic panner, one that lets the incoming audio either 'float' or directly jump from speaker to speaker. Audio output routing is set in an additional pane that you may display using the Routing tool icon:

Step Panner The Step Panner device is similar to the Rand Panner device, except that provides a more precise sequence of specific routing steps.

The device behaves like a step sequencer whose steps each represent a routing of the incoming sound to a specific channel, with a specific gain, duration and shape of amplitude envelope:

As with the Rand Panner, output routing is set in an additional pane:

For both Rand and Step Panners, we've added a way to switch from one configuration to another: patterns. Patterns each contain a snapshot of a given configuration and may be automated or MIDI-controlled. Patterns can also be freely copied from one device to another device.

Example: 08 Creative Routings.als

Now that we’ve seen all these spatialization tools, you may say: “What if I have only two speakers in my home studio? Is there any way I could use these devices?”. Actually, everything we’ve discussed is related to audio routing. Could we use the Panner and the Panner LFO, Rand and Step Panners for something like managing sound treatment in a more organic fashion - without having to worry about speakers, surround or multichannel audio rendering? In this example Live set, we’re using the Return tracks in a classical sense, i.e. the Return tracks contain audio effects and are routed to the Master track.

By controlling the routing of a sound source using the Panner, Rand Panner and Step Panner spatialization devices, we can feed each effect in a very versatile way:

XY panning with or without overlap, controlled with MIDI gesture, or looped automation

Random or sequenced patterns, with rhythmic or smooth transitions