Debian Codegraph @

opcodes/metro.xml

raw symbols SCIP
1 <refentry id="metro">
2 <indexterm id="IndexMetro"><primary>metro</primary></indexterm>
3 <refentryinfo><title>Instrument Control:Sensing and Control</title></refentryinfo>
4 <refmeta>
5 <refentrytitle>metro</refentrytitle>
6 </refmeta>
7
8 <refnamediv>
9 <refname>metro</refname>
10 <refpurpose>
11 Trigger Metronome
12 </refpurpose>
13 </refnamediv>
14
15 <refsect1>
16 <title>Description</title>
17 <para>
18 Generate a metronomic signal to be used in any circumstance an isochronous trigger is needed.
19 </para>
20 </refsect1>
21 <refsect1>
22 <title>Syntax</title>
23 <synopsis>ktrig <command>metro</command> kfreq [, initphase]</synopsis>
24 </refsect1>
25
26 <refsect1>
27 <title>Initialization</title>
28 <para>
29 <emphasis>initphase</emphasis> - initial phase value (in the 0 to 1 range)
30 </para>
31 </refsect1>
32
33 <refsect1>
34 <title>Performance</title>
35 <para>
36 <emphasis>ktrig</emphasis> - output trigger signal
37 </para>
38 <para>
39 <emphasis>kfreq</emphasis> - frequency of trigger bangs in cps
40 </para>
41
42 <para>
43 <emphasis>metro</emphasis> is a simple opcode that outputs a sequence of isochronous bangs (that is 1 values) each 1/kfreq seconds. Trigger signals can be used in any circumstance, mainly to temporize realtime algorithmic compositional structures.
44 </para>
45
46 <note>
47 <para>
48 <emphasis>metro</emphasis> will produce a trigger signal of 1 when its phase is exactly 0 or 1. If you want to skip the initial trigger, use a very small value like 0.00000001.
49 </para>
50 </note>
51 </refsect1>
52
53 <refsect1>
54 <title>Examples</title>
55 <para>
56 Here is an example of the metro opcode. It uses the file <ulink url="examples/metro.csd"><citetitle>metro.csd</citetitle></ulink>
57 <example>
58 <title>Example of the metro opcode.</title>
59 <xi:include href="examples-xml/metro.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
60 </example>
61 Here is another example of the metro opcode. It uses the file <ulink url="examples/metro-2.csd"><citetitle>metro-2.csd</citetitle></ulink>
62 <example>
63 <title>Another example of the metro opcode.</title>
64 <xi:include href="examples-xml/metro-2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
65 </example>
66 </para>
67 </refsect1>
68
69 <refsect1>
70 <title>See also</title>
71 <para><link linkend="ControlSensing"><citetitle>Sensing and Control: Tempo and Sequencing</citetitle></link></para>
72 <para> More information on this opcode in the Floss Manuals: <ulink url="https://flossmanual.csound.com/csound-language/control-structures"><citetitle>https://flossmanual.csound.com/csound-language/control-structures</citetitle></ulink></para>
73 </refsect1>
74
75 <refsect1>
76 <title>Credits</title>
77 <para>Written by &namegabriel;.</para>
78 <para>First Example written by &nameandres;.</para>
79 <para>New in Csound 5 (Previously available only on CsoundAV)</para>
80 </refsect1>
81 </refentry>
82