Isadora can route multichannel audio using the Sound Player, Tone Generator, and IzzyCast Receiver actors. (We plan to extend these functions to the Movie Player actors in a future release.) This article will focus on the Sound Player actor and show you how to take advantage of this feature.
About the Sound Player
The Sound Player actor is designed to play uncompressed AIFF and WAVE files imported in the Sound Samples section of the Media View. The files must be uncompressed because the goal of the Sound Player was to have it behave like a software sampler, where the start of playback after being triggered is as close to instantaneous as possible. Isadora 3.0.8 and later support sound files with more than two channels, whereas versions of Isadora prior to Isadora 3.0.8 did not.
New Features of the Sound Player
To start this tutorial, open Isadora and add a Sound Player actor to a new file.
Along the bottom, you can see the transport controls, which work in the same way as the transport controls in the Movie Player.
You can double-click on the play bar at the left to jump to any point in the sound file, or drag the two triangles above it to change the play start and play length inputs. The transport controls on the right allow you to play, stop, pause, and mute the Sound Player.
Like the Movie Player, these transport controls are primarily designed to be used in a rehearsal situation where, for example, you need to mute the sound because the director needs to speak to the performers. For this reason, these controls are not persistent and will be cleared when you leave a Scene. (For example, if you pause a sound and then return to the Scene, the pause button will no longer be highlighted.)
In the top center part of the actor below the volume/pan indicator circle, you will see the Matrix Router control which is both a visual summary of the actor's current multichannel audio routing and a clickable element that allows you to set the routing channels of the sound file to any output on your audio output device. In the next sections, we'll show you how to put that feature to use.
Selecting Your Audio Output Device
As part of the new multi-channel audio support, Isadora 3.0.8 also introduced the Audio View which allows an audio output device to be selected and the sound levels being sent to that device to be monitored.
The Audio View is hidden by default in new Isadora documents. Go to the menu and choose View > Audio and you'll see something like this appear at the bottom of the window:
The controls in the Audio View allow you to:
- Select the audio output device
- Specify the number of audio output channels to use on that device
- Mute the sound on all channels
- Open the system preferences for audio, allowing you to change the default audio output device or the sample rate for a particular device
In addition, you'll see a "VU Meter" for each channel of your device, which will allow you to monitor the audio level when sound is playing. (If you like your VU meters vertical instead of horizontal, then grab the five dots above this view and drag up to increase the height of this view.)
Selecting The Audio Output Device
The popup menu at the top left allows you to choose the audio output device.
By default, a new Isadora document will select the default audio output you've chosen for your system.
In the screenshot above, the default device is called "MacBook Pro Speakers". Isadora will show you the number of channels and sample rate of the selected device right below the popup menu where the device can be selected. In the screenshot above, the output device offers two channels and a 44.1 kHz sampling rate.
You can also see that it shows a pair of "VU meters" that indicate the volume of the sound being sent to channels 1 and 2 of the audio output device.
Specifying the Number of Channels
To the right of the audio output device menu is another menu that allows you to set the desired number of output channels. For example, if you're using an eight-channel audio output device but you only need four channels, then you would set this to '4'.
You can also choose more channels than are available on the current device so that you can prepare multichannel routings even when you're not connected to a multichannel device.
Assuming your default device also offers only two channels of output (stereo), let's see what happens if we set the number of channels to '8'.
You can see that Isadora has highlighted the number of channels and sample rate in yellow. This is to remind you that the device you've chosen doesn't actually offer 8 channels. When set up as shown above, Isadora will mix down the 8 channels to stereo so you can hear all the channels while you prepare your patch.
When you're ready, you can simply connect your multichannel output device and select it in the audio output device menu. The number of channels and sample rate will return to their normal color to let you know that you actually have eight channels of output upon doing so.
Routing Sound
If you're following along, Isadora has selected the default output device and you have set the number of channels to '8'. Now, you should import a stereo AIFF or WAVE file into your document, which should appear as sound #1 under the "Sound Samples" section like this:
As you can see above, the track we imported is a stereo file because it says "(2 Trk)" to the right of the file name. A four-channel file would say "(4 Trk)", an eight-channel file would say "(8 Trk)", and so on.
Now let's add a Sound Player actor and set the 'sound' input to '1' to choose the sound sample we've just imported. As soon as you do this, the Matrix Router thumbnail in the center of the actor will change to look like this:
The columns (vertical) of this two-dimensional grid represent the number of sound channels in the imported file, while the rows (horizontal) represent the number of output channels for the currently selected audio output device. As you can see, there are two columns and eight rows, corresponding to our stereo file and the eight channels available for output.
The default routing is to send the odd-numbered channels (in this case, channel 1) to the odd-numbered outputs (1, 3, 5, and 7), and the evenly numbered channels (channel 2) to the even-numbered outputs (2, 4, 6, and 8). To see this even more clearly, click the Matrix Router thumbnail to open the Matrix Router editor as shown below.
Now you can see the labels for the channels of the source sound file (1 and 2) across the top, and the labels for the audio output device (1 through 8) along the right. The routing points are grey because this is the default routing, but wherever you see a box containing a number, (e.g., 0.0), it indicates a connection between the source channel above and the output channel to the right.
Try moving your mouse over the grid, you'll see the "crosspoints" illuminate like this:
The indicator here tells you that clicking at the crosspoint over which you are hovering would connect channel 1 of the source audio file to output channel 2 of the audio output device. If you click at this point and move the mouse outside the Matrix Router control you'll see that you've made a connection between channel 1 in the source and channel 2 on the audio output device like so:
Click again, but this time in column 2 and row 4 to send channel 2 of the source sound to channel 4 on the output device as shown below.
At this point, you've routed channels 1 and 2 of your stereo sound file to channels 2 and 4 of the audio output device. To see this in action, click the input trigger ('-') for the 'start' input of the Sound Player actor. You'll see the VU meters for channels 2 and 4 of your output device come to life as the sound is played. But you could also route the sound like this:
We worked with a two-channel (stereo) file for this example, but the Sound Player is not limited to stereo files. For example, here's the Matrix Router setup for a four-channel sound file with an eight-channel output device:
Here is the same four-channel sound file setup for a stereo output device:
Matrix Router Editor: Controlling Volumes, Changing Settings, and Seeing a Different View
Here are the things you can do within the Matrix Router editor:
- As previously shown, to add a crosspoint, click on that point in the Matrix Router display. If you continue to hold the mouse button down after you click, you can reduce the volume at that crosspoint by dragging the mouse down.
- To delete an existing crosspoint, hold down the alt/option key and click it. The hover color will change to red while the alt/option key is down to let you know you're about to delete the crosspoint.
- To adjust the volume, click on a crosspoint and drag the mouse up or down. Note that, by default, the value is given as the amount of attenuation in dB, ranging from 0.0 (full volume) to -∞ (silence).
- You can also adjust the volume by clicking an existing crosspoint and using the small slider at the bottom right of the editor. You may also notice that the source and destination channels of the currently selected crosspoint are always shown to the right of this slider.
- If you prefer to see the volumes as percentages, from 100% (full volume) to 0% (silence), then click the "%" button at the bottom of the editor. The current mode, (either "dB" or "%"), is always shown at the top right of the matrix graphic.
- You can also get a graphic view of the crosspoint configuration by clicking the circle button at the bottom left of the editor.
- Finally, you can reset the routing points to the default by clicking the "X" button at the bottom of the editor.
One important thing to understand is what happens if you change devices and reduce the number of channels. Let's start with the four-channel to eight-channel example from above, shown below:
If you then go to the Audio View and change to a two-channel device, or set the number of channels to '2', the Matrix Router will change to look like it does below.
The yellow crosspoints and outputs indicate that they are invalid. If you played this sound in this configuration, only channels 1 and 2 from the source sound would be sent to outputs 1 and 2 of the audio output device. The remaining channels would be silent because they do not have a valid routing.
Interactive Control
You only need to read this section if you would like to interactively change the routing in real time, e.g., in response to a sensory input. The technique below might feel a bit complex if you are an Isadora novice. So please take your time!
You may have noticed that the 'routing' input has been changing as you adjusted the Matrix Router editor. That's because the routing is actually stored as a text string with the following format:
src:dst, src:dst,... or src:dst@vol, src:dst@vol,...
Where each "src" is the number of the channel in the sound file and "dst" is the channel on the audio output device. The second variation shows how you can use the '@' sign to add a volume (as a percentage) to determine the crosspoint volume.
For example the routing shown below generates the routing string:
1:[email protected], 1:2, 1:[email protected], 1:4, 2:5, 2:6, 2:[email protected], 2:8
What makes this interesting is that you can use various text actors in Isadora to send different routing strings into the 'routing' input and instantly change the routing or crosspoint volumes. For example, the patch in the screenshot below uses three Keyboard Watcher actors, each coupled to a Trigger Text actor, to allow switching between different audio routing setups with the 'a', 's', and 'd' keys on the computer keyboard.
To do this yourself:
- Use the Matrix Router editor to set up the routing you want.
- Left-click in the 'routing' input of the Sound Player actor, select then copy the routing string.
- Left-click in the 'input' of a Trigger Text actor and paste the routing string into it.
- Repeat this process for each of the different routings you want, using a separate Keyboard Watcher and Trigger Text actor for each.
In this next example, we'll create a real-time mixer using the Text Formatter actor. The four input parameters of the Text Formatter generate a routing string that includes volume, enabling real-time adjustments to be made to the volume of each crosspoint.
To do this yourself:
- Double-click the center of a fresh Text Formatter actor to open the editor for it.
- Replace the text inside it with:
"1:1@" P1 ", 2:2@" P2 ", 3:3@" P3 ", 4:4@" P4
The black text inside the double-quotes above is constant, but the Text Formatter actor will replace "P1", "P2", "P3" and "P4" (colored blue above for emphasis) with the input values 'param 1' through 'param 4' whenever any of those values change on the Text Formatter actor. When you change one of those inputs, you'll end up with a routing string like this:
1:1@100, 2:2@66, 3:3@33, 4:4@10
The numbers after the '@' signs specify the volume at the crosspoints. This text string can be fed directly into the 'routing' input of the Sound Player actor.