File: composite_sampler.docbook

package info (click to toggle)
composite 0.006.2%2Bdfsg0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 12,244 kB
  • sloc: cpp: 39,829; xml: 1,370; python: 320; ansic: 219; makefile: 150; php: 73; sh: 52
file content (230 lines) | stat: -rw-r--r-- 8,261 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- mode:nxml; indent-tabs-mode:nil; fill-column:80; -*- -->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.0//EN"
                          "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">
<refentry id="man.1.composite_sampler" lang="en">

  <refentryinfo>
    <productname>Composite</productname>
    <author>
      <firstname>Gabriel</firstname>
      <othername>M.</othername>
      <surname>Beddingfield</surname>
      <authorblurb>
	<para>&lt;gabriel@teuton.org&gt;</para>
      </authorblurb>
    </author>
  </refentryinfo>

  <refmeta>
    <refentrytitle>composite_sampler</refentrytitle>
    <manvolnum>1</manvolnum>
    <refmiscinfo class='manual'>Audio Plugins</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname>composite_sampler</refname>
    <refpurpose>audio sampler/synth plugin (LV2)</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Description</title>

    <para>The Composite sampler is an audio plugin (LV2) that provides a simple
    sampling engine.  It is identified by the URI
    <quote>http://gabe.is-a-geek.org/composite/plugins/sampler/1</quote></para>
  </refsect1>

  <refsect1>
    <title>Ports</title>

    <para>The sampler includes the following ports:</para>

    <informaltable>
      <tgroup cols='5' colsep='1' rowsep='1'>
        <colspec colname='c0'/>
        <colspec colname='c1'/>
        <colspec colname='c2'/>
        <colspec colname='c3'/>
        <colspec colname='c4'/>
        <thead>
          <row>
            <entry>Name</entry>
            <entry>LV2 Port</entry>
            <entry>Type</entry>
            <entry>Flow</entry>
            <entry>Description</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry>Left</entry>
            <entry>out_left</entry>
            <entry>AudioPort</entry>
            <entry>Output</entry>
            <entry>Left stereo channel output</entry>
          </row>
          <row>
            <entry>Right</entry>
            <entry>out_right</entry>
            <entry>AudioPort</entry>
            <entry>Output</entry>
            <entry>Right stereo channel output</entry>
          </row>
          <row>
            <entry>MIDI</entry>
            <entry>midi</entry>
            <entry>EventPort</entry>
            <entry>Input</entry>
            <entry>Main MIDI Input</entry>
          </row>
          <row>
            <entry>Volume</entry>
            <entry>volume</entry>
            <entry>ControlPort</entry>
            <entry>Input</entry>
            <entry>Master volume [0.0-1.0]</entry>
          </row>
        </tbody>
      </tgroup>
    </informaltable>
  </refsect1>

  <refsect1>
    <title>Controlling the Sampler</title>

    <para>The primary way to control the sampler is over MIDI.  See
    composite_midi(7) for complete documentation on the MIDI
    implementation.</para>
  </refsect1>

  <refsect1>
    <title>Drumkits</title>

    <para>The drumkits for Composite are the same as for Hydrogen.  To reuse
    your Hydrogen drumkits, copy or symlink them to
    $HOME/.composite/data/drumkits/.  You can create and edit drumkits with
    composite-gui (or Hydrogen).</para>

  </refsect1>

  <refsect1>
    <title>Presets</title>

    <para>The sampler responds to MIDI Program Change events.  Based on the
    event that it receives, it will load up another file (e.g. a drumkit).  This
    is how you can select the drumkit that you wish to use.</para>

    <para>The presets are defined in a file
    <filename>$HOME/.composite/data/presets/default.xml</filename>.  For the
    sampler plugin, you can override this by using default-presets.xml, but at
    the current time there is no need to.  When you first load the sampler, it
    will check for this file.  If it doesn't exist, it will create one based on
    all your user drumkits.</para>

    <para>The presets file is a simple XML file that allows you to define MIDI
    banks, and assign different resources for each program change.  An example
    file is as follows:</para>

    <programlisting><![CDATA[<?xml version="1.0"?>
<T:tritium xmlns:T="http://gabe.is-a-geek.org/tritium/xml/1/">
    <T:presets>
        <T:bank coarse="0" fine="0">
            <T:program>
                <T:midi_number>0</T:midi_number>
                <T:resource>tritium:drumkits/GMkit</T:resource>
            </T:program>
            <T:program>
                <T:midi_number>1</T:midi_number>
                <T:resource>tritium:drumkits/TR808EmulationKit</T:resource>
            </T:program>
        </T:bank>
    </T:presets>
</T:tritium>]]></programlisting>

    <para>You can define several &lt;bank> elements for the MIDI banks.  The
    attributes <varname>coarse</varname> and <varname>fine</varname> correspond
    to the MIDI CC's 0 and 32.  Each &lt;program> section is a preset.  The
    &lt;midi_number> corresponds to the number in the PC message.</para>

    <para>The &lt;resource> element holds a URI/URL to the thing you want
    loaded.  This will typically be a drum kit, but can be any kind of file that
    Composite supports (like a .h2song, .h2pattern, etc.).  The sampler will do
    the Right Thing.  (For example, when loading an .h2song, the drumkit stored
    in the song will be loaded.)  The URL's supported are file://, tritium:, and
    file names.</para>

    <para>The tritium: scheme is designed to create portable URL's to things
    like drum kits.  For example, the URL <quote>tritium:drumkits/GMkit</quote>
    will load the drumkit <quote>GMkit</quote>, whether it's installed in the
    user directory
    (<filename>$HOME/.composite/data/drumkits/GMkit/drumkit.xml</filename>) or
    in the system directory
    (<filename>/usr/share/composite/data/drumkits/GMkit/drumkit.xml</filename>).</para>

    <note><para>The XML namespace declaration
    <quote>http://gabe.is-a-geek.org/tritium/xml/1/</quote> is not
    optional.</para></note>

  </refsect1>
  
  <refsect1>
    <title>LV2 Extensions</title>

    <para>This plugin uses the following extensions, and they must be supported
    by any program (host) that wishes to use this plugin.  If the host does not
    support them, the plugin will fail to load.</para>

    <itemizedlist>
      <listitem>
        <para>Events &lt;http://lv2plug.in/ns/ext/event#&gt;</para>
      </listitem>
      <listitem>
        <para>Midi Events &lt;http://lv2plug.in/ns/ext/midi#MidiEvent&gt;</para>
      </listitem>
    </itemizedlist>

  </refsect1>

  <refsect1>
    <title>Files</title>

    <para><emphasis>/usr/share/composite/data/</emphasis> &mdash; This is the
    main folder where system data (drumkits, presets, etc.) are stored for
    Composite and Composite Sampler.</para>

    <para><emphasis>$HOME/.composite/data/</emphasis> &mdash; This is the main
    folder where user data (drumkits, presets, etc.) are stored for Composite
    and Composite Sampler.</para>

    <para><emphasis>$HOME/.composite/data/drumkits/</emphasis> &mdash; This is
    the main folder where user drumkits are stored.  Each drumkit has its own
    folder, and each folder has a file 'drumkit.xml' that describes the
    drumkit.</para>

    <para><emphasis>$HOME/.composite/data/presets/default.xml</emphasis> &mdash;
    This is the default presets file for Composite.  If it does not exist, it
    will be created automatically using all of your installed drumkits.</para>


    <para><emphasis>$HOME/.composite/data/presets/default.xml</emphasis> &mdash;
    This is the default presets file for Composite.  If it does not exist, it
    will be created automatically using all of your installed drumkits.</para>

    <para><emphasis>$HOME/.composite/data/presets/default-plugin.xml</emphasis>
    &mdash; This is the default presets file for the Composite Sampler.  If it
    does not exist, then $HOME/.composite/data/presets/default.xml is
    used.</para>

  </refsect1>
  <refsect1>
    <title>Known Bugs</title>

    <para>Loading a .h2song through the presets is not happening in a real-time
    safe manner.  Loading drumkits works fine.</para>
  </refsect1>
  <refsect1>
    <title>See Also</title>

    <para>composite_midi(7), lv2_jack_host(1)</para>
  </refsect1>
</refentry>