blob: d9387f08d1e5f025b30405ba775f24b0dccc02b1 (
plain)
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
|
<refentry id="pcount">
<indexterm id="IndexPcount"><primary>pcount</primary></indexterm>
<refentryinfo><title>Instrument Control:Sensing and Control</title></refentryinfo>
<refmeta>
<refentrytitle>pcount</refentrytitle>
</refmeta>
<refnamediv>
<refname>pcount</refname>
<refpurpose>
Returns the number of pfields belonging to a note event.
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
<emphasis>pcount</emphasis> returns the number of pfields belonging to a note event.
</para>
</refsect1>
<refsect1>
<title>Syntax</title>
<synopsis>icount <command>pcount</command></synopsis>
</refsect1>
<refsect1>
<title>Initialization</title>
<para>
<emphasis>icount</emphasis> - stores the number of pfields for the current note event.
</para>
<note>
<para>
Note that the reported number of pfields is not necessarily what's explicitly written in the score, but the pfields available to the instrument through mechanisms like <link linkend="ScoreCarry"><citetitle>pfield carry</citetitle></link>.
</para>
</note>
</refsect1>
<!-- <refsect1>
<title>Performance</title>
</refsect1>-->
<refsect1>
<title>Examples</title>
<para>
Here is an example of the pcount opcode. It uses the file <ulink url="examples/pcount.csd"><citetitle>pcount.csd</citetitle></ulink>.
<example>
<title>Example of the pcount opcode.</title>
<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>
<xi:include href="examples-xml/pcount.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
</para>
<para>
The example will produce the following output:
<screen>
SECTION 1:
new alloc for instr 1:
WARNING: instr 1 uses 3 p-fields but is given 5
instr 1: inum = 5.000
B 0.000 .. 1.000 T 1.000 TT 1.000 M: 0.0
new alloc for instr 1:
WARNING: instr 1 uses 3 p-fields but is given 5
instr 1: inum = 5.000
B 1.000 .. 2.000 T 2.000 TT 2.000 M: 0.0
new alloc for instr 1:
WARNING: instr 1 uses 3 p-fields but is given 7
instr 1: inum = 7.000
</screen>
The warnings occur because pfields are not used explicitly by the instrument.
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<link linkend="pindex"><citetitle>pindex</citetitle></link>
</para>
</refsect1>
<refsect1>
<title>Credits</title>
<para>Example by: Anthony Kozar</para>
<para>Dec. 2006</para>
</refsect1>
</refentry>
|