/[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 2791 - (show annotations) (download) (as text)
Wed Jul 15 21:41:19 2015 UTC (8 years, 9 months ago) by schoenebeck
File MIME type: text/html
File size: 27050 byte(s)
* Updated LSCP spec document (v1.7 for LinuxSampler release 2.0.0).

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 donationsover = new Image();
53 donationsover.src = dir + "mdonationshover.png";
54
55 donationsout = new Image();
56 donationsout.src = dir + "mdonations.png";
57
58 supportover = new Image();
59 supportover.src = dir + "msupporthover.png";
60 supportout = new Image();
61 supportout.src = dir + "msupport.png";
62
63 developersover = new Image();
64 developersover.src = dir + "mdevelopershover.png";
65
66 developersout = new Image();
67 developersout.src = dir + "mdevelopers.png";
68
69 instrumentsover = new Image();
70 instrumentsover.src = dir + "minstrumentshover.png";
71
72 instrumentsout = new Image();
73 instrumentsout.src = dir + "minstruments.png";
74
75 linksover = new Image();
76 linksover.src = dir + "mlinkshover.png";
77
78 linksout = new Image();
79 linksout.src = dir + "mlinks.png";
80
81 documentationover = new Image();
82 documentationover.src = dir + "mdocumentationhover.png";
83
84 documentationout = new Image();
85 documentationout.src = dir + "mdocumentation.png";
86
87 creditsover = new Image();
88 creditsover.src = dir + "mcreditshover.png";
89
90 creditsout = new Image();
91 creditsout.src = dir + "mcredits.png";
92
93 faqover = new Image();
94 faqover.src = dir + "mfaqhover.png";
95
96 faqout = new Image();
97 faqout.src = dir + "mfaq.png";
98
99 bugsover = new Image();
100 bugsover.src = dir + "mbugshover.png";
101
102 bugsout = new Image();
103 bugsout.src = dir + "mbugs.png";
104 }
105 -->
106 </script>
107
108 </head>
109
110 <body>
111
112 <div id="mainwindow"><div class="lsbackground"><img name="LinuxSampler" src="gfx/lsbackground.jpg" alt="LinuxSampler"></div>
113
114 <h1><span class="hidden">The LinuxSampler Project</span></h1>
115
116 <table border=0 cellspacing=0 cellpadding=0><tr><th colspan=2 align=left>
117 <img name="h1blank" src="gfx/h1blank.png" alt="blank"><span class="hidden">about</span></th></tr>
118 <tr><td valign=top>
119 <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>
120 <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>
121 <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>
122 <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>
123 <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>
124 <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>
125 <a id="donations" href="donations.html" onmouseover="javascript:if(document.images)document.donations.src = donationsover.src" onmouseout="javascript:if(document.images)document.donations.src = donationsout.src"><img name="donations" src="gfx/mdonations.png" alt="donations"></a>
126 <a id="support" href="support.html" onmouseover="javascript:if(document.images)document.support.src = supportover.src" onmouseout="javascript:if(document.images)document.support.src = supportout.src"><img name="support" src="gfx/msupport.png" alt="support"></a>
127 <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>
128 <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>
129 <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>
130 <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>
131 <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>
132 <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>
133 <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>
134
135 <div class="boxed">
136 <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
137 <input type="hidden" name="cmd" value="_s-xclick">
138 <input type="hidden" name="hosted_button_id" value="6746056">
139 <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
140 <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
141 </form>
142 <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
143 <input type="hidden" name="cmd" value="_s-xclick">
144 <input type="hidden" name="hosted_button_id" value="6746149">
145 <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
146 <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
147 </form>
148 <table><tr>
149 <td><a href="http://en.wikipedia.org/wiki/Bitcoin"><img src="gfx/logos/bitcoin32.png" alt="Bitcoins"></a></td>
150 <td>Or donate Bitcoins at:</td>
151 </tr></table>
152 <pre class="btcaddr">1Q9CK7xUhMNWryqYTZLbUTXbrjpYYtwvng</pre>
153 <hr>
154 <a href="donations.html">Why donate?</a>
155 </div>
156 <p>
157 <div class="">
158 <center>
159 <script type="text/javascript"><!--
160 google_ad_client = "pub-3408196773880325";
161 /* 120x600, created 8/3/09 */
162 google_ad_slot = "2910827959";
163 google_ad_width = 120;
164 google_ad_height = 600;
165 //-->
166 </script>
167 <script type="text/javascript"
168 src="//pagead2.googlesyndication.com/pagead/show_ads.js">
169 </script>
170 </center>
171 </div>
172
173
174 </td><td valign=top width="100%">
175 <div id="contents">
176
177 <h2>Documentation</h2>
178 <p class="default">
179 A lot of the documentation here is currently out-dated. Be invited
180 to help us with updating the documentation!
181 </p>
182
183 <a name="sfz"></a>
184 <a name="sfz2"></a>
185 <h2>SFZ(2) format specification and implementation status</h2>
186 <p class="default">
187 We are currently in the works of a SFZ(2) format based sampler engine,
188 as additional powerful sampler engine for LinuxSampler. As there is
189 currently no official document defining the so called <i>SFZ version 2</i>
190 format, we created our own <a href="https://docs.google.com/Doc?docid=0AVrDa5LNWylnZGZ6ejk4eHRfNDVjbmsyd3Zmag">SFZ2 reference document</a>,
191 reflecting the format and the progress of implementation in LinuxSampler's
192 Subversion developers version. This reference document is currently maintained by
193 <a href="developers.html#Dahnielson">Anders Dahnielson</a>.
194 </p>
195
196 <a name="windows"></a>
197 <a name="osx"></a>
198 <a name="debian"></a>
199 <h2>Howtos</h2>
200 <p class="default">
201 To ease new users the first contact with the Linuxsampler applications,
202 we have written the following short Howtos:
203 </p>
204 <table class="decorated">
205 <thead>
206 <tr>
207 <td class="decorated_header">Name</td>
208 <td class="decorated_header">Descripton</td>
209 </tr>
210 </thead>
211 <tbody>
212 <tr>
213 <td class="decorated"><a href="windows.html">Windows HOWTO</a></td>
214 <td class="decorated">
215 LinuxSampler quickstart guide for the MS Windows operating system.
216 </td>
217 </tr>
218 <tr>
219 <td class="decorated"><a href="osx.html">OS X HOWTO</a></td>
220 <td class="decorated">
221 LinuxSampler quickstart guide for the Apple OS X operating system (<b>Note:</b> Completely out-dated!).
222 </td>
223 </tr>
224 <tr>
225 <td class="decorated"><a href="debian.html">Debian HOWTO</a></td>
226 <td class="decorated">
227 Guide for how to build optimized Debian packages of LS &amp;
228 friends for your specific machine.
229 </td>
230 </tr>
231 <tr>
232 <td class="decorated"><a href="http://de.musix-wiki.org/index.php?title=LinuxSampler">Debian HOWTO (German)</a></td>
233 <td class="decorated">
234 Another guide for Debian on an external site, this one in German language.
235 </td>
236 </tr>
237 <tr>
238 <td class="decorated"><a href="msys.html">Windows Build HOWTO</a></td>
239 <td class="decorated">
240 Guide for how to build libgig, linuxsampler and gigedit
241 for Windows by using MSYS.
242 </td>
243 </tr>
244 </tbody>
245 </table>
246
247 <h2>gigedit</h2>
248 <p class="default">
249 This is our graphical instrument editor based on the Gtk toolkit.
250 It can be used stand-alone or in conjunction with LinuxSampler.
251 Read the <a href="http://download.linuxsampler.org/doc/gigedit/quickstart/gigedit_quickstart.html">Gigedit Quickstart</a>
252 for a short tutorial. Please notice that this quickstart document
253 is automatically generated from CVS and thus might reflect
254 features and behaviors only available in the very latest, bleeding
255 edge development version of gigedit from CVS.<br>
256 <br>
257 <b>Note:</b> The gigedit documentation is currently completely out-dated!
258 </p>
259
260 <h2><a name="jsampler">JSampler</a></h2>
261 <p class="default">
262 JSampler is an opensource, platform-independent,
263 GUI front-end for LinuxSampler, written entirely in Java.
264 Read the <a href="jsampler/manual/html/jsampler.html">JSampler manual</a>
265 for more information.<br>
266 For information about using Fantasia with Miditzer in Puppy Linux VTPO
267 read this <a href="http://organs.110mb.com/Fantasia.htm" target="_blank">HOWTO</a>.
268 </p>
269
270 <h2>libgig</h2>
271 <p class="default">
272 libgig is a C++ library used to load and modify instrument files,
273 supporting the Gigasampler / GigaStudio file format, SoundFont file
274 format, KORG file format, AKAI disk image format and the DLS
275 (Downloadable Sounds) file format.<br>
276 <br>
277 If you're a developer and might want to use libgig, here is its
278 <a href="http://download.linuxsampler.org/doc/libgig/api/">API documentation</a>
279 (automatically updated from SVN).
280 </p>
281
282 <a name="lscp_spec"></a>
283 <a name="lscp_specs"></a>
284 <h2>liblscp</h2>
285 <p class="default">
286 liblscp is C library as convenient wrapper around the <i>LinuxSampler Control Protocol</i>.
287 If you're a developer and might want to use liblscp, here is its
288 <a href="http://download.linuxsampler.org/doc/liblscp/">API documentation</a>
289 (automatically updated from SVN).
290 </p>
291
292 <h2>LSCP Reference</h2>
293 <p class="default">
294 The following documents define the <i>LinuxSampler Control Protocol</i>,
295 a network protocol with which LinuxSampler can be controlled locally as well as remotely.
296 As this is a simple ASCII based protocol it's possible to write a frontend for LinuxSampler in
297 any programming language and GUI library. There's still a big demand especially for a Gtk and
298 ncurses based frontend, so be encouraged and let
299 <a href="http://www.linuxsampler.org/developers.html">us</a> know if you wrote a frontend for
300 LinuxSampler!
301 </p>
302
303 <table class="decorated">
304 <thead>
305 <tr>
306 <td class="decorated_header">Protocol Name</td>
307 <td class="decorated_header">Document Types</td>
308 <td class="decorated_header">Release Date</td>
309 <td class="decorated_header">Description</td>
310 </tr>
311 </thead>
312 <tbody>
313 <tr>
314 <td class="decorated">LSCP&nbsp;draft</td>
315 <td class="decorated">
316 <a href="http://www.linuxsampler.org/api/draft-linuxsampler-protocol.txt">TXT</a>,
317 <a href="http://www.linuxsampler.org/api/draft-linuxsampler-protocol.html">HTML</a>,
318 <a href="http://www.linuxsampler.org/api/draft-linuxsampler-protocol.pdf">PDF</a>,
319 <a href="http://svn.linuxsampler.org/cgi-bin/viewvc.cgi/linuxsampler/trunk/Documentation/lscp.xml">XML</a>
320 </td>
321 <td class="decorated">unreleased</td>
322 <td class="decorated">
323 Very latest draft of the protocol (which usually reflects the
324 latest development state from SVN or may even not be implemented
325 yet).
326 </td>
327 </tr>
328 <tr>
329 <td class="decorated">LSCP&nbsp;1.7</td>
330 <td class="decorated">
331 <a href="http://www.linuxsampler.org/api/lscp-1.7.txt">TXT</a>,
332 <a href="http://www.linuxsampler.org/api/lscp-1.7.html">HTML</a>,
333 <a href="http://www.linuxsampler.org/api/lscp-1.7.pdf">PDF</a>,
334 <a href="http://www.linuxsampler.org/api/lscp-1.7.xml">XML</a>
335 </td>
336 <td class="decorated">2015-07-15</td>
337 <td class="decorated">
338 Protocol specification of latest LinuxSampler release (v2.0.0).
339 </td>
340 </tr>
341 <tr>
342 <td class="decorated">LSCP&nbsp;1.6</td>
343 <td class="decorated">
344 <a href="http://www.linuxsampler.org/api/lscp-1.6.txt">TXT</a>,
345 <a href="http://www.linuxsampler.org/api/lscp-1.6.html">HTML</a>,
346 <a href="http://www.linuxsampler.org/api/lscp-1.6.xml">XML</a>
347 </td>
348 <td class="decorated">2014-01-10</td>
349 <td class="decorated">
350 Protocol specification of a SVN LinuxSampler version (1.0.0.svn25 - svn r2500).
351 </td>
352 </tr>
353 <tr>
354 <td class="decorated">LSCP&nbsp;1.5</td>
355 <td class="decorated">
356 <a href="http://www.linuxsampler.org/api/lscp-1.5.txt">TXT</a>,
357 <a href="http://www.linuxsampler.org/api/lscp-1.5.html">HTML</a>,
358 <a href="http://www.linuxsampler.org/api/lscp-1.5.xml">XML</a>
359 </td>
360 <td class="decorated">2011-06-24</td>
361 <td class="decorated">
362 Protocol specification of a SVN LinuxSampler version (svn r2188).
363 </td>
364 </tr>
365 <tr>
366 <td class="decorated">LSCP&nbsp;1.4</td>
367 <td class="decorated">
368 <a href="http://www.linuxsampler.org/api/lscp-1.4.txt">TXT</a>,
369 <a href="http://www.linuxsampler.org/api/lscp-1.4.html">HTML</a>,
370 <a href="http://www.linuxsampler.org/api/lscp-1.4.xml">XML</a>
371 </td>
372 <td class="decorated">2009-07-31</td>
373 <td class="decorated">
374 Protocol specification of old official LinuxSampler release v1.0.0.
375 </td>
376 </tr>
377 <tr>
378 <td class="decorated">LSCP&nbsp;1.3</td>
379 <td class="decorated">
380 <a href="http://www.linuxsampler.org/api/lscp-1.3.txt">TXT</a>,
381 <a href="http://www.linuxsampler.org/api/lscp-1.3.html">HTML</a>,
382 <a href="http://www.linuxsampler.org/api/lscp-1.3.xml">XML</a>
383 </td>
384 <td class="decorated">2007-12-06</td>
385 <td class="decorated">
386 Protocol specification of ancient LinuxSampler release (0.5.1).
387 </td>
388 </tr>
389 <tr>
390 <td class="decorated">LSCP&nbsp;1.2</td>
391 <td class="decorated">
392 <a href="http://www.linuxsampler.org/api/lscp-1.2.txt">TXT</a>,
393 <a href="http://www.linuxsampler.org/api/lscp-1.2.html">HTML</a>,
394 <a href="http://www.linuxsampler.org/api/lscp-1.2.xml">XML</a>
395 </td>
396 <td class="decorated">2007-10-15</td>
397 <td class="decorated">
398 Protocol specification of ancient LinuxSampler release (0.5.0).
399 </td>
400 </tr>
401 <tr>
402 <td class="decorated">LSCP&nbsp;1.1</td>
403 <td class="decorated">
404 <a href="http://www.linuxsampler.org/api/lscp-1.1.txt">TXT</a>,
405 <a href="http://www.linuxsampler.org/api/lscp-1.1.html">HTML</a>,
406 <a href="http://www.linuxsampler.org/api/lscp-1.1.xml">XML</a>
407 </td>
408 <td class="decorated">2006-11-25</td>
409 <td class="decorated">
410 Protocol specification of ancient LinuxSampler release 0.4.0.
411 </td>
412 </tr>
413 <tr>
414 <td class="decorated">LSCP&nbsp;1.0</td>
415 <td class="decorated">
416 <a href="http://www.linuxsampler.org/api/lscp-1.0.txt">TXT</a>,
417 <a href="http://www.linuxsampler.org/api/lscp-1.0.html">HTML</a>,
418 <a href="http://www.linuxsampler.org/api/lscp-1.0.xml">XML</a>
419 </td>
420 <td class="decorated">2005-07-17</td>
421 <td class="decorated">
422 Protocol specification of ancient LinuxSampler release 0.3.3.
423 </td>
424 </tr>
425 </tbody>
426 </table>
427
428 <p class="default">
429 The protocol will be extended from time to time. You may look at the
430 <a href="features.html#LSCP">features</a> site to see which control
431 commands are already implemented and which are not.
432 </p>
433
434
435 <a name="example_lscp_scripts">
436 <h3>Example LSCP scripts</h3>
437 <p class="default">
438 If you don't want / can't use a GUI frontend you will probably write some LSCP scripts for
439 using with linuxsampler to setup your needed sampler session. It follows some common LSCP
440 examples to give you a good starting point for writing your own ones. Adjust it to your needs
441 and send it to the running linuxsampler application with:
442 </p>
443 <pre class="code">cat yourscript.lscp | netcat localhost 8888</pre>
444 <p class="default">
445 Optionally you can also use a graphical frontend like QSampler one time to setup a working
446 sampler session for your needs and save it. Because you have to know that the files saved
447 by our frontends are actually pure LSCP scripts, thus you can i.e. use those files simply with
448 the mentioned netcat command from above to setup the sampler session without a frontend.
449 </p>
450 <p class="default">
451 Here is a simple LSCP example which uses ALSA as MIDI input and as audio output driver as well,
452 it creates only one sampler channel using the Gigasampler engine and loads a Piano instrument
453 on that sampler channel:
454 </p>
455 <pre class="code">#enable echo mode
456 SET ECHO 1
457
458 # load the ALSA audio driver
459 # (parameter CARD is optional, I use it here to select my 2nd sound card
460 # you can use 'GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA CARD' to get
461 # all available sound cards)
462 CREATE AUDIO_OUTPUT_DEVICE ALSA CARD='1,0'
463
464 # load the ALSA MIDI driver
465 CREATE MIDI_INPUT_DEVICE ALSA
466
467 # connect my MIDI keyboard which has ALSA seq ID '72:0'
468 # (see 'aconnect -i' for the IDs of your MIDI devices
469 # or use 'GET MIDI_INPUT_PORT_PARAMETER INFO 0 0 ALSA_SEQ_BINDINGS')
470 SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS='72:0'
471
472 # setup a sampler channel
473 ADD CHANNEL
474 LOAD ENGINE gig 0
475 SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0
476 SET CHANNEL MIDI_INPUT_DEVICE 0 0
477 LOAD INSTRUMENT '/home/me/Gigs/PMI Steinway D.gig' 0 0
478
479 # finally show our channel setup (optional of course)
480 GET CHANNEL INFO 0
481
482 # quit connection
483 QUIT</pre>
484 <p class="default">
485 The next example uses JACK as audio output driver instead and automatically connects the two
486 output channels of LS's JACK client to the first two ALSA PCM channels, so you can hear
487 something without having to manually connect it e.g. with qjackctl:
488 </p>
489 <pre class="code">#enable echo mode
490 SET ECHO 1
491
492 # load the JACK audio driver
493 CREATE AUDIO_OUTPUT_DEVICE JACK
494
495 # connect to ALSA playback JACK client so we can hear something
496 # (you can use 'GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO 0 0 JACK_BINDINGS'
497 # to get all available JACK clients / ports)
498 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 JACK_BINDINGS='system:playback_1'
499 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 JACK_BINDINGS='system:playback_2'
500 # Note: above is for JACK2 (a.k.a. jackmp). If you are still using JACK1,
501 # you would need to use this instead:
502 # SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 JACK_BINDINGS='alsa_pcm:playback_1'
503 # SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 JACK_BINDINGS='alsa_pcm:playback_2'
504
505 # load the ALSA MIDI driver
506 CREATE MIDI_INPUT_DEVICE ALSA
507
508 # connect my MIDI keyboard which has ALSA seq ID '72:0'
509 # (see 'aconnect -i' for the IDs of your MIDI devices
510 # or use 'GET MIDI_INPUT_PORT_PARAMETER INFO 0 0 ALSA_SEQ_BINDINGS')
511 SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS='72:0'
512
513 # setup one sampler channel
514 ADD CHANNEL
515 LOAD ENGINE gig 0
516 SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0
517 SET CHANNEL MIDI_INPUT_DEVICE 0 0
518 LOAD INSTRUMENT '/home/me/Gigs/PMI Steinway D.gig' 0 0
519
520 # finally show our channel setup (optional of course)
521 GET CHANNEL INFO 0
522
523 # quit connection
524 QUIT</pre>
525 <p class="default">
526 The next example is a bit more complex.
527 It shows how to setup a more realistic sampler session, handle routing of MIDI input channels,
528 handle routing of audio channels, it uses JACK again as audio
529 output driver, but creates the JACK client with four output channels instead, it creates two
530 sampler channels, loads two different instruments on those two sampler channels and alters
531 the audio channel routing so that the two output channels of sampler channel 1 are routed to
532 the first two JACK output channels and the two output channels of sampler channel 2 are routed
533 the second pair of the JACK client's output channels. That way you could e.g. record the output
534 of those two sampler channels independently or apply independent LADSPA effects on it.
535 </p>
536 <pre class="code"># enable echo mode
537 SET ECHO 1
538
539 # load audio and MIDI driver
540 CREATE AUDIO_OUTPUT_DEVICE JACK
541 CREATE MIDI_INPUT_DEVICE ALSA
542
543 # increase the amount of output channels of the LS"s Jack client e.g. to 4
544 SET AUDIO_OUTPUT_DEVICE_PARAMETER 0 CHANNELS=4
545
546 # connect to MIDI keyboard
547 SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS="64:0"
548
549 # set up 1st sampler channel (using default output channels, that is 0 and 1)
550 ADD CHANNEL
551 LOAD ENGINE gig 0
552 SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0
553 SET CHANNEL MIDI_INPUT_DEVICE 0 0
554 LOAD INSTRUMENT "/somedir/The Bosendorfer Imperial Grand Version 2.2.gig" 0 0
555 SET CHANNEL VOLUME 0 0.40
556 # by default every sampler channel / engine listens to ALL MIDI channels
557 # but for multi channel setup it makes sense to distinguish the inputs, so
558 # let sampler channel 0 listen to MIDI channel 0 (instead of ALL)
559 SET CHANNEL MIDI_INPUT_CHANNEL 0 0
560
561 # set up 2nd sampler channel (using output channels 2 and 3)
562 ADD CHANNEL
563 LOAD ENGINE gig 1
564 SET CHANNEL AUDIO_OUTPUT_DEVICE 1 0
565 SET CHANNEL MIDI_INPUT_DEVICE 1 0
566 LOAD INSTRUMENT "/home/me/Gigs/NemeSys_1GB_Grand.gig" 0 1
567 SET CHANNEL VOLUME 1 0.40
568 # let sampler channel 1 listen to MIDI channel 1 (instead of ALL)
569 SET CHANNEL MIDI_INPUT_CHANNEL 1 1
570 # this will alter the audio channel routing
571 # connect the engines output channel 0 to JACK clients output 2
572 SET CHANNEL AUDIO_OUTPUT_CHANNEL 1 0 2
573 # connect the engines output channel 1 to JACK clients output 3
574 SET CHANNEL AUDIO_OUTPUT_CHANNEL 1 1 3
575
576 # automatic connection between the four 4 ports of LS's Jack client and the
577 # ALSA PCM JACK client (assuming your sound card has at least 4 outputs ;-)
578 # (assumimg JACK2 a.k.a. jackmp here, if you are still using JACK1 then
579 # you have to replace "system" by "alsa_pcm" here)
580 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 JACK_BINDINGS='system:playback_1'
581 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 JACK_BINDINGS='system:playback_2'
582 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 2 JACK_BINDINGS='system:playback_3'
583 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 3 JACK_BINDINGS='system:playback_4'
584
585 # not necessary, just to see our setup
586 GET CHANNEL INFO 0
587 GET CHANNEL INFO 1</pre>
588 <p class="default">
589 For a detailed description about LSCP read the <a href="api/draft-linuxsampler-protocol.html">LSCP reference</a>.
590 Be welcome to ask details on the mailing list.
591 </p>
592
593
594 </div>
595 </td></tr></table>
596
597 </div>
598
599 </body>
600 </html>

  ViewVC Help
Powered by ViewVC