Live EditingOnly trust what you hear...
So far we've been using gigedit as stand-alone
application. The main drawback of this approach is that you cannot
immediately hear the effect of your modifications unless you explicitly
(re)load the respective instrument into a sampler, which is unconvenient
and wastes a lot of time (especially with big instruments). Fortunately
gigedit and LinuxSampler are friends and
politely share the same instrument(s) at the same time if you tell them to
do so.
To do this, you first have to load the respective instrument(s) into
LinuxSampler, i.e. by using a frontend
application like JSampler or
QSampler. In this example we describe it
by using QSampler, but you'll see it's
pretty much the same thing with JSampler.
Select the channel strip of the instrument you want to edit and click
on the "Edit" button on the same channel strip:
Alternatively you can also select this function from the menu (
"Edit""Edit Channel..." ). In any case
gigedit should popup on the screen in less
than 5 seconds. This time you can see gigedit
like being "attached" to LinuxSampler.
If nothing appears on the screen or in case you get an error when clicking
on the "Edit" button, refer to .
All modifications you do on the selected instrument with
gigedit will immediately be audible when you
play notes.
When you close gigedit you'll notice that it
won't ask you to save the instrument, which it would usually do when you
run gigedit as stand-alone application. This is
because the modifications are not lost when you close it, at least not
unless you kill the sampler as well. So when you click again on "Edit"
you'll see that all the modifications you made are still there. Also note
when selecting "New" or "Open" from the menu to create a completely new
instrument or open another one from a file,
gigedit will be "detached" from the sampler,
that is the other instrument will not be audible with the sampler. This is
currently (2007-10-07) a minor limitation of the sampler and
gigedit. So if you want to create a completely
new instrument from scratch you first have to create that instrument with
gigedit, save it to a file and then load it into
the sampler. After that you can continue like described in this chapter and
edit the new instrument "live" by clicking on the respective "Edit" button
in QSampler.
Trouble with live-editingLinuxSampler and
gigedit need to be compiled properly to be able
to use the described "live editing" feature between those two applications.
So here is a short technical explanation how the interaction between those
two applications work: LinuxSampler per se
doesn't actually know anything that an application like
gigedit exists in this world. However the
sampler provides a plugin system to extend it for this functionality. When
you compile the sampler you define a directory where the sampler shall look
for plugin DLLs to load on startup. So first check if that directory
actually exists or if the sampler was not compiled with the correct /
desired plugin directory. When you start the sampler from the console
simply by typing the command linuxsampler and you see
something like this:
bob@mybox ~ $linuxsampler
LinuxSampler 0.4.0.7cvs
Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck
Copyright (C) 2005-2007 Christian Schoenebeck
Detected features: MMX SSE
Creating Sampler...OK
Registered sampler engines: 'GIG'
Registered MIDI input drivers: ALSA
Registered audio output drivers: ALSA,ARTS,JACK
Loading instrument editor plugins...Could not open instrument editor plugins directory (/usr/local/lib/linuxsampler/plugins): No such file or directory
Registered instrument editors:
Starting LSCP network server (0.0.0.0:8888)...OK
LinuxSampler initialization completed. :-)
Then there's definitely something wrong. :) So either create the mentioned
directory (in this case "/usr/local/lib/linuxsampler/plugins") manually or
recompile LinuxSampler in case you want it to use
another directory as plugins directory. Assuming you want it to use the directory "/usr/lib/linuxsampler/plugins" instead you could compile the sampler i.e. this way:
bob@mybox ~/cvs/linuxsampler $./configure --enable-plugin-dir=/usr/lib/linuxsampler/plugins && make
probably in conjunction with some other configure script parameters and some
nice CXXFLAGS to optimize the sampler for your machine, but this is out of
the scope of this document. After the compilation completed, you would
install the sampler as user root as usual:
bob@mybox ~/cvs/linuxsampler $su
Password:
mybox linuxsampler #make install
Again make sure that your chosen plugin directory exists, if not create it
and when running LinuxSampler now again, the
error message on the console ("Could not open instrument editor plugins
directory") should be gone.
Now you must recompile gigedit, because it has
to compile the appropriate plugin and has to place that plugin DLL into the
samplers plugins directory. It should look like this:
bob@mybox ~/cvs/gigedit $./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
...
checking for gmsgfmt... /usr/bin/gmsgfmt
checking for xgettext... /usr/bin/xgettext
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GTKMM... yes
checking for GIG... yes
checking for SNDFILE... yes
checking for SF_INSTRUMENT.loops... yes
checking for LINUXSAMPLER... yes
Found linuxsampler 0.4.0.5cvs
Retrieving LinuxSampler's plugin dir... /usr/lib/linuxsampler/plugins
Relative plugin dir: ${libdir}/linuxsampler/plugins
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/gigedit/Makefile
config.status: creating src/plugin/Makefile
config.status: creating po/Makefile.in
config.status: creating debian/Makefile
config.status: creating doc/Makefile
config.status: creating doc/quickstart/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing intltool commands
config.status: executing default-1 commands
config.status: executing po/stamp-it commands
bob@mybox ~/cvs/gigedit $make
Make sure the higlighted section of the configure script output looks
similar like above. After compilation completed, you once again install
with the common procedure:
bob@mybox ~/cvs/gigedit $su
Password:
mybox gigedit #make install
This will install the gigedit binary, as well
as its plugin .so file into the directory "/usr/lib/linuxsampler/plugins"
(or whatever you chose). And when you start the sampler now from the
console, it should look like this:
bob@mybox ~ $linuxsampler
LinuxSampler 0.4.0.7cvs
Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck
Copyright (C) 2005-2007 Christian Schoenebeck
Detected features: MMX SSE
Creating Sampler...OK
Registered sampler engines: 'GIG'
Registered MIDI input drivers: ALSA
Registered audio output drivers: ALSA,ARTS,JACK
Loading instrument editor plugins...OK
Registered instrument editors: 'gigedit'
Starting LSCP network server (0.0.0.0:8888)...OK
LinuxSampler initialization completed. :-)
Now you're done with setup and the steps described in
should work for you. If not, you probably found a
bug. Feel free to contact us via our mailing list or open a bug report on
our website.
If you just used precompiled binary packages of
LinuxSampler and
gigedit, i.e. from the Linux distribution of
your choice, you shouldn't have to recompile them by yourself. Either the
versions of LinuxSampler and / or
gigedit are too old or they were simply not
compiled / packaged correctly. In both cases, please report it to the
respective package maintainer of your distribution!