Table of Contents
Creating a simple LADISH studio using Claudia
JACK enables complex routing of audio and MIDI data between JACK-enabled apps. This enables the user to create their own custom instruments or virtual studios by combining several JACK apps. However, having such power would be of limited use if you had to manually patch programs together every time you wanted a specific configuration. This problem is addressed by JACK session managers such as LADISH.
KXStudio includes an app called Claudia which uses the LADISH JACK session management protocol to save and restore JACK configurations or 'LADISH Studios'. Claudia is one of two JACK patchbay apps included in KXStudio for making and removing JACK connections. The other app is Catia, a simpler program with no canvas preview and no saved connections (and available for Windows and OSX, unlike Claudia).
The use of Claudia and LADISH is best demonstrated with a simple example scenario. Let's say that you frequently find yourself wanting to record audio from a non-JACK app such as Firefox and you use qtractor to record the audio. To do this you must ensure JACK and Cadence's ALSA audio bridge are running and you must connect the alsa2jack capture ports to qtractor's JACK inputs. In this guide we will create a simple LADISH studio with Claudia that will start JACK and the ALSA bridges, load qtractor and connect alsa2jack to its inputs so its ready to record from Firefox at boot.
Creating a LADISH studio
Before you can create a LADISH studio, you need to ensure that you can start JACK OK, ideally without any xruns. If JACK isn't already running then Claudia will try to automatically start JACK using the current JACK settings, which it shares with Cadence, when you start a studio but it will fail if your JACK settings aren't correct. See the previous 'An introduction to Cadence' and 'JACK Configuration' chapters for tips on setting up JACK.
Claudia's interface is divided into four main areas when a studio is loaded. The menus and controls are along the top, a studio and room list is displayed to the upper left, a canvas preview on the lower left (when a studio is loaded) then the currently selected studio occupies the rest of Claudia's window. Claudia may automatically create a new studio when you launch it, otherwise the main canvas will be blank save for some instructions to help you get started with creating a studio. As these instructions state, you can create a new LADISH studio by selecting 'New Studio' from Claudia's studio menu. You can call the studio anything you want but I'll just use 'qtractor' for the studio name.
Start JACK and the ALSA bridge
If you've not already got JACK running, then now is a good time to start it. You can either start JACK from Cadence, choose 'Start Studio' from Claudia's studio menu or push F5 in Claudia. When you do this, you will notice Claudia's transport controls become available and at least two items appear on the studio canvas - the JACK 'Hardware Capture' and 'Hardware Playback' ports. These are only visible in Claudia when the JACK server is running. For the purposes of this example we also need the Cadence ALSA audio bridge to be running. When you have the ALSA audio bridge running you will see an extra two items (JACK clients) in Claudia's studio editing area- alsa2jack, which gets auto-connected to the Hardware Playback ports, and jack2alsa which gets auto-connected to the Hardware capture ports.
Adding an app to a studio
Now we shall add qtractor into our studio by choosing 'Add New…' from the application menu, selecting qtractor under the DAW tab of the Claudia launcher then choosing OK. This will launch qtractor and add it into our studio. You may want to minimise or move qtractor to a different virtual desktop for the moment if you only have a small display as we are still working within Claudia; where you should now see a new JACK client box for qtractor within the editor as well as a new item, called Qtractor, added to the studio list.
Making JACK connections
We want this studio to automatically connect the outputs of alsa2jack (which outputs the sound of all non-JACK apps, such as Firefox) into qtractor so we must connect one to the other. Left-click on capture_1 within the alsa2jack box then, keeping the mouse button pressed, drag your pointer over the Master/in_1 input of qtractor, then let go. You should then see a blue line connecting the alsa2jack client to qtractor's input port - this indicates you have created a JACK connection between the two. Now do the same for alsa2jack's capture_2 and qtractor's Master/in_2 so that both the left and right channels will get sent from ALSA to qtractor. Finally, connect qtractor's Master/out_1 and Master/out_2 to the Hardware Playback ports so that you can hear qtractors output. That completes our studio configuration so save the studio, which should look something like this:
Loading a studio at boot
To set a studio to auto-load at boot, go to the main Cadence window, check that 'Auto-start JACK or LADISH at login' is ticked, and then click on the three dots to the right of this text. Choose 'Load LADISH studio', select the just-created qtractor studio and then push OK.
Next time you reboot you should find JACK starts using the settings saved within your studio, qtractor loads automatically and if you open Claudia (or Catia) you should see alsa2jack is connected to qtractor.