Debian Codegraph @

opcodes/p5gdata.xml

raw symbols SCIP
1
2 <refentry id="p5gdata">
3 <indexterm id="Indexp5gdata"><primary>p5gdata</primary></indexterm>
4 <refentryinfo><title>Instrument Control:Sensing and Control</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>p5gdata</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>p5gdata</refname>
11 <refpurpose>
12 Reads data fields from an external P5 Glove.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>Plugin opcode in p5g. This opcode is part of the plugin repository and has to be installed separately.
19 The plugin repository can be found here: <ulink url="https://github.com/csound/plugins"><citetitle>https://github.com/csound/plugins</citetitle></ulink></para>
20 <para>
21 Reads data fields from a P5 Glove controller.
22 </para>
23 </refsect1>
24
25 <refsect1>
26 <title>Syntax</title>
27 <synopsis>kres <command>p5gdata</command> kcontrol</synopsis>
28 </refsect1>
29
30 <refsect1>
31 <title>Initialization</title>
32 <para>
33 This opcode must be used in conjuction with
34 a running <emphasis>p5gconnect</emphasis> opcode.
35 </para>
36
37 </refsect1>
38
39 <refsect1>
40 <title>Performance</title>
41 <para>
42 <emphasis>kcontrol</emphasis> -- the code for which control to read
43 </para>
44 <para>
45 On each access a particular data item of the P5 glove is read.
46 The currently implemented controls are given below, together with
47 the macro name defined in the file <emphasis>p5g_mac</emphasis>:
48 </para>
49 <para>
50 0 (P5G_BUTTONS): returns a bit pattern for all buttons that were pressed.
51 </para>
52 <para>
53 1 (P5G_BUTTON_A): returns 1 if the button has just been pressed, or 0 otherwise.
54 </para>
55 <para>
56 2 (P5G_BUTTON_B): as above.
57 </para>
58 <para>
59 4 (P5G_BUTTON_C): as above.
60 </para>
61 <para>
62 8 (P5G_JUSTPUSH): returns a bit pattern for all buttons that have just been pressed.
63 </para>
64 <para>
65 9 (P5G_JUSTPU_A): returns 1 if the A button has just been pressed.
66 </para>
67 <para>
68 10 (P5G_JUSTPU_B): as above.
69 </para>
70 <para>
71 12 (P5G_JUSTPU_C): as above.
72 </para>
73 <para>
74 16 (P5G_RELEASED): returns a bit pattern for all buttons that have just been released.
75 </para>
76 <para>
77 17 (P5G_RELSED_A): returns 1 if the A button has just been released.
78 </para>
79 <para>
80 18 (P5G_RELSED_B): as above.
81 </para>
82 <para>
83 20 (P5G_RELSED_C): as above.
84 </para>
85 <para>
86 32 (P5G_FINGER_INDEX): returns the clench value of the index finger.
87 </para>
88 <para>
89 33 (P5G_FINGER_MIDDLE): as above.
90 </para>
91 <para>
92 34 (P5G_FINGER_RING): as above.
93 </para>
94 <para>
95 35 (P5G_FINGER_PINKY): as above with little finger.
96 </para>
97 <para>
98 36 (P5G_FINGER_THUMB): as above.
99 </para>
100 <para>
101 37 (P5G_DELTA_X): The X position of the glove.
102 </para>
103 <para>
104 38 (P5G_DELTA_Y): The Y position of the glove.
105 </para>
106 <para>
107 39 (P5G_DELTA_Z): The Z position of the glove.
108 </para>
109 <para>
110 40 (P5G_DELTA_XR): The X axis change (angle).
111 </para>
112 <para>
113 41 (P5G_DELTA_YR): as above.
114 </para>
115 <para>
116 42 (P5G_DELTA_ZR): as above.
117 </para>
118 <para>
119 43 (P5G_ANGLES): The general angle
120 </para>
121 </refsect1>
122
123 <refsect1>
124 <title>Examples</title>
125 <para>
126 See the example for <link linkend="p5gconnect"><citetitle>p5gconnect</citetitle></link>.
127 </para>
128 </refsect1>
129
130 <refsect1>
131 <title>See Also</title>
132 <para><link linkend="nonMIDIdevices"><citetitle>non-MIDI Devices</citetitle></link></para>
133 </refsect1>
134
135 <refsect1>
136 <title>Credits</title>
137 <para>
138 <simplelist>
139 <member>Author: &namejohn;</member>
140 <member>Codemist Ltd</member>
141 <member>2009</member>
142 </simplelist>
143 </para>
144 <para>New in version 5.12</para>
145 </refsect1>
146 </refentry>