/[svn]/web/trunk/www.linuxsampler.org/documentation.html
ViewVC logotype

Contents of /web/trunk/www.linuxsampler.org/documentation.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 542 - (show annotations) (download) (as text)
Sun May 15 15:31:45 2005 UTC (18 years, 10 months ago) by senoner
File MIME type: text/html
File size: 14687 byte(s)
Initial Revision

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 latest draft of the protocol:
139 <br>
140 </p>
141 <center>
142 LinuxSampler Control Protocol Draft (<a href="http://www.linuxsampler.org/api/draft-linuxsampler-protocol.txt">ASCII</a>,
143 <a href="http://www.linuxsampler.org/api/draft-linuxsampler-protocol.html">HTML</a>)
144 </center>
145 <p class="default">
146 The protocol will be extended from time to time. Have a look at the
147 <a href="features.html#LSCP">features</a> site to see which control commands are already implemented and which are not.
148 </p>
149
150
151 <a name="example_lscp_scripts">
152 <h3>Example LSCP scripts</h3>
153 <p class="default">
154 If you don't want / can't use a GUI frontend you will probably write some LSCP scripts for
155 using with linuxsampler to setup your needed sampler session. It follows some common LSCP
156 examples to give you a good starting point for writing your own ones. Adjust it to your needs
157 and send it to the running linuxsampler application with:
158 </p>
159 <table class="default" border="0" cellpadding="1" cellspacing="5">
160 <tr>
161 <td><pre class="code">1</pre>
162 </td>
163 <td width="100%">
164 <pre class="code">cat yourscript.lscp | netcat -t localhost 8888</pre>
165 </td>
166 </tr>
167 </table>
168 <p class="default">
169 Here is a simple LSCP example which uses ALSA as MIDI input and as audio output driver as well,
170 it creates only one sampler channel using the Gigasampler engine and loads a Piano instrument
171 on that sampler channel:
172 </p>
173 <table class="default" border="0" cellpadding="1" cellspacing="5">
174 <tr>
175 <td><pre class="code">1
176 2
177 3
178 4
179 5
180 6
181 7
182 8
183 9
184 10
185 11
186 12
187 13
188 14
189 15
190 16
191 17
192 18
193 19
194 20
195 21
196 22
197 23
198 24
199 25
200 26
201 27
202 28
203 29</pre>
204 </td>
205 <td width="100%">
206 <pre class="code">#enable echo mode
207 SET ECHO 1
208
209 # load the ALSA audio driver
210 # (parameter CARD is optional, I use it here to select my 2nd sound card
211 # you can use 'GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA CARD' to get
212 # all available sound cards)
213 CREATE AUDIO_OUTPUT_DEVICE ALSA CARD='1,0'
214
215 # load the ALSA MIDI driver
216 CREATE MIDI_INPUT_DEVICE ALSA
217
218 # connect my MIDI keyboard which has ALSA seq ID '72:0'
219 # (see 'aconnect -i' for the IDs of your MIDI devices
220 # or use 'GET MIDI_INPUT_PORT_PARAMETER INFO 0 0 ALSA_SEQ_BINDINGS')
221 SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS='72:0'
222
223 # setup a sampler channel
224 ADD CHANNEL
225 LOAD ENGINE gig 0
226 SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0
227 SET CHANNEL MIDI_INPUT_DEVICE 0 0
228 LOAD INSTRUMENT '/home/me/Gigs/PMI Steinway D.gig' 0 0
229
230 # finally show our channel setup (optional of course)
231 GET CHANNEL INFO 0
232
233 # quit connection
234 QUIT</pre>
235 </td>
236 </tr>
237 </table>
238 <p class="default">
239 The next example uses JACK as audio output driver instead and automatically connects the two
240 output channels of LS's JACK client to the first two ALSA PCM channels, so you can hear
241 something without having to manually connect it e.g. with qjackctl:
242 </p>
243 <table class="default" border="0" cellpadding="1" cellspacing="5">
244 <tr>
245 <td><pre class="code">1
246 2
247 3
248 4
249 5
250 6
251 7
252 8
253 9
254 10
255 11
256 12
257 13
258 14
259 15
260 16
261 17
262 18
263 19
264 20
265 21
266 22
267 23
268 24
269 25
270 26
271 27
272 28
273 29
274 30
275 31
276 32</pre>
277 </td>
278 <td width="100%">
279 <pre class="code">#enable echo mode
280 SET ECHO 1
281
282 # load the JACK audio driver
283 CREATE AUDIO_OUTPUT_DEVICE JACK
284
285 # connect to ALSA playback JACK client so we can hear something
286 # (you can use 'GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO 0 0 JACK_BINDINGS'
287 # to get all available JACK clients / ports)
288 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 JACK_BINDINGS='alsa_pcm:playback_1'
289 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 JACK_BINDINGS='alsa_pcm:playback_2'
290
291 # load the ALSA MIDI driver
292 CREATE MIDI_INPUT_DEVICE ALSA
293
294 # connect my MIDI keyboard which has ALSA seq ID '72:0'
295 # (see 'aconnect -i' for the IDs of your MIDI devices
296 # or use 'GET MIDI_INPUT_PORT_PARAMETER INFO 0 0 ALSA_SEQ_BINDINGS')
297 SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS='72:0'
298
299 # setup one sampler channel
300 ADD CHANNEL
301 LOAD ENGINE gig 0
302 SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0
303 SET CHANNEL MIDI_INPUT_DEVICE 0 0
304 LOAD INSTRUMENT '/home/me/Gigs/PMI Steinway D.gig' 0 0
305
306 # finally show our channel setup (optional of course)
307 GET CHANNEL INFO 0
308
309 # quit connection
310 QUIT</pre>
311 </td>
312 </tr>
313 </table>
314 <p class="default">
315 The next example is a bit more complex.
316 It shows how to setup a more realistic sampler session, handle routing of MIDI input channels,
317 handle routing of audio channels, it uses JACK again as audio
318 output driver, but creates the JACK client with four output channels instead, it creates two
319 sampler channels, loads two different instrument on those two sampler channels and alters
320 the audio channel routing so that the two output channels of sampler channel 1 are routed to
321 the first two JACK output channels and the two output channels of sampler channel 2 are routed
322 the second pair of the JACK client's output channels. That way you could e.g. record the output
323 of those two sampler channels independently or apply independent LADSPA effects on it.
324 </p>
325 <table class="default" border="0" cellpadding="1" cellspacing="5">
326 <tr>
327 <td><pre class="code">1
328 2
329 3
330 4
331 5
332 6
333 7
334 8
335 9
336 10
337 11
338 12
339 13
340 14
341 15
342 16
343 17
344 18
345 19
346 20
347 21
348 22
349 23
350 24
351 25
352 26
353 27
354 28
355 29
356 30
357 31
358 32
359 33
360 34
361 35
362 36
363 37
364 38
365 39
366 40
367 41
368 42
369 43
370 44
371 45
372 46
373 47
374 48
375 49
376 50</pre>
377 </td>
378 <td width="100%">
379 <pre class="code"># enable echo mode
380 SET ECHO 1
381
382 # load audio and MIDI driver
383 CREATE AUDIO_OUTPUT_DEVICE JACK
384 CREATE MIDI_INPUT_DEVICE ALSA
385
386 # increase the amount of output channels of the LS"s Jack client e.g. to 4
387 SET AUDIO_OUTPUT_DEVICE_PARAMETER 0 CHANNELS=4
388
389 # connect to MIDI keyboard
390 SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS="64:0"
391
392 # set up 1st sampler channel (using default output channels, that is 0 and 1)
393 ADD CHANNEL
394 LOAD ENGINE gig 0
395 SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0
396 SET CHANNEL MIDI_INPUT_DEVICE 0 0
397 LOAD INSTRUMENT "/somedir/The Bosendorfer Imperial Grand Version 2.2.gig" 0 0
398 SET CHANNEL VOLUME 0 0.40
399 # by default every sampler channel / engine listens to ALL MIDI channels
400 # but for multi channel setup it makes sense to distinguish the inputs, so
401 # let sampler channel 0 listen to MIDI channel 0 (instead of ALL)
402 SET CHANNEL MIDI_INPUT_CHANNEL 0 0
403
404 # set up 2nd sampler channel (using output channels 2 and 3)
405 ADD CHANNEL
406 LOAD ENGINE gig 1
407 SET CHANNEL AUDIO_OUTPUT_DEVICE 1 0
408 SET CHANNEL MIDI_INPUT_DEVICE 1 0
409 LOAD INSTRUMENT "/home/me/Gigs/NemeSys_1GB_Grand.gig" 0 1
410 SET CHANNEL VOLUME 1 0.40
411 # let sampler channel 1 listen to MIDI channel 1 (instead of ALL)
412 SET CHANNEL MIDI_INPUT_CHANNEL 1 1
413 # this will alter the audio channel routing
414 # connect the engines output channel 0 to JACK clients output 2
415 SET CHANNEL AUDIO_OUTPUT_CHANNEL 1 0 2
416 # connect the engines output channel 1 to JACK clients output 3
417 SET CHANNEL AUDIO_OUTPUT_CHANNEL 1 1 3
418
419 # automatic connection between the four 4 ports of LS's Jack client and the
420 # ALSA PCM JACK client (assuming your sound card has at least 4 outputs ;-)
421 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 JACK_BINDINGS='alsa_pcm:playback_1'
422 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 JACK_BINDINGS='alsa_pcm:playback_2'
423 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 2 JACK_BINDINGS='alsa_pcm:playback_3'
424 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 3 JACK_BINDINGS='alsa_pcm:playback_4'
425
426 # not necessary, just to see our setup
427 GET CHANNEL INFO 0
428 GET CHANNEL INFO 1</pre>
429 </td>
430 </tr>
431 </table>
432 <p class="default">
433 For a detailed description about LSCP read the <a href="api/draft-linuxsampler-protocol.html">LSCP reference</a>.
434 Be welcome to ask details on the mailing list.
435 </p>
436
437
438 </div>
439 </td></tr></table>
440
441 </div>
442
443 </body>
444 </html>

  ViewVC Help
Powered by ViewVC