Debian Codegraph @

opcodes/printk.xml

raw symbols SCIP
1
2 <refentry id="printk">
3 <indexterm id="IndexPrintk"><primary>printk</primary></indexterm>
4 <refentryinfo><title>Signal I/O:Printing and Display</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>printk</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>printk</refname>
11 <refpurpose>
12 Prints one k-rate value at specified intervals.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 Prints one k-rate value at specified intervals.
20 </para>
21 </refsect1>
22
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis><command>printk</command> itime, kval [, ispace] [, inamed]</synopsis>
26 </refsect1>
27
28 <refsect1>
29 <title>Initialization</title>
30 <para>
31 <emphasis>itime</emphasis> -- time in seconds between printings.
32 </para>
33
34 <para>
35 <emphasis>ispace</emphasis> (optional, default=0) -- number of spaces to insert before printing. (default: 0, max: 130)
36 </para>
37 <para>
38 <emphasis>inamed</emphasis> (optional, default=0) -- if non zero
39 print the name of the <emphasis>kvar</emphasis> as well as the value.
40 </para>
41
42 </refsect1>
43
44 <refsect1>
45 <title>Performance</title>
46 <para>
47 <emphasis>kval</emphasis> -- The k-rate values to be printed.
48 </para>
49
50 <para>
51 <emphasis>printk</emphasis> prints one k-rate value on every k-cycle, every second or at intervals specified. First the instrument number is printed, then the absolute time in seconds, then a specified number of spaces, then the <emphasis>kval</emphasis> value. The variable number of spaces enables different values to be spaced out across the screen - so they are easier to view.
52 </para>
53
54 <para>
55 This opcode can be run on every k-cycle it is run in the instrument. To every accomplish this, set <emphasis>itime</emphasis> to 0.
56 </para>
57
58 <para>
59 When <emphasis>itime</emphasis> is not 0, the opcode print on the first k-cycle it is called, and subsequently when every <emphasis>itime</emphasis> period has elapsed. The time cycles start from the time the opcode is initialized - typically the initialization of the instrument.
60 </para>
61 </refsect1>
62
63 <refsect1>
64 <title>Examples</title>
65 <para>
66 Here is an example of the printk opcode. It uses the file <ulink url="examples/printk.csd"><citetitle>printk.csd</citetitle></ulink>.
67
68 <example>
69 <title>Example of the printk opcode.</title>
70
71
72
73 <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para>
74 <xi:include href="examples-xml/printk.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
75 </example>
76
77 Its output should include lines like this:
78 <screen>
79 i 1 time 0.00002: 0.00000
80 i 1 time 1.00002: 20.01084
81 i 1 time 2.00002: 40.02999
82 i 1 time 3.00002: 60.04914
83 i 1 time 4.00002: 79.93327</screen>
84 </para>
85 </refsect1>
86
87 <refsect1>
88 <title>See also</title>
89 <para><link linkend="SigioPdisplay"><citetitle>Printing and Display</citetitle></link></para>
90 </refsect1>
91
92 <refsect1>
93 <title>Credits</title>
94 <para>
95 <simplelist>
96 <member>Author: Robin Whittle</member>
97 <member>Australia</member>
98 <member>May 1997</member>
99 </simplelist>
100 </para>
101 <para>named option new in 6.11</para>
102 <para>Example written by &namekevin;.</para>
103
104 <para>Thanks goes to Luis Jure for pointing out a mistake with the <emphasis>itime</emphasis> parameter.</para>
105 </refsect1>
106 </refentry>