Linuxsampler and Ardour: Using them together
Linuxsampler is a capable sampler available for Linux, which will make you able to use the common formats for sampled instruments like SFZ, GIG and SF2. To simplify using Linuxsampler with different DAWs and other hosts, there’s a LV2 plugin that’ll help the host communicate with, and integrate Linuxsampler. There’s also a DSSI plugin for the same purpose I believe, but I have not used that, and therefore don’t know anything about it.
This tutorial will cover simply using Linuxsampler with Ardour. It’s fairly simple and straight forward once you know it, but it might not be obvious at first, due to how the plugin works.
As an example, I will be loading a few instruments from the Sonatina Symphonic Orchestra. You can download that from here, or you can just use whatever GIG/SF2/SFZ you want and have.
Please note that this tutorial is very basic. It’s by no way exhaustive of what one can do with Linuxsampler. I’m a very basic user of it though, so you’d have to explore more yourself ;).
Anyway, lets go!
Step 1: Get Linuxsampler
By now you know I’m a huge advocate of KXStudio. So, the easy way to get Linuxsampler if you have KXStudio, is to simply run:
This will likely depend on a few extra packages. Just accept installing them as well.
Now, if you don’t have KXStudio, or any other distribution with Linuxsampler and the LV2 plugin pre-packaged, you need to get it from source. That’s out of the scope of this article, and I will only refer you to the Linuxsampler homepage (www.linuxsampler.org) for that.
Note: Recently the LV2-plugin was modified by the Linuxsampler devs to produce 32 outputs for each track. This is desirable in some cases, but I never use that, I just want to use stereo.
So, there’s a patch floating around that you will need to apply to the source if you want it to only give you stereo outs. Linuxmusicians.com has a thread somewhere where that’s pretty thoroughly discussed and solved. Otherwise, search the internet, and I’m sure you’ll find the patch.
Step 2: Get Qsampler
The way the LV2 plugin works is by interacting with Linuxsampler. From what I understand at least. As the LV2 plugin has very basic functionality (you’ll notice it has no buttons, no nothing in the GUI), you need external software to interact with Linuxsampler once you have it up and running through Ardour. For this, I choose Qsampler, but there’s a few other applications around for that as well, like Fantasia, and a few more.
So, download and install Qsampler, or whatever application you want to use. In KXStudio, you do:
…otherwise, you can get it from its website.
Step 3: Fire up Ardour and load the plugin
Now we’re closing in on making some actual sounds! Start Ardour, and then follow the instructions below:
1: Add a MIDI-track. This is what’s used to host the Linuxsampler LV2 plugin, and then to sequence your instruments.
2: Add the Linuxsampler LV2 plugin to the MIDI-track. This creates an instance of Linuxsampler, and creates an empty channel in Linuxsampler, integrated with this track.
If what I just wrote confused you, just never mind it. It’s just technical mumbo jumbo that makes things sound complicated so I can appear smart ;).
There! The plugin is now setup. This is the way you will be adding Linuxsampler instruments to Ardour every time you want a new instrument loaded.
Step 4: Start Qsampler, and load whatever instrument you want to the track
Now, fire up Qsampler. It’ll look something like the picture below.
Start off by pulling the volume to 100% with the volume slider up in the right corner (that now says 35%).
Now, what you want to do, is configure the empty channel just created. When you add more tracks with Linuxsampler LV2 plugins in Ardour, the same type of channels will appear here – empty channels you need to configure, and load your instruments on. So, now we want to load an instrument to our channel.
To configure the channel, press the channel name appearing as a button in the interface (on the screenshot above, it says Channel 0). Start off by selecting the proper file format for the instrument you want to load, by altering the dropdown called Engine. I’m loading a SFZ, so that’s what I will select.
Then, click the file dialogue icon to the right of Filename. Through the dialogue, find and doubleclick the instrument you want to load.
How the configuration of the channel should look when you’re done.
You’ll that the instrument is loading (for bigger instruments, this might take a little while). Once it’s done, you’re also done! Instrument is setup, and ready to be used.
Step 5: PROFIT!
There, all done! Using the piano roll or the MIDI input on the track in Ardour should now produce some nice sound. Sequence away!
So, remember this process when you add more instruments. Add the MIDI track in Ardour, add the Linuxsampler LV2 plugin, and then use Qsampler to load the instrument you want to use to the corresponding channel. Easy enough, no?
A 4-bar sequence of violin madness!
Final thoughts and tips
There, it’s not that hard once you know it and get it. What I have done personally to speed this up, is I’ve saved a MIDI-track with a Linuxsampler LV2 plugin on there as a track template. This means that whenever I want to add an instrument, I just scroll down to ”Linuxsampler Instrument” in the ”Configuration” dropdown list of the add track dialogue.
Using track templates in Ardour to simplify things
If you use the same instrument often, and usually mix them the same way, you could do separate track templates for that as well. For example, I use the violin from the Sonatina Symphonic Orchestra quite a lot, so I’ve created a track template which has the Linuxsampler LV2 plugin, and then the processing plugins (compressor, EQ, and so on) configured like I usually mix the instrument.
Saving track templates for easy use later on is easy in Ardour.
Good, free SFZ instruments
If you want to get started using Linuxsampler with Ardour, here’s a few suggested free instruments for you.
You’ll find the following in a repository maintained by Nils Gey, under the folder SFZ: https://download.linuxaudio.org/musical-instrument-libraries/.
- Piano: Salamander Grand Piano. The best free sampled piano I’ve used at least.
- Drums: Salamander Drumkit. I really like this one! Also something I’ve used a lot.
- Orchestral instruments: Sonatina Symphonic Orchestra. It’s not the best orchestral library in the world, but it gets the job done for hobbyists. I’ve used it extensively in a number of songs. The trick is to throw on lots of reverb, and mix them pretty aggressively with Eqing bad frequencies, etc.
Note, the Sonatina Symphonic Orchestra download is no longer available in this repository but you can still find it at openoctave's sourceforge page.
Thanks for reading!
Written by Gabriel Nordeborn