This page is under construction
Contributors: dharanamrs, Dazgard and Cody Loyd.
Other tutorials
- http://www.penguinproducer.com/2011/12/the-ladi-session-handler/ previously available at http://linuxhomerecording.blogspot.com/2011/12/ladi-session-handler.html
Table of Contents
Getting started with LADI
So that's it, you have everything installed: laditools, a working jackdbus and ladish. What's next? The best way to get started with LADI is via the LadiTray system tray menu.
LadiTray
You will find this program in your desktop menu. You can also call it by launching
laditray
from a terminal. A tray icon like this
should now appear in your system tray. Right click on it to get the laditray
menu:
Gladish
Now start gladish, the first LadiTray menu entry. This will open the gladish window,from which you can control everything.
The first step in getting started is to create a new studio in the Studio menu. We will call it mystudio in this example. When you create a new studio, the main area in the gladish window will turn black. This area will be the patchbay where you will connect all of your jack audio and MIDI components.
Ladiconf - Configuring JACK
After creating a new studio you will need to configure jack. Each studio can use a different jack configuration. This makes it easier to have multiple setups for different needs, such as, one studio configured with low latency for live work, and another configured for studio work that needs more processing power. From the Tools menu select Configure JACK:
Upon selecting Configure JACK, an application called ladiconf will appear:
This window allows you to set all JACK parameters, although we will only bother here with the essential parameters for getting started. Click on the JACK engine parameters button. You will see the following:
If you are used to working with JACK, most of these parameters will be familiar to you. All parameters are explained in the window, but let's pick up the most important ones for getting started:
- driver
- your JACK backend, which is alsa if you have an internal or USB audio device or firewire/freebob if you have a firewire audio device. You can also setup the backend for using netjack here.
- name
- The name of the JACK process on your system. Do not change this.
- realtime
- this option should be checked.
- realtime priority
- set this to a value lower than what you have defined in your limits.conf file.
- client timeout
- it may be helpful to increase the default value to avoid slow reacting applications being ejected from the JACK process.
- port-max
- this is the maximumum number of jack ports available for your work. It can be reduced to have JACK allocating less memory.
- sync
- JACK2 can operate all clients synchronously or asynchronously. JACK2 by default operates in asynchronous mode, which adds one period of latency, but which will make it more stable in case an application has problems delivering its data on time. If you encounter problems with the default setting, you can try to change it.
If you are through this menu, you can Apply the changes and step to the next Ladiconf button: JACK driver parameters:
The items you see here concern your audio device on the backend. You might have to select a specific alsa device. Some devices also require that you tell how many capture and playback ports it provides, but for most devices, you can leave those two as default. You should select your rate, period and nperiods, for which 48000 (or 44100), 256 and 3, respectively, are starting values that work for many system setups, but you should get information upon how to optimize them for yours. Let's not bother about the rest at the moment and step down right to the bottom of the window. Here you can specify, whether JACK itself should provide ALSA MIDI ports as JACK MIDI ports using the internal 'raw' or the 'seq' driver. If you don't select anything here, you will not see your ALSA MIDI applications/devices in gladish. Alternatively to specifying a driver here, you can leave it to no MIDI driver and use a2jmidid to provide this bridge. A2jmidid might at this time be a safer way to bridge ALSA MIDI to JACK.
If you are done with this, you can Apply the changes, and we're through the hard part.
Start the Studio
Now that JACK is configured, select Start Studio from the Studio menu. If everything is OK, you'll see boxes appearing in the black main area:
Also notice the status bar on the bottom. There is a green LED indicating that JACK is running, along with other information. Also, the laditray icon indicates a running JACK by a green arrow. Not the case? There is probably some configuration error, and the studio probably didn't start because JACK could not start properly. Choose Logs... from the LadiTray? menu and check for errors. It is likely that you have to reactivate JACK through the LadiTray? menu entry. You might also need to reactivate ladishd in the LadiTray? menu.
If everything went OK, and you have the green LED, proceed...
Save your setup
To be sure we keep at least the JACK setup, we will save the parameters we just entered by choosing Save Studio in the gladish Tools menu, or the Laditray meny. Most options are available in both places. Once you have saved everything you can try Unload Studio. This will stop JACK and remove the canvas area. Upon reload it should come back with a started JACK, the input/output boxes on the canvas and any connections you might have made between them.
Elements of Gladish
Gladish canvas
We'll now step through the elements you see on and around the canvas: it is the main area showing all audio and MIDI applications and equipment on the system. You can connect and disconnect ports by clicking them sequentially, or by clicking and dragging between them. Note that all connections you do here will be saved with your Studio and get re-established when you load or start the Studio.
The Status bar
At the bottom of the display, you see all information about the JACK status, the dropout (xrun) counter as well as current and peak DSP usage.
Filling your studio with life
Once your studio is configured, it's time to make it useful. We will first rename it to a meaningful name and then add different application components useful for the music project we want to setup.
Studio renaming
In the previous section, we created a studio called "mystudio". We are going to rename it to something more specific, let's say "reggae rhythm". To rename a studio, select the rename studio option from the Studio menu entry.
You can also use the keyboard shortcut "Shift+Ctrl+R"
An example Studio
You probably didn't guess that, but we are going to create a reggae rhythm, and we will need the following applications:
- a drum machine and rhythm application
- a piano, provided by a sampler
- a guitar, also provided by a sampler
- an organ, provided by a specific application
- a MIDI sequencer
so we choose to use:
- Hydrogen as drum machine
- Linuxsampler as sampler (we will use its Qt frontend, Qsampler)
- Horgand as organ
- Qtractor as MIDI sequencer
Adding applications to your studio
Let's first add the Hydrogen drum machine. Go to the Application menu and choose Run
You can also use the keyboard shortcut "F2"
You will be confronted with this Add Application dialog box
The following elements can be accessed in this dialog:
- Command
- The application command as you would type on the terminal to launch it. Here it is hydrogen
- Name
-
The name which will be displayed in gladish left panel aka application list.
- Run in terminal
- Select this if you wish to run the application from a terminal. Note that this does not work with level 1 applications.
- Run Level
- Hydrogen is level 1 compliant so we choose "Level 1" here. Do not choose this for applications that are not level 1 compliant. Information about application level compliance can be found here: Compliance levels
After validation, hydrogen should start automatically. It will appear as another blue audio box on the gladish canvas and as a started application in the application list on the left. All jack ports are shown with their names within these boxes. Now click successively on two port name fields in boxes you wish to connect or disconnect, as shown in the animation below.
It is possible that you see the connections already done when the application starts. This is because some applications provide auto-connection to JACK by default. This behavior is, however, not what we want when working with ladish, since we want ladish to establish and keep track of the connections. You should therefore make sure to disable the "auto-connect ports" feature which in some cases can be done as an option to the application command or as a configuration option, such as in hydrogen.
Applications and their session files
For this studio, we always want to load a specific hydrogen song file, so we need to
tell gladish to do so by adding the hydrogen song to be
loaded to the application startup command. We first make sure to actually have such a
song file. Application support for Level 0 and 1 does not yet provide management of the session files
of all involved applications. It is therefore on our own to do this, and
it is convenient to setup one directory for each studio. Here we'll use
~/Music/reggae_rhythm/
as directory. The hydrogen song file will be called "reggae_rhythm.h2song", so the full path will be:
~/Music/reggae_rhythm/reggae_rhythm.h2song
The first step is therefore to go to hydrogen and save the song in that file.
Now we need to tell ladish to start hydrogen in a specific manner, i.e. to load the file on every studio start. For this, we first need to stop hydrogen in gladish: Right click on Hydrogen in the Application list and choose Stop. This should make disappear hydrogen and its boxes on the canvas as well.
Right click again on the hydrogen application list entry and select Properties.
You can now change the attributes for this application, and in particular enter the startup command in which we want to include the .h2song file to load for this studio.
Note that editing an application's properties can only be done when an application is stopped.
Let's start hydrogen now to see if it loads our provided song file (~/Music/reggae_rhythm/reggae_rhythm.h2song) automatically. If something goes wrong here, type the command on a terminal to get things cleared.
Do this for all applications
You can follow the same logic to get your sampler (Qsampler), organ and MIDI sequencer configured :
- Add an application to gladish
- Go to the application screen and save it's session to a file in the "~/Music/reggae_rhythm/" folder
- Go back to gladish and stop the application
- Edit it's properties to specify the saved file path to your command
- (Re)start your application in gladish left panel
- Connect the blue ports and the red MIDI ports as you require
Horgand is a "Level 0" application, and session files are loaded with the "-l" parameter. For example :
horgand -l ~/Music/reggae_rhythm/reggae_rhythm.hor
You should have your drum machine ( Hydrogen), sampler ( Qsampler/ Linuxsampler), organ ( Horgand) and midi sequencer ( Qsampler) setup.
Save your setup
Once done, don't forget to save your setup, to save all connections with the studio file.
Pay attention to the fact that "Level 0" applications do not save their settings/session when you are saving gladish studio. You MUST save their session manually to the file provided with the command used to launch to application, example for Horgand :
~/Music/reggae_rhythm/reggae_rhythm.hor
We can now unload the studio. This will shutdown all applications and JACK. When you reload the studio, all applications and connections should be reestablished as you left them.
Two ways to do ALSA MIDI Connections
There is probably still something to do. You probably noticed that none of the above applications showed up with MIDI connections? Only blue boxes, only audio connections have been discussed so far. This is because LADI natively only handles JACK MIDI connections. So if you have chosen no ALSA MIDI driver in your JACK setup, no ALSA MIDI ports will show up on the canvas.
Using the built-in JACK ALSA MIDI driver
If you have chosen the seq or raw MIDI driver in your JACK settings, your studio might look like something like this:
It is the in-built JACK ALSA MIDI driver that exposes your ALSA MIDI ports as
JACK MIDI ports, and you can connect them.
Using a2jmidid
An alternative is to use a2jmidid, which also establishes a bridge between ALSA and JACK MIDI. If you have a2jmidid installed, go to the Applications->Run Menu again and setup
a2j -e
as a new application. You might see something like this as another example studio using a2j.
You noticed that with a2j, some ALSA MIDI ports appear in separate application boxes, whereas
zynjacku, which has a JACK MIDI directly incorporates MIDI and Audio ports in the same boxes.
Separate boxes appear when ALSA client names and the application name are different. In particular,
applications which dynamically change their ALSA client names are likely to not get assigned
and connected properly.
When you use a2j, of course, select none as JACK ALSA MIDI driver in Ladiconf. A2j might have some performance advantages in certain settings.
Features and functions one by one
What is a studio?
A studio is an audio setup configuration. You can think of it as an audio session configuration or a project
Studio contains:
- JACK audio server and its settings
- Rooms, those are where projects are loaded. They define set of ports that are used for connecting with rest of the studio.
- Applications whose JACK clients are part of the high level, hardware setup. For example, master mixer, equalizer, crossover. Settings for connecting to remote hosts are also part of the studio.
- Connections between studio applications, hardware jack client, netjack client(s) and room ports
Basic studio management
Application List
To be done
The Netjack case
If you aim to share (and maybe play) your music over network, you might want to use netjack. By now, there are two versions of netjack: netjack1 and netjack2. Netjack is based upon master/slave(s) model ; the master shall be the machine with the biggest ressources and the best audio interface.
Netjack1
Netjack1 configuration is not completely part of laditools by now, so you will have to start it as a usual application:
- [master side] run an application which command is jack_netsource -H slave_IP
- [slave side] go to jack configuration>engine and select the netone driver ; then start the studio
- [has to be checked:] in order to work, jack_netsource has to be started before the slave.
Netjack2
Netjack2 configuration is a bit more part of laditools, and most of the options can be set through gladish menus:
- [master side] go to jack configuration>netmanager and set the multicast address. If you don't have any multicast address, or don't know what it means, just type the IP address of your master
- [master side] start your studio the way your use to do it
- [master side] add an application which command is: jack_load netmanager. This application stops almost as soon as it has been run, because the application is "jack_load" and not the netmanager itself. So, even if you get a message telling you that the application stops, netjack2 is going fine. Though, it's a bit problematic, as you might save your studio with this application in "inactive" state. I don't have any solution by now, except saving during the "really short time" when jack_load runs!
- [slave side] go to jack congiguration>engine and select the net driver ; enter the very same multicast address you enter in the master configuration, and set the different options
- [slave side] rune your studio
Studio creation
Start gladish, if it is not running already. You can find gladish in your system menu. Create a new studio by selection "New Studio" from the menu
Studio renaming
To rename a studio, select the rename option from the Studio menu entry
You can also use the keyboard shortcut "Shift+Ctrl+R"
Studio unloading
You may need to remove any loaded (active) studio from LADI, to do so, you have the unloading facility. You may consider saving your studio setup before unloading it, it's up to you To unload a studio, select the "Unload Studio" option from the Studio menu entry
You can also use the keyboard shortcut "Shift+Ctrl+U"
Studio loading
If you want to load a studio to work on, you just have to go to the "Load Studio" from the Studio menu entry
You can also use the keyboard shortcut "Ctrl+O"
Studio deletion
When you have done all you needed to do with a studio, you can consider deleting it from your studio list. Everything related to this studio will be trashed so be sure about your doing To delete a studio from the studio list, select the "Delete Studio" option from the Studio menu entry
Attachments
-
laditray_icon.png
(1.6 KB) - added by https://me.yahoo.com/a/0cuzche6znjdgqhk_3bqb6bhz9by#05069
3 years ago.
-
gladish_empty.png
(22.8 KB) - added by https://me.yahoo.com/a/0cuzche6znjdgqhk_3bqb6bhz9by#05069
3 years ago.
-
ladiconf_jack_driver1.png
(37.3 KB) - added by https://me.yahoo.com/a/0cuzche6znjdgqhk_3bqb6bhz9by#05069
3 years ago.
-
ladiconf_jack_engine.png
(25.6 KB) - added by https://me.yahoo.com/a/0cuzche6znjdgqhk_3bqb6bhz9by#05069
3 years ago.
-
gladish_started.png
(20.0 KB) - added by https://me.yahoo.com/a/0cuzche6znjdgqhk_3bqb6bhz9by#05069
3 years ago.
-
gladish_configjack.png
(19.7 KB) - added by https://me.yahoo.com/a/0cuzche6znjdgqhk_3bqb6bhz9by#05069
3 years ago.
-
ladiconf_main.png
(6.5 KB) - added by https://me.yahoo.com/a/0cuzche6znjdgqhk_3bqb6bhz9by#05069
3 years ago.
-
laditray_menu1.png
(10.8 KB) - added by https://me.yahoo.com/a/0cuzche6znjdgqhk_3bqb6bhz9by#05069
3 years ago.
-
gladish_set name.png
(6.8 KB) - added by https://www.google.com/accounts/o8/id?id=aitoawmhebd6koi-xuazmttv5p5moucou8lv0a4
3 years ago.
-
new_studio.png
(16.2 KB) - added by https://www.google.com/accounts/o8/id?id=aitoawmhebd6koi-xuazmttv5p5moucou8lv0a4
3 years ago.
-
stock_dialog-info-32.png
(1.9 KB) - added by https://www.google.com/accounts/o8/id?id=aitoawmhebd6koi-xuazmttv5p5moucou8lv0a4
3 years ago.
-
new_studio_set_name.png
(6.3 KB) - added by https://www.google.com/accounts/o8/id?id=aitoawmhebd6koi-xuazmttv5p5moucou8lv0a4
3 years ago.
-
reggae_rhythm_LADI_Session_Handler.png
(34.1 KB) - added by https://www.google.com/accounts/o8/id?id=aitoawmhebd6koi-xuazmttv5p5moucou8lv0a4
3 years ago.
-
new_application_hydrogen.png
(15.2 KB) - added by https://www.google.com/accounts/o8/id?id=aitoawmhebd6koi-xuazmttv5p5moucou8lv0a4
3 years ago.
-
gladish_hydrogen_stop.png
(18.0 KB) - added by https://www.google.com/accounts/o8/id?id=aitoawmhebd6koi-xuazmttv5p5moucou8lv0a4
3 years ago.
-
gladish_hydrogen_properties.png
(19.9 KB) - added by https://www.google.com/accounts/o8/id?id=aitoawmhebd6koi-xuazmttv5p5moucou8lv0a4
3 years ago.
-
gladish_hydrogen_properties_change.png
(16.4 KB) - added by https://www.google.com/accounts/o8/id?id=aitoawmhebd6koi-xuazmttv5p5moucou8lv0a4
3 years ago.
-
gladish_complete_reggae_rhythm.png
(56.8 KB) - added by https://www.google.com/accounts/o8/id?id=aitoawmhebd6koi-xuazmttv5p5moucou8lv0a4
3 years ago.
-
gladish_midi_audio_connections_in.png
(5.5 KB) - added by https://www.google.com/accounts/o8/id?id=aitoawmhebd6koi-xuazmttv5p5moucou8lv0a4
3 years ago.
-
gladish_midi_audio_connections_out.png
(6.0 KB) - added by https://www.google.com/accounts/o8/id?id=aitoawmhebd6koi-xuazmttv5p5moucou8lv0a4
3 years ago.
-
gladish_set_name.png
(6.8 KB) - added by https://me.yahoo.com/a/0cuzche6znjdgqhk_3bqb6bhz9by#05069
3 years ago.
-
new_application-hydrogen.png
(12.9 KB) - added by https://me.yahoo.com/a/0cuzche6znjdgqhk_3bqb6bhz9by#05069
3 years ago.
-
connection.gif
(420.8 KB) - added by https://me.yahoo.com/a/0cuzche6znjdgqhk_3bqb6bhz9by#05069
3 years ago.
-
gladish_edit_props_songname.png
(14.0 KB) - added by https://me.yahoo.com/a/0cuzche6znjdgqhk_3bqb6bhz9by#05069
3 years ago.
-
gladish_props_hydrogen.png
(10.3 KB) - added by https://me.yahoo.com/a/0cuzche6znjdgqhk_3bqb6bhz9by#05069
3 years ago.
-
gladish_stop_hydrogen.png
(9.9 KB) - added by https://me.yahoo.com/a/0cuzche6znjdgqhk_3bqb6bhz9by#05069
3 years ago.












