aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-05-21 02:41:51 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-05-21 02:41:51 +0000
commit08176c4702d9fbf6a8b2f42b1633920cdd927fc4 (patch)
tree19be9b8b160a62377ca64cc0945922b3f106788c
parent4c931544631a8968cd44030940cbae071bed0e61 (diff)
added and updated comments
svn path=/trunk/externals/hcs/hid/; revision=3047
-rw-r--r--README56
-rw-r--r--TODO6
-rw-r--r--doc/hid_polar-help.pd10
-rw-r--r--doc/joystick-help.pd74
-rw-r--r--hid_graph.pd8
-rw-r--r--hid_polar.pd18
6 files changed, 118 insertions, 54 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..831d456
--- /dev/null
+++ b/README
@@ -0,0 +1,56 @@
+
+BINARIES
+--------
+
+There are two included binaries:
+
+hid.pd_darwin = Darwin/PowerPC and Mac OS X
+hid.pd_linux = Linux/PowerPC
+
+
+
+COMPILING
+---------
+
+The compiler needs to know where the Pd source is to find the headers, and the
+linker needs to know where the Pd binary is to check symbols. You can either
+set these on the command line or edit the Makefile
+
+ make INCLUDE=/path/to/pd/src PDEXECUTABLE=/path/to/pd/bin/pd
+
+On GNU/Linux, this is likely to look like:
+
+ make INCLUDE=/usr/local/src/pd-0.38-2/src PDEXECUTABLE=/usr/local/bin/pd
+
+On Darwin/Mac OS X, this is like to look like:
+
+ make INCLUDE=/usr/local/src/pd/src PDEXECUTABLE=/Applications/Pd.app/Contents/Resources/bin/pd
+
+
+
+COMPILING A DEBUG VERSION
+-------------------------
+
+To compile a debug version, edit these lines in hid.c (about line 32):
+
+//#define DEBUG(x)
+#define DEBUG(x) x
+
+Swap the commented lines so it looks like the lines above then recompile.
+
+
+INSTALL
+-------
+
+To install, you can add these lines to your .pdrc:
+
+-path /path/to/hid-0.5
+-helppath /path/to/hid-0.5
+
+Or you can copy the files to another place:
+
+mv *-help.pd examples/*.pd /path/to/doc/5.reference
+mv *.pd *.pd_* /path/to/extra
+
+
+.hc
diff --git a/TODO b/TODO
index a3e5472..afa1075 100644
--- a/TODO
+++ b/TODO
@@ -136,10 +136,16 @@ start-point and start-value.
[hid_debounce]
+[hid_vector] - angle and distance for mouse/relative data
+
peak finder object
"kalman filters"
+Curves!!
+
+http://www.2dcurves.com
+
/++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/doc/hid_polar-help.pd b/doc/hid_polar-help.pd
index 90ee6a8..5b40fc6 100644
--- a/doc/hid_polar-help.pd
+++ b/doc/hid_polar-help.pd
@@ -1,19 +1,19 @@
-#N canvas 601 232 478 451 10;
+#N canvas 601 232 482 455 10;
#X obj 5 2 cnv 15 450 20 empty empty [hid_polar] 2 11 1 18 -233017
-66577 0;
#X obj 422 3 pddp;
#X text 244 411 released under the GNU GPL;
#X floatatom 100 248 5 0 0 0 - - -;
#X floatatom 100 335 7 0 0 0 radius-> - -;
-#X text 175 375 For more info:;
-#X obj 279 373 pddp_open all_about_hid_mapping;
+#X text 124 370 For more info:;
+#X obj 228 368 pddp_open all_about_hid_mapping;
#X obj 100 295 hid_polar;
#X text 27 397 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at>
;
#X obj 101 161 hsl 128 15 0 1 0 0 empty empty x-axis 133 7 1 10 -225280
--1 -1 6350 0;
+-1 -1 0 0;
#X obj 157 103 vsl 15 128 0 1 0 0 empty empty y-axis -6 -9 1 10 -261681
--1 -1 6350 0;
+-1 -1 0 0;
#X floatatom 159 335 7 0 0 1 <-angle - -;
#X floatatom 158 248 5 0 0 0 - - -;
#X obj 157 265 t b f;
diff --git a/doc/joystick-help.pd b/doc/joystick-help.pd
index ec162b9..98f651a 100644
--- a/doc/joystick-help.pd
+++ b/doc/joystick-help.pd
@@ -1,5 +1,5 @@
-#N canvas 248 419 666 464 10;
-#X obj 168 91 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 1
+#N canvas 31 125 670 468 10;
+#X obj 168 91 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 1 1
;
#X floatatom 63 234 7 0 0 3 Y-axis - -;
#X floatatom 9 234 7 0 0 3 X-axis - -;
@@ -35,15 +35,13 @@
;
#X text 218 426 released under the GNU GPL;
#X text 414 426 $Author: eighthave $;
-#X text 414 413 $Revision: 1.9 $;
+#X text 414 413 $Revision: 1.10 $;
#X obj 239 375 pddp_open all_about_hid;
#X text 130 376 For more info:;
#X floatatom 245 234 5 0 0 3 hat0X - -;
#X floatatom 288 234 5 0 0 3 hat0Y - -;
-#X msg 220 112 open 3;
#X obj 212 291 route btn_0 btn_1 btn_2 btn_3 btn_4 btn_5 btn_6 btn_7
btn_8 btn_9;
-#X msg 225 131 open 5;
#X obj 168 154 joystick 0;
#N canvas 674 327 446 497 joystick_noise 0;
#X obj 73 25 inlet;
@@ -98,48 +96,50 @@ btn_8 btn_9;
#X connect 21 0 20 0;
#X connect 22 0 5 0;
#X restore 440 155 pd joystick_noise;
-#X obj 440 92 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 1 1
+#X obj 440 92 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 1
;
#X text 333 73 Select your device and turn on to make noise:;
#X obj 619 3 pddp;
#X msg 503 125 open \$1;
#X obj 503 105 hradio 15 1 1 8 \$0-device-number empty choose_a_device
-0 -6 1 9 -262144 -1 -1 0;
+0 -6 1 9 -262144 -1 -1 2;
#X obj 477 105 nbx 1 14 -1e+37 1e+37 0 0 empty \$0-device-number empty
-0 -6 0 14 -166441 -1 -1 0 256;
+0 -6 0 14 -166441 -1 -1 2 256;
#X text 8 36 Use a joystick device with Pd. This object auto-calibrates
the output of axis data. Move each element of the device thru its full
range to calibrate it.;
#X obj 335 215 unpack s f;
-#X obj 339 375 pddp_open all_about_hid_mapping;
+#X obj 407 375 pddp_open all_about_hid_mapping;
#X text 422 177 (remember to calibrate all parts;
#X text 430 190 of the joystick first);
#X msg 394 120 print;
-#X connect 0 0 31 0;
-#X connect 19 0 31 0;
-#X connect 28 0 31 0;
-#X connect 29 0 3 0;
-#X connect 29 1 4 0;
-#X connect 29 2 5 0;
-#X connect 29 3 6 0;
-#X connect 29 4 9 0;
-#X connect 29 5 10 0;
-#X connect 29 6 11 0;
-#X connect 29 7 12 0;
-#X connect 29 8 13 0;
-#X connect 29 9 14 0;
-#X connect 30 0 31 0;
-#X connect 31 0 2 0;
-#X connect 31 1 1 0;
-#X connect 31 2 7 0;
-#X connect 31 3 8 0;
-#X connect 31 4 26 0;
-#X connect 31 5 27 0;
-#X connect 31 6 29 0;
-#X connect 31 6 40 0;
-#X connect 33 0 32 0;
-#X connect 36 0 32 1;
-#X connect 37 0 36 0;
-#X connect 40 0 15 0;
-#X connect 40 1 16 0;
-#X connect 44 0 32 0;
+#X msg 220 112 open 2;
+#X msg 225 131 open 3;
+#X connect 0 0 29 0;
+#X connect 19 0 29 0;
+#X connect 28 0 3 0;
+#X connect 28 1 4 0;
+#X connect 28 2 5 0;
+#X connect 28 3 6 0;
+#X connect 28 4 9 0;
+#X connect 28 5 10 0;
+#X connect 28 6 11 0;
+#X connect 28 7 12 0;
+#X connect 28 8 13 0;
+#X connect 28 9 14 0;
+#X connect 29 0 2 0;
+#X connect 29 1 1 0;
+#X connect 29 2 7 0;
+#X connect 29 3 8 0;
+#X connect 29 4 26 0;
+#X connect 29 5 27 0;
+#X connect 29 6 28 0;
+#X connect 29 6 38 0;
+#X connect 31 0 30 0;
+#X connect 34 0 30 1;
+#X connect 35 0 34 0;
+#X connect 38 0 15 0;
+#X connect 38 1 16 0;
+#X connect 42 0 30 0;
+#X connect 43 0 29 0;
+#X connect 44 0 29 0;
diff --git a/hid_graph.pd b/hid_graph.pd
index f972d25..f00d213 100644
--- a/hid_graph.pd
+++ b/hid_graph.pd
@@ -1,9 +1,9 @@
-#N canvas 161 50 507 536 10;
+#N canvas 606 208 515 544 10;
#X obj 20 178 inlet;
-#N canvas 0 22 462 312 graph5 0;
-#X array \$0-hid_graph_array 100 float 2;
+#N canvas 0 22 466 316 graph5 0;
+#X array \$0-hid 100 float 2;
#X coords 0 1 100 0 100 100 1;
-#X restore 2 46 graph;
+#X restore -1 20 graph;
#X obj 115 368 outlet;
#X text 155 301 gives a range of 0-100;
#X text 162 369 output range 0 to 1;
diff --git a/hid_polar.pd b/hid_polar.pd
index 5b28852..0a3a424 100644
--- a/hid_polar.pd
+++ b/hid_polar.pd
@@ -1,16 +1,16 @@
-#N canvas 328 234 464 407 10;
+#N canvas 328 234 468 411 10;
#X obj 30 58 inlet;
-#X obj 25 323 outlet;
-#X text 73 323 output range: 0 to 1;
+#X obj 25 313 outlet;
+#X text 73 313 output range: 0 to 1;
#X text 72 57 input range: 0 to 1;
#X text 11 5 [hid_polar];
-#X obj 232 322 outlet;
+#X obj 232 312 outlet;
#X obj 224 56 inlet;
#X text 264 57 input range: 0 to 1;
#X text 29 29 x-axis value;
#X text 221 26 y-axis value;
-#X obj 25 292 / 1.41421;
-#X text 92 292 (sqrt 2);
+#X obj 25 282 / 1.41421;
+#X text 92 282 (sqrt 2);
#X obj 104 220 cart2pol;
#X obj 223 85 t b f;
#X obj 29 180 f;
@@ -19,11 +19,13 @@
#X obj 29 140 - 1;
#X obj 29 120 * 2;
#X text 61 125 convert range to -1 to 1;
-#X text 280 322 output range: 0 to 1;
+#X text 280 312 output range: 0 to 1;
#X text 245 371 released under the GNU GPL;
#X text 28 357 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at>
;
-#X obj 231 290 rad2hid;
+#X obj 231 280 rad2hid;
+#X text 23 331 radius;
+#X text 230 332 angle;
#X connect 0 0 18 0;
#X connect 6 0 13 0;
#X connect 10 0 1 0;