1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 |
<html> |
3 |
<head> |
4 |
<link rel="stylesheet" type="text/css" href="index.css"> |
5 |
<title>The Linux Sampler Project</title> |
6 |
|
7 |
<meta http-equiv="content-type" |
8 |
content="text/html; charset=ISO-8859-1"> |
9 |
|
10 |
<script language="javascript" type="text/javascript"> |
11 |
<!-- |
12 |
var dir = "gfx/"; |
13 |
|
14 |
if(document.images) { |
15 |
|
16 |
newsover = new Image(); |
17 |
newsover.src = dir + "mnewshover.png"; |
18 |
|
19 |
newsout = new Image(); |
20 |
newsout.src = dir + "mnews.png"; |
21 |
|
22 |
aboutover = new Image(); |
23 |
aboutover.src = dir + "mabouthover.png"; |
24 |
|
25 |
aboutout = new Image(); |
26 |
aboutout.src = dir + "mabout.png"; |
27 |
|
28 |
featuresover = new Image(); |
29 |
featuresover.src = dir + "mfeatureshover.png"; |
30 |
|
31 |
featuresout = new Image(); |
32 |
featuresout.src = dir + "mfeatures.png"; |
33 |
|
34 |
screenshotsover = new Image(); |
35 |
screenshotsover.src = dir + "mscreenshotshover.png"; |
36 |
|
37 |
screenshotsout = new Image(); |
38 |
screenshotsout.src = dir + "mscreenshots.png"; |
39 |
|
40 |
demosover = new Image(); |
41 |
demosover.src = dir + "mdemoshover.png"; |
42 |
|
43 |
demosout = new Image(); |
44 |
demosout.src = dir + "mdemos.png"; |
45 |
|
46 |
downloadsover = new Image(); |
47 |
downloadsover.src = dir + "mdownloadshover.png"; |
48 |
|
49 |
downloadsout = new Image(); |
50 |
downloadsout.src = dir + "mdownloads.png"; |
51 |
|
52 |
developersover = new Image(); |
53 |
developersover.src = dir + "mdevelopershover.png"; |
54 |
|
55 |
developersout = new Image(); |
56 |
developersout.src = dir + "mdevelopers.png"; |
57 |
|
58 |
instrumentsover = new Image(); |
59 |
instrumentsover.src = dir + "minstrumentshover.png"; |
60 |
|
61 |
instrumentsout = new Image(); |
62 |
instrumentsout.src = dir + "minstruments.png"; |
63 |
|
64 |
linksover = new Image(); |
65 |
linksover.src = dir + "mlinkshover.png"; |
66 |
|
67 |
linksout = new Image(); |
68 |
linksout.src = dir + "mlinks.png"; |
69 |
|
70 |
documentationover = new Image(); |
71 |
documentationover.src = dir + "mdocumentationhover.png"; |
72 |
|
73 |
documentationout = new Image(); |
74 |
documentationout.src = dir + "mdocumentation.png"; |
75 |
|
76 |
creditsover = new Image(); |
77 |
creditsover.src = dir + "mcreditshover.png"; |
78 |
|
79 |
creditsout = new Image(); |
80 |
creditsout.src = dir + "mcredits.png"; |
81 |
|
82 |
faqover = new Image(); |
83 |
faqover.src = dir + "mfaqhover.png"; |
84 |
|
85 |
faqout = new Image(); |
86 |
faqout.src = dir + "mfaq.png"; |
87 |
|
88 |
bugsover = new Image(); |
89 |
bugsover.src = dir + "mbugshover.png"; |
90 |
|
91 |
bugsout = new Image(); |
92 |
bugsout.src = dir + "mbugs.png"; |
93 |
} |
94 |
--> |
95 |
</script> |
96 |
|
97 |
</head> |
98 |
|
99 |
<body> |
100 |
|
101 |
<div id="mainwindow"><img name="LinuxSampler" src="gfx/lsbackground.jpg" alt="LinuxSampler"> |
102 |
|
103 |
<h1><span class="hidden">The LinuxSampler Project</span></h1> |
104 |
|
105 |
<table border=0 cellspacing=0 cellpadding=0><tr><th colspan=2 align=left> |
106 |
<img name="h1blank" src="gfx/h1blank.png" alt="blank"><span class="hidden">about</span></th></tr> |
107 |
<tr><td valign=top> |
108 |
<a id="news" href="index.php" onmouseover="javascript:if(document.images)document.news.src = newsover.src" onmouseout="javascript:if(document.images)document.news.src = newsout.src"><img name="news" src="gfx/mnews.png" alt="news"></a> |
109 |
<a id="about" href="about.html" onmouseover="javascript:if(document.images)document.about.src = aboutover.src" onmouseout="javascript:if(document.images)document.about.src = aboutout.src"><img name="about" src="gfx/mabout.png" alt="about"></a> |
110 |
<a id="features" href="features.html" onmouseover="javascript:if(document.images)document.features.src = featuresover.src" onmouseout="javascript:if(document.images)document.features.src = featuresout.src"><img name="features" src="gfx/mfeatures.png" alt="features"></a> |
111 |
<a id="screenshots" href="screenshots.html" onmouseover="javascript:if(document.images)document.screenshots.src = screenshotsover.src" onmouseout="javascript:if(document.images)document.screenshots.src = screenshotsout.src"><img name="screenshots" src="gfx/mscreenshots.png" alt="screenshots"></a> |
112 |
<a id="demos" href="demos.html" onmouseover="javascript:if(document.images)document.demos.src = demosover.src" onmouseout="javascript:if(document.images)document.demos.src = demosout.src"><img name="demos" src="gfx/mdemos.png" alt="demos"></a> |
113 |
<a id="downloads" href="downloads.html" onmouseover="javascript:if(document.images)document.downloads.src = downloadsover.src" onmouseout="javascript:if(document.images)document.downloads.src = downloadsout.src"><img name="downloads" src="gfx/mdownloads.png" alt="download"></a> |
114 |
<a id="developers" href="developers.html" onmouseover="javascript:if(document.images)document.developers.src = developersover.src" onmouseout="javascript:if(document.images)document.developers.src = developersout.src"><img name="developers" src="gfx/mdevelopers.png" alt="developers"></a> |
115 |
<a id="faq" href="faq.html" onmouseover="javascript:if(document.images)document.faq.src = faqover.src" onmouseout="javascript:if(document.images)document.faq.src = faqout.src"><img name="faq" src="gfx/mfaq.png" alt="faq"></a> |
116 |
<a id="documentation" href="documentation.html" onmouseover="javascript:if(document.images)document.documentation.src = documentationover.src" onmouseout="javascript:if(document.images)document.documentation.src = documentationout.src"><img name="documentation" src="gfx/mdocumentation.png" alt="documentation"></a> |
117 |
<a id="bugs" href="http://bugs.linuxsampler.org" onmouseover="javascript:if(document.images)document.bugs.src = bugsover.src" onmouseout="javascript:if(document.images)document.bugs.src = bugsout.src"><img name="bugs" src="gfx/mbugs.png" alt="bugs"></a> |
118 |
<a id="instruments" href="instruments.html" onmouseover="javascript:if(document.images)document.instruments.src = instrumentsover.src" onmouseout="javascript:if(document.images)document.instruments.src = instrumentsout.src"><img name="instruments" src="gfx/minstruments.png" alt="instruments"></a> |
119 |
<a id="links" href="links.html" onmouseover="javascript:if(document.images)document.links.src = linksover.src" onmouseout="javascript:if(document.images)document.links.src = linksout.src"><img name="links" src="gfx/mlinks.png" alt="links"></a> |
120 |
<a id="credits" href="credits.html" onmouseover="javascript:if(document.images)document.credits.src = creditsover.src" onmouseout="javascript:if(document.images)document.credits.src = creditsout.src"><img name="credits" src="gfx/mcredits.png" alt="credits"></a> |
121 |
</td><td valign=top width="100%"> |
122 |
<div id="contents"> |
123 |
|
124 |
<h2>Documentation</h2> |
125 |
<p class="default"> |
126 |
This is still quite under construction. Be welcome to help us with writing some documentation! |
127 |
</p> |
128 |
|
129 |
|
130 |
|
131 |
<h2>LSCP Reference</h2> |
132 |
<p class="default"> |
133 |
The following document defines the network protocol with which LinuxSampler can be controlled. |
134 |
As this is a simple ASCII based protocol it's possible to write a frontend for LinuxSampler in |
135 |
any programming language and GUI library. There's still a big demand especially for a Gtk and |
136 |
ncurses based frontend, so be encouraged and let |
137 |
<a href="http://www.linuxsampler.org/developers.html">us</a> know if you wrote a frontend for |
138 |
LinuxSampler! This is the protocol specification of the latest |
139 |
official release of LinuxSampler (0.3.1): |
140 |
<br> |
141 |
</p> |
142 |
<center> |
143 |
LinuxSampler Control Protocol v1.0 |
144 |
(<a href="http://www.linuxsampler.org/api/lscp-1.0.txt">ASCII</a>, |
145 |
<a href="http://www.linuxsampler.org/api/lscp-1.0.html">HTML</a>, |
146 |
<a href="http://www.linuxsampler.org/api/lscp-1.0.xml">XML</a>) |
147 |
</center> |
148 |
<p class="default"> |
149 |
The following is the very latest draft of the protocol (which |
150 |
usually reflects the latest development state from CVS or may |
151 |
even not be implemented yet): |
152 |
<br> |
153 |
</p> |
154 |
<center> |
155 |
LinuxSampler Control Protocol Draft |
156 |
(<a href="http://www.linuxsampler.org/api/draft-linuxsampler-protocol.txt">ASCII</a>, |
157 |
<a href="http://www.linuxsampler.org/api/draft-linuxsampler-protocol.html">HTML</a>, |
158 |
<a href="http://cvs.linuxsampler.org/cgi-bin/viewcvs.cgi/*checkout*/linuxsampler/Documentation/lscp.xml?rev=HEAD&content-type=text/xml">XML</a>) |
159 |
</center> |
160 |
<p class="default"> |
161 |
The protocol will be extended from time to time. You may look at the |
162 |
<a href="features.html#LSCP">features</a> site to see which control |
163 |
commands are already implemented and which are not. |
164 |
</p> |
165 |
|
166 |
|
167 |
<a name="example_lscp_scripts"> |
168 |
<h3>Example LSCP scripts</h3> |
169 |
<p class="default"> |
170 |
If you don't want / can't use a GUI frontend you will probably write some LSCP scripts for |
171 |
using with linuxsampler to setup your needed sampler session. It follows some common LSCP |
172 |
examples to give you a good starting point for writing your own ones. Adjust it to your needs |
173 |
and send it to the running linuxsampler application with: |
174 |
</p> |
175 |
<table class="default" border="0" cellpadding="1" cellspacing="5"> |
176 |
<tr> |
177 |
<td><pre class="code">1</pre> |
178 |
</td> |
179 |
<td width="100%"> |
180 |
<pre class="code">cat yourscript.lscp | netcat -t localhost 8888</pre> |
181 |
</td> |
182 |
</tr> |
183 |
</table> |
184 |
<p class="default"> |
185 |
Here is a simple LSCP example which uses ALSA as MIDI input and as audio output driver as well, |
186 |
it creates only one sampler channel using the Gigasampler engine and loads a Piano instrument |
187 |
on that sampler channel: |
188 |
</p> |
189 |
<table class="default" border="0" cellpadding="1" cellspacing="5"> |
190 |
<tr> |
191 |
<td><pre class="code">1 |
192 |
2 |
193 |
3 |
194 |
4 |
195 |
5 |
196 |
6 |
197 |
7 |
198 |
8 |
199 |
9 |
200 |
10 |
201 |
11 |
202 |
12 |
203 |
13 |
204 |
14 |
205 |
15 |
206 |
16 |
207 |
17 |
208 |
18 |
209 |
19 |
210 |
20 |
211 |
21 |
212 |
22 |
213 |
23 |
214 |
24 |
215 |
25 |
216 |
26 |
217 |
27 |
218 |
28 |
219 |
29</pre> |
220 |
</td> |
221 |
<td width="100%"> |
222 |
<pre class="code">#enable echo mode |
223 |
SET ECHO 1 |
224 |
|
225 |
# load the ALSA audio driver |
226 |
# (parameter CARD is optional, I use it here to select my 2nd sound card |
227 |
# you can use 'GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA CARD' to get |
228 |
# all available sound cards) |
229 |
CREATE AUDIO_OUTPUT_DEVICE ALSA CARD='1,0' |
230 |
|
231 |
# load the ALSA MIDI driver |
232 |
CREATE MIDI_INPUT_DEVICE ALSA |
233 |
|
234 |
# connect my MIDI keyboard which has ALSA seq ID '72:0' |
235 |
# (see 'aconnect -i' for the IDs of your MIDI devices |
236 |
# or use 'GET MIDI_INPUT_PORT_PARAMETER INFO 0 0 ALSA_SEQ_BINDINGS') |
237 |
SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS='72:0' |
238 |
|
239 |
# setup a sampler channel |
240 |
ADD CHANNEL |
241 |
LOAD ENGINE gig 0 |
242 |
SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0 |
243 |
SET CHANNEL MIDI_INPUT_DEVICE 0 0 |
244 |
LOAD INSTRUMENT '/home/me/Gigs/PMI Steinway D.gig' 0 0 |
245 |
|
246 |
# finally show our channel setup (optional of course) |
247 |
GET CHANNEL INFO 0 |
248 |
|
249 |
# quit connection |
250 |
QUIT</pre> |
251 |
</td> |
252 |
</tr> |
253 |
</table> |
254 |
<p class="default"> |
255 |
The next example uses JACK as audio output driver instead and automatically connects the two |
256 |
output channels of LS's JACK client to the first two ALSA PCM channels, so you can hear |
257 |
something without having to manually connect it e.g. with qjackctl: |
258 |
</p> |
259 |
<table class="default" border="0" cellpadding="1" cellspacing="5"> |
260 |
<tr> |
261 |
<td><pre class="code">1 |
262 |
2 |
263 |
3 |
264 |
4 |
265 |
5 |
266 |
6 |
267 |
7 |
268 |
8 |
269 |
9 |
270 |
10 |
271 |
11 |
272 |
12 |
273 |
13 |
274 |
14 |
275 |
15 |
276 |
16 |
277 |
17 |
278 |
18 |
279 |
19 |
280 |
20 |
281 |
21 |
282 |
22 |
283 |
23 |
284 |
24 |
285 |
25 |
286 |
26 |
287 |
27 |
288 |
28 |
289 |
29 |
290 |
30 |
291 |
31 |
292 |
32</pre> |
293 |
</td> |
294 |
<td width="100%"> |
295 |
<pre class="code">#enable echo mode |
296 |
SET ECHO 1 |
297 |
|
298 |
# load the JACK audio driver |
299 |
CREATE AUDIO_OUTPUT_DEVICE JACK |
300 |
|
301 |
# connect to ALSA playback JACK client so we can hear something |
302 |
# (you can use 'GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO 0 0 JACK_BINDINGS' |
303 |
# to get all available JACK clients / ports) |
304 |
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 JACK_BINDINGS='alsa_pcm:playback_1' |
305 |
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 JACK_BINDINGS='alsa_pcm:playback_2' |
306 |
|
307 |
# load the ALSA MIDI driver |
308 |
CREATE MIDI_INPUT_DEVICE ALSA |
309 |
|
310 |
# connect my MIDI keyboard which has ALSA seq ID '72:0' |
311 |
# (see 'aconnect -i' for the IDs of your MIDI devices |
312 |
# or use 'GET MIDI_INPUT_PORT_PARAMETER INFO 0 0 ALSA_SEQ_BINDINGS') |
313 |
SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS='72:0' |
314 |
|
315 |
# setup one sampler channel |
316 |
ADD CHANNEL |
317 |
LOAD ENGINE gig 0 |
318 |
SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0 |
319 |
SET CHANNEL MIDI_INPUT_DEVICE 0 0 |
320 |
LOAD INSTRUMENT '/home/me/Gigs/PMI Steinway D.gig' 0 0 |
321 |
|
322 |
# finally show our channel setup (optional of course) |
323 |
GET CHANNEL INFO 0 |
324 |
|
325 |
# quit connection |
326 |
QUIT</pre> |
327 |
</td> |
328 |
</tr> |
329 |
</table> |
330 |
<p class="default"> |
331 |
The next example is a bit more complex. |
332 |
It shows how to setup a more realistic sampler session, handle routing of MIDI input channels, |
333 |
handle routing of audio channels, it uses JACK again as audio |
334 |
output driver, but creates the JACK client with four output channels instead, it creates two |
335 |
sampler channels, loads two different instrument on those two sampler channels and alters |
336 |
the audio channel routing so that the two output channels of sampler channel 1 are routed to |
337 |
the first two JACK output channels and the two output channels of sampler channel 2 are routed |
338 |
the second pair of the JACK client's output channels. That way you could e.g. record the output |
339 |
of those two sampler channels independently or apply independent LADSPA effects on it. |
340 |
</p> |
341 |
<table class="default" border="0" cellpadding="1" cellspacing="5"> |
342 |
<tr> |
343 |
<td><pre class="code">1 |
344 |
2 |
345 |
3 |
346 |
4 |
347 |
5 |
348 |
6 |
349 |
7 |
350 |
8 |
351 |
9 |
352 |
10 |
353 |
11 |
354 |
12 |
355 |
13 |
356 |
14 |
357 |
15 |
358 |
16 |
359 |
17 |
360 |
18 |
361 |
19 |
362 |
20 |
363 |
21 |
364 |
22 |
365 |
23 |
366 |
24 |
367 |
25 |
368 |
26 |
369 |
27 |
370 |
28 |
371 |
29 |
372 |
30 |
373 |
31 |
374 |
32 |
375 |
33 |
376 |
34 |
377 |
35 |
378 |
36 |
379 |
37 |
380 |
38 |
381 |
39 |
382 |
40 |
383 |
41 |
384 |
42 |
385 |
43 |
386 |
44 |
387 |
45 |
388 |
46 |
389 |
47 |
390 |
48 |
391 |
49 |
392 |
50</pre> |
393 |
</td> |
394 |
<td width="100%"> |
395 |
<pre class="code"># enable echo mode |
396 |
SET ECHO 1 |
397 |
|
398 |
# load audio and MIDI driver |
399 |
CREATE AUDIO_OUTPUT_DEVICE JACK |
400 |
CREATE MIDI_INPUT_DEVICE ALSA |
401 |
|
402 |
# increase the amount of output channels of the LS"s Jack client e.g. to 4 |
403 |
SET AUDIO_OUTPUT_DEVICE_PARAMETER 0 CHANNELS=4 |
404 |
|
405 |
# connect to MIDI keyboard |
406 |
SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS="64:0" |
407 |
|
408 |
# set up 1st sampler channel (using default output channels, that is 0 and 1) |
409 |
ADD CHANNEL |
410 |
LOAD ENGINE gig 0 |
411 |
SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0 |
412 |
SET CHANNEL MIDI_INPUT_DEVICE 0 0 |
413 |
LOAD INSTRUMENT "/somedir/The Bosendorfer Imperial Grand Version 2.2.gig" 0 0 |
414 |
SET CHANNEL VOLUME 0 0.40 |
415 |
# by default every sampler channel / engine listens to ALL MIDI channels |
416 |
# but for multi channel setup it makes sense to distinguish the inputs, so |
417 |
# let sampler channel 0 listen to MIDI channel 0 (instead of ALL) |
418 |
SET CHANNEL MIDI_INPUT_CHANNEL 0 0 |
419 |
|
420 |
# set up 2nd sampler channel (using output channels 2 and 3) |
421 |
ADD CHANNEL |
422 |
LOAD ENGINE gig 1 |
423 |
SET CHANNEL AUDIO_OUTPUT_DEVICE 1 0 |
424 |
SET CHANNEL MIDI_INPUT_DEVICE 1 0 |
425 |
LOAD INSTRUMENT "/home/me/Gigs/NemeSys_1GB_Grand.gig" 0 1 |
426 |
SET CHANNEL VOLUME 1 0.40 |
427 |
# let sampler channel 1 listen to MIDI channel 1 (instead of ALL) |
428 |
SET CHANNEL MIDI_INPUT_CHANNEL 1 1 |
429 |
# this will alter the audio channel routing |
430 |
# connect the engines output channel 0 to JACK clients output 2 |
431 |
SET CHANNEL AUDIO_OUTPUT_CHANNEL 1 0 2 |
432 |
# connect the engines output channel 1 to JACK clients output 3 |
433 |
SET CHANNEL AUDIO_OUTPUT_CHANNEL 1 1 3 |
434 |
|
435 |
# automatic connection between the four 4 ports of LS's Jack client and the |
436 |
# ALSA PCM JACK client (assuming your sound card has at least 4 outputs ;-) |
437 |
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 JACK_BINDINGS='alsa_pcm:playback_1' |
438 |
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 JACK_BINDINGS='alsa_pcm:playback_2' |
439 |
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 2 JACK_BINDINGS='alsa_pcm:playback_3' |
440 |
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 3 JACK_BINDINGS='alsa_pcm:playback_4' |
441 |
|
442 |
# not necessary, just to see our setup |
443 |
GET CHANNEL INFO 0 |
444 |
GET CHANNEL INFO 1</pre> |
445 |
</td> |
446 |
</tr> |
447 |
</table> |
448 |
<p class="default"> |
449 |
For a detailed description about LSCP read the <a href="api/draft-linuxsampler-protocol.html">LSCP reference</a>. |
450 |
Be welcome to ask details on the mailing list. |
451 |
</p> |
452 |
|
453 |
|
454 |
</div> |
455 |
</td></tr></table> |
456 |
|
457 |
</div> |
458 |
|
459 |
</body> |
460 |
</html> |