LinuxSampler

blank
news about features screenshots demos download donations support developers faq documentation bugs instruments links credits
Bitcoins Or donate Bitcoins at:
1Q9CK7xUhMNWryqYTZLbUTXbrjpYYtwvng

Why donate?

Documentation

We are currently in a transition phase. Most of the documentation on this page is actually old and out-dated. We are currently moving (more recent) documentation to the separate site doc.linuxsampler.org:


Be invited to help us with writing documentation!

SFZ(2) format specification and implementation status

We are currently in the works of a SFZ(2) format based sampler engine, as additional powerful sampler engine for LinuxSampler. As there is currently no official document defining the so called SFZ version 2 format, we created our own SFZ2 reference document, reflecting the format and the progress of implementation in LinuxSampler's Subversion developers version. This reference document is currently maintained by Anders Dahnielson.

Howtos

To ease new users the first contact with the Linuxsampler applications, we have written the following short Howtos:

Name Descripton
Windows HOWTO LinuxSampler quickstart guide for the MS Windows operating system.
OS X HOWTO LinuxSampler quickstart guide for the Apple OS X operating system (Note: Completely out-dated!).
Debian HOWTO Guide for how to build optimized Debian packages of LS & friends for your specific machine.
Debian HOWTO (German) Another guide for Debian on an external site, this one in German language.
Windows Build HOWTO Guide for how to build libgig, linuxsampler and gigedit for Windows by using MSYS.

gigedit

This is our graphical instrument editor based on the Gtk toolkit. It can be used stand-alone or in conjunction with LinuxSampler. Read the Gigedit Quickstart for a short tutorial. Please notice that this quickstart document is automatically generated from CVS and thus might reflect features and behaviors only available in the very latest, bleeding edge development version of gigedit from CVS.

Note: The gigedit documentation is currently completely out-dated!

JSampler

JSampler is an opensource, platform-independent, GUI front-end for LinuxSampler, written entirely in Java. Read the JSampler manual for more information.
For information about using Fantasia with Miditzer in Puppy Linux VTPO read this HOWTO.

libgig

libgig is a C++ library used to load and modify instrument files, supporting the Gigasampler / GigaStudio file format, SoundFont file format, KORG file format, AKAI disk image format and the DLS (Downloadable Sounds) file format.

If you're a developer and might want to use libgig, here is its API documentation (automatically updated from SVN).

liblscp

liblscp is C library as convenient wrapper around the LinuxSampler Control Protocol. If you're a developer and might want to use liblscp, here is its API documentation (automatically updated from SVN).

LSCP Reference

The following documents define the LinuxSampler Control Protocol, a network protocol with which LinuxSampler can be controlled locally as well as remotely. As this is a simple ASCII based protocol it's possible to write a frontend for LinuxSampler in any programming language and GUI library. There's still a big demand especially for a Gtk and ncurses based frontend, so be encouraged and let us know if you wrote a frontend for LinuxSampler!

Protocol Name Document Types Release Date Description
LSCP draft TXT, HTML, XML unreleased Very latest draft of the protocol (which usually reflects the latest development state from SVN or may even not be implemented yet).
LSCP 1.7 TXT, HTML, PDF, XML 2015-07-15 Protocol specification of latest LinuxSampler release (v2.0.0).
LSCP 1.6 TXT, HTML, XML 2014-01-10 Protocol specification of a SVN LinuxSampler version (1.0.0.svn25 - svn r2500).
LSCP 1.5 TXT, HTML, XML 2011-06-24 Protocol specification of a SVN LinuxSampler version (svn r2188).
LSCP 1.4 TXT, HTML, XML 2009-07-31 Protocol specification of old official LinuxSampler release v1.0.0.
LSCP 1.3 TXT, HTML, XML 2007-12-06 Protocol specification of ancient LinuxSampler release (0.5.1).
LSCP 1.2 TXT, HTML, XML 2007-10-15 Protocol specification of ancient LinuxSampler release (0.5.0).
LSCP 1.1 TXT, HTML, XML 2006-11-25 Protocol specification of ancient LinuxSampler release 0.4.0.
LSCP 1.0 TXT, HTML, XML 2005-07-17 Protocol specification of ancient LinuxSampler release 0.3.3.

The protocol will be extended from time to time. You may look at the features site to see which control commands are already implemented and which are not.

Example LSCP scripts

If you don't want / can't use a GUI frontend you will probably write some LSCP scripts for using with linuxsampler to setup your needed sampler session. It follows some common LSCP examples to give you a good starting point for writing your own ones. Adjust it to your needs and send it to the running linuxsampler application with:

cat yourscript.lscp | netcat localhost 8888

Optionally you can also use a graphical frontend like QSampler one time to setup a working sampler session for your needs and save it. Because you have to know that the files saved by our frontends are actually pure LSCP scripts, thus you can i.e. use those files simply with the mentioned netcat command from above to setup the sampler session without a frontend.

Here is a simple LSCP example which uses ALSA as MIDI input and as audio output driver as well, it creates only one sampler channel using the Gigasampler engine and loads a Piano instrument on that sampler channel:

#enable echo mode
SET ECHO 1

# load the ALSA audio driver
# (parameter CARD is optional, I use it here to select my 2nd sound card
#  you can use 'GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA CARD' to get
#  all available sound cards)
CREATE AUDIO_OUTPUT_DEVICE ALSA CARD='1,0'

# load the ALSA MIDI driver
CREATE MIDI_INPUT_DEVICE ALSA

# connect my MIDI keyboard which has ALSA seq ID '72:0'
# (see 'aconnect -i' for the IDs of your MIDI devices
#  or use 'GET MIDI_INPUT_PORT_PARAMETER INFO 0 0 ALSA_SEQ_BINDINGS')
SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS='72:0'

# setup a sampler channel
ADD CHANNEL
LOAD ENGINE gig 0
SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0
SET CHANNEL MIDI_INPUT_DEVICE 0 0
LOAD INSTRUMENT '/home/me/Gigs/PMI Steinway D.gig' 0 0

# finally show our channel setup (optional of course)
GET CHANNEL INFO 0

# quit connection
QUIT

The next example uses JACK as audio output driver instead and automatically connects the two output channels of LS's JACK client to the first two ALSA PCM channels, so you can hear something without having to manually connect it e.g. with qjackctl:

#enable echo mode
SET ECHO 1

# load the JACK audio driver
CREATE AUDIO_OUTPUT_DEVICE JACK

# connect to ALSA playback JACK client so we can hear something
# (you can use 'GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO 0 0 JACK_BINDINGS'
#  to get all available JACK clients / ports)
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 JACK_BINDINGS='system:playback_1'
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 JACK_BINDINGS='system:playback_2'
# Note: above is for JACK2 (a.k.a. jackmp). If you are still using JACK1,
# you would need to use this instead:
# SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 JACK_BINDINGS='alsa_pcm:playback_1'
# SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 JACK_BINDINGS='alsa_pcm:playback_2'

# load the ALSA MIDI driver
CREATE MIDI_INPUT_DEVICE ALSA

# connect my MIDI keyboard which has ALSA seq ID '72:0'
# (see 'aconnect -i' for the IDs of your MIDI devices
#  or use 'GET MIDI_INPUT_PORT_PARAMETER INFO 0 0 ALSA_SEQ_BINDINGS')
SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS='72:0'

# setup one sampler channel
ADD CHANNEL
LOAD ENGINE gig 0
SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0
SET CHANNEL MIDI_INPUT_DEVICE 0 0
LOAD INSTRUMENT '/home/me/Gigs/PMI Steinway D.gig' 0 0

# finally show our channel setup (optional of course)
GET CHANNEL INFO 0

# quit connection
QUIT

The next example is a bit more complex. It shows how to setup a more realistic sampler session, handle routing of MIDI input channels, handle routing of audio channels, it uses JACK again as audio output driver, but creates the JACK client with four output channels instead, it creates two sampler channels, loads two different instruments on those two sampler channels and alters the audio channel routing so that the two output channels of sampler channel 1 are routed to the first two JACK output channels and the two output channels of sampler channel 2 are routed the second pair of the JACK client's output channels. That way you could e.g. record the output of those two sampler channels independently or apply independent LADSPA effects on it.

# enable echo mode
SET ECHO 1

# load audio and MIDI driver
CREATE AUDIO_OUTPUT_DEVICE JACK
CREATE MIDI_INPUT_DEVICE ALSA

# increase the amount of output channels of the LS"s Jack client e.g. to 4
SET AUDIO_OUTPUT_DEVICE_PARAMETER 0 CHANNELS=4

# connect to MIDI keyboard
SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS="64:0"

# set up 1st sampler channel (using default output channels, that is 0 and 1)
ADD CHANNEL
LOAD ENGINE gig 0
SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0
SET CHANNEL MIDI_INPUT_DEVICE 0 0
LOAD INSTRUMENT "/somedir/The Bosendorfer Imperial Grand Version 2.2.gig" 0 0
SET CHANNEL VOLUME 0 0.40
# by default every sampler channel / engine listens to ALL MIDI channels
# but for multi channel setup it makes sense to distinguish the inputs, so
# let sampler channel 0 listen to MIDI channel 0 (instead of ALL)
SET CHANNEL MIDI_INPUT_CHANNEL 0 0

# set up 2nd sampler channel (using output channels 2 and 3)
ADD CHANNEL
LOAD ENGINE gig 1
SET CHANNEL AUDIO_OUTPUT_DEVICE 1 0
SET CHANNEL MIDI_INPUT_DEVICE 1 0
LOAD INSTRUMENT "/home/me/Gigs/NemeSys_1GB_Grand.gig" 0 1
SET CHANNEL VOLUME 1 0.40
# let sampler channel 1 listen to MIDI channel 1 (instead of ALL)
SET CHANNEL MIDI_INPUT_CHANNEL 1 1
# this will alter the audio channel routing
# connect the engines output channel 0 to JACK clients output 2
SET CHANNEL AUDIO_OUTPUT_CHANNEL 1 0 2
# connect the engines output channel 1 to JACK clients output 3
SET CHANNEL AUDIO_OUTPUT_CHANNEL 1 1 3

# automatic connection between the four 4 ports of LS's Jack client and the
# ALSA PCM JACK client (assuming your sound card has at least 4 outputs ;-)
# (assumimg JACK2 a.k.a. jackmp here, if you are still using JACK1 then
#  you have to replace "system" by "alsa_pcm" here)
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 JACK_BINDINGS='system:playback_1'
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 JACK_BINDINGS='system:playback_2'
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 2 JACK_BINDINGS='system:playback_3'
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 3 JACK_BINDINGS='system:playback_4'

# not necessary, just to see our setup
GET CHANNEL INFO 0
GET CHANNEL INFO 1

For a detailed description about LSCP read the LSCP reference. Be welcome to ask details on the mailing list.