You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: opcodes/opcode.xml
+3-79Lines changed: 3 additions & 79 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@
18
18
</para>
19
19
20
20
<para>
21
-
A user-defined opcode block must precede the instrument (or other opcode) from which it is used. But it is possible to call the opcode from itself. This allows recursion of any depth that is limited only by available memory. Additionally, there is an experimental feature that allows running the opcode definition at a higher control rate than the <linklinkend="kr"><citetitle>kr</citetitle></link> value specified in the orchestra header.
21
+
A user-defined opcode block must precede the instrument (or other opcode) from which it is used. But it is possible to call the opcode from itself. This allows recursion of any depth that is limited only by available memory.
22
22
</para>
23
23
24
24
<para>
@@ -203,10 +203,6 @@
203
203
</informaltable>
204
204
</para>
205
205
206
-
<para>
207
-
The maximum allowed number of input arguments is 256.
208
-
</para>
209
-
210
206
<para>
211
207
<emphasis>outtypes</emphasis> -- list of output types. The format is the same as in the case of <emphasis>intypes</emphasis>.
212
208
</para>
@@ -275,72 +271,7 @@
275
271
The maximum allowed number of output arguments is 256.
276
272
</para>
277
273
278
-
<para>
279
-
<emphasis>iksmps</emphasis> (optional, default=0) -- sets the local
280
-
<emphasis>ksmps</emphasis> value. Must be a positive integer, and also
281
-
the <emphasis>ksmps</emphasis> of the
282
-
calling instrument or opcode must be an integer multiple of this value.
283
-
For example, if <emphasis>ksmps</emphasis> is 10 in the instrument from which
284
-
the opcode was called, the allowed values for <emphasis>iksmps</emphasis>
285
-
are 1, 2, 5, and 10.
286
-
</para>
287
-
288
-
<para>
289
-
If <emphasis>iksmps</emphasis> is set to zero, the
290
-
<emphasis>ksmps</emphasis> of the caller instrument or opcode is used
291
-
(this is the default behavior).
292
-
</para>
293
-
294
-
<note>
295
-
<title>Note</title>
296
-
<para>
297
-
The local <emphasis>ksmps</emphasis> is implemented by splitting up
298
-
a control period into smaller sub-kperiods and temporarily modifying
299
-
internal Csound global variables. This also requires converting the
300
-
rate of k-rate input and output arguments (input variables receive
301
-
the same value in all sub-kperiods, while outputs are written only
302
-
in the last one).
303
-
</para>
304
-
</note>
305
-
306
-
<warning>
307
-
<title>Warning about local <emphasis>ksmps</emphasis></title>
308
-
<para>
309
-
When the local <emphasis>ksmps</emphasis> is not the same as the
310
-
orchestra level <emphasis>ksmps</emphasis> value (as specified in the
311
-
orchestra header), global a-rate operations must not be used in the
312
-
user-defined opcode block.
313
-
</para>
314
-
315
-
<para>
316
-
These include:
317
-
318
-
<itemizedlist>
319
-
<listitem><para>any access to <quote>ga</quote> variables</para></listitem>
<listitem><para><linklinkend="tablera"><citetitle>tablera</citetitle></link> and <linklinkend="tablewa"><citetitle>tablewa</citetitle></link> (these two opcodes may in fact work, but caution is needed)</para></listitem>
322
-
<listitem><para>The <emphasis>in</emphasis> and <emphasis>out</emphasis> opcode family (these read from, and write to global a-rate buffers)</para></listitem>
323
-
</itemizedlist>
324
-
</para>
325
-
326
-
<para>
327
-
In general, the local <emphasis>ksmps</emphasis> should be used with
328
-
care as it is an experimental feature, although it works correctly in
329
-
most cases.
330
-
</para>
331
-
</warning>
332
-
333
-
<para>
334
-
The <linklinkend="setksmps"><citetitle>setksmps</citetitle></link>
335
-
statement can be used to set the local <emphasis>ksmps</emphasis> value
336
-
of the user-defined opcode block. It has one i-time parameter specifying
337
-
the new <emphasis>ksmps</emphasis> value (which is left unchanged if zero
338
-
is used, see also the notes about <emphasis>iksmps</emphasis> above).
339
-
<emphasis>setksmps</emphasis> should be used before any other opcodes
340
-
(but allowed after <emphasis>xin</emphasis>), otherwise unpredictable
341
-
results may occur.
342
-
</para>
343
-
274
+
344
275
<para>
345
276
The input parameters can be read with <emphasis>xin</emphasis>, and the
346
277
output is written by <emphasis>xout</emphasis> opcode. Only one instance
@@ -350,13 +281,6 @@
350
281
as in the declaration of the user-defined opcode block (see tables above).
351
282
</para>
352
283
353
-
<para>
354
-
The input and output arguments must agree with the definition both in
355
-
number (except if the optional i-time input is used) and type.
356
-
An optional i-time input parameter (<emphasis>iksmps</emphasis>) is
357
-
automatically added to the <emphasis>intypes</emphasis> list, and
358
-
(similarly to setksmps) sets the local <emphasis>ksmps</emphasis> value.
<emphasis>ifactor</emphasis> -- sets the oversampling factor. It
32
+
needs to be a positive integer > 1. A factor of 1 is a non-op,
33
+
zero or negative factors are illegal.
34
+
</para>
35
+
<para>
36
+
<emphasis>imode</emphasis> -- oversampling mode: if Secret
37
+
Rabbit Code is used, then 0 - best quality sync (default); 1 - medium
38
+
quality sync; 2 - fast sync; 3 - zero-order hold; and 4 - linear.
39
+
</para>
40
+
<para>
41
+
If <emphasis>iksmps</emphasis> is set to zero, the <emphasis>ksmps</emphasis> of the caller instrument or opcode is used (this is the default behavior).
42
+
</para>
43
+
44
+
<note>
45
+
<title>Note</title>
46
+
<para>
47
+
Oversampling is not allowed with local ksmps. The opcode can
48
+
only be used in UDOs. Audio or control rate array arguments
49
+
are not allowed. Global variables or bus channels should not be used.
Copy file name to clipboardExpand all lines: opcodes/setksmps.xml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@
65
65
</warning>
66
66
67
67
<para>
68
-
The <emphasis>setksmps</emphasis> statement can be used to set the local <linklinkend="ksmps"><citetitle>ksmps</citetitle></link> value of the instrument or user-defined opcode block. It has one i-time parameter specifying the new <emphasis>ksmps</emphasis> value (which is left unchanged if zero is used). <emphasis>setksmps</emphasis> should be used before any other opcodes (but allowed after <linklinkend="xin"><citetitle>xin</citetitle></link> in UDOs), otherwise unpredictable results may occur.
68
+
The <emphasis>setksmps</emphasis> statement can be used to set the local <linklinkend="ksmps"><citetitle>ksmps</citetitle></link> value of the instrument or user-defined opcode block. It has one i-time parameter specifying the new <emphasis>ksmps</emphasis> value. <emphasis>setksmps</emphasis> should be used before any other opcodes (but allowed after <linklinkend="xin"><citetitle>xin</citetitle></link> in UDOs), otherwise unpredictable results may occur.
0 commit comments