LinuxSampler for Windows  - howto by Benno Senoner 


December,  7 2007

the LinuxSampler development team is happy to announce that
LinuxSampler, the most advanced free, open source sampler now runs on MS Windows too (requires at least Windows 2000).
(see below for the download link)
More information and documentation will be added here soon, so check back frequently.

for the latest LinuxSampler Windowsversion always check LinuxSampler Download Page

If you have questions or want to help subscribe to the LinuxSampler mailing list

or since I did most of of the porting, you can write me directly (to Benno) about  Windows related questions.
you can find my email address here: LinuxSampler developers

To report bugs please use our bug tracking system http://bugs.linuxsampler.org/


For now it supports Windows Multimedia System (MME) at MIDI in and ASIO output out.

This means that currently it runs only as a standalone application.
A VST interface will follow soon, along with a network module to run multiple sampler slaves on
Windows or Linux machines (Linux provides better performance) all controlled from a Windows box running
the VST sequencer.
LinuxSampler is implemented as a client/server application. This means the sampling engine (the server) runs
independently from the GUI (the client). Sampling engine and client can be run on the same box or
on different machines too, connected over the network.

The MS Windows version provides all the features of the Linux version since it is built from the
same source code base. This means when new features will come out the Windows version will always provide
the same feature set as the Linux version. This was made possible by the very modular design of both
low level, operating system functions and flexible audio/MIDI driver system.

The Windows version comes as a self extracting .exe file which will install all the necessary modules
to run both the server ( linuxsampler.exe ) and the GUI client.
In installs 2 GUI clients. One is QSampler, based on the cross-platform Qt4 GUI toolkit, and a java
GUI client called JSampler Fantasia. At the moment the latter more advanced than qsampler as it
implements all the functionality present in the LinuxSampler engine.
Due to the Java virtual machine it uses a bit more memory than the qsampler GUI (around 30MB or so)
but on a 1GB+ RAM box the difference should be negligible.

Quickstart:
start
LinuxSampler -> LinuxSampler
then
LinuxSampler -> Fantasa


1) setting up MIDI input:
once the GUI opens, click on the left round button in the MIDI devices tab.
At this point a window will open where you can create a new MIDI device.
Press Create. The window will close and the MIDI device will be created.
(MIDI Device 0 MME).
Now click on the right arrow which points downwards.
You can see that a MIDI device with a single Port (Port 0) was created.
Under Windows MME LinuxSampler always creates MIDI devices which are connected to a single
MME port.
To select the MIDI input port you must click on the field located on the left of PORT.
A combobox pops-up where you can select the Windows MIDI port.

You can create an arbitrary number of MIDI input devices by repeating the procedure above.
Each MIDI input device is connected to a single Windows MME MIDI port.
This means LinuxSampler has no limitation in terms of number of MIDI ports.
Each MIDI device can be routed to arbitrary sampler channels.


2) setting up AUDIO output:

LinuxSampler currently uses the ASIO driver model for audio output.
ASIO drivers ensure reliable low-latency operation and are virtually available
for any soundcard.
(For consumer audio cards which do not come with their own ASIO drivers you need
to install ASIO4ALL:  http://www.asio4all.com/
We recommend to use version 2.7 , perhaps on Vista 2.8beta1 works better but
we did not perform tests on Vista so we cannot tell it. Let us know about your findings
so we can share them here)

Click on the left round button in the Audio Devices tab.
At this point a window will open where you can create a new MIDI device.
When creating the Audio device you can set several parameters.
- CARD : the name of the soundcard, in case you have multiple cards installed.
it will show the default value (first card found)
- CHANNELS: number of audio output channels, can range from 1 to maximum number
of channels your soundcard supports. We recommend to leave the default value which
is maximum number of channels.
- FRAGMENTSIZE: ASIO buffer size in samples. The card's default value is shown.
If you experience clicks and pops during audio playback then initialize the
audio output device with bigger values.
(better if it's always a power of 2:  eg. 256, 512, 1024)

SAMPLERATE: sets the samplerate. The default value is shown.

Now Press Create. The window will close and the Audio device will be created.
AUDIO DEVICE 0 (ASIO)

3) Loading samples:


In the middle of the screen below the volume slider you see the sampler channel strip pane.
press on the round button located on the left.
This will create a new sampler channel.
- click on Load Instrument
this opens a dialog which allows you to select an instrument to be loaded in the sampler channel.
(For information on how to use orchestras click here)
On the row  "Select instrument from file" click on the orange icon located on the right side.
This opens a file dialog which allows you to select a sample to be loaded
(currently only the GIG format is supported).
select the sample to be loaded and then click on Open.
At this point the fields Instrument file shows the filename.
You can click on the Instrument index and select the specific instrument contained in the
instrument file.
Now press OK
While it loads you see: Loading .. 90% .. 100%
Once loaded you see the Instrument's name: ie  FreePiano

On the left side of the sampler channel click on the arrow below Options.
This pane permits to set MIDI input device, port and channel and oudio output channel.
Notice that under Windows MME the Port value is always 0.
So the only values you can change MIDI device (normally 0 if you created only a single
MIDI input device) and the MIDI channel (from 1 to 16).

Saving a sampler session:
click on the 3rd icon from the left on the row where you see the round icon with the S logo.

Now select the directory where you want to save the file to ( extension .lscp = Linux Sampler Control Protocol).
enter the name and press save. (add .lscp at end of file otherwise you will not see it when loading it)

Next time you can load a sampler session by clicking on the second icon from the left
then select a .lscp file in the file dialog and press Open.
This will automatically set up the MIDI devices and audio devices, create the sampler channels
and load all the samples that were loaded.

Bugs and Problems:
since the Windows port is very young there could be several bugs which we hope to root out soon.
so be sure to report them using our bug tracking system http://bugs.linuxsampler.org/

some bugs and problems I discovered:
- when adding a channel there noises could occur while playing on other channels
- if you overload the sampler (CPU overload or disk overload) it produces noises
- then editing an instrument using gigedit