aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-04-26 04:44:22 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-04-26 04:44:22 +0000
commit78ce2a6eaf985013d85123ed837168fa0fdb0416 (patch)
tree8f85ee60ca4aaaae0c920bd217025821a70922ac /examples
parentcaeae99fe501179ef05cdfeb6c5b13354a9d88a4 (diff)
added copyleft and cleaned up to look good
svn path=/trunk/externals/hcs/hid/; revision=2821
Diffstat (limited to 'examples')
-rw-r--r--examples/polar-joystick.pd61
-rw-r--r--examples/spiral-joystick.pd92
2 files changed, 75 insertions, 78 deletions
diff --git a/examples/polar-joystick.pd b/examples/polar-joystick.pd
index baace12..c1df190 100644
--- a/examples/polar-joystick.pd
+++ b/examples/polar-joystick.pd
@@ -1,44 +1,49 @@
-#N canvas 515 127 469 529 10;
-#X obj 184 159 joystick 3;
-#X obj 242 194 hid_invert;
-#X obj 183 92 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 1
-;
-#X msg 246 125 open \$1;
-#X obj 246 105 hradio 15 1 1 8 \$0-device-number empty choose_a_device
+#N canvas 233 112 468 474 10;
+#X obj 164 172 joystick 3;
+#X obj 201 204 hid_invert;
+#X obj 163 119 tgl 25 0 empty empty start 1 12 1 9 -225271 -1 -1 0
+1;
+#X msg 226 138 open \$1;
+#X obj 226 118 hradio 15 1 1 8 \$0-device-number empty choose_a_device
0 -6 1 9 -225271 -1 -1 3;
-#X obj 220 105 nbx 1 14 -1e+37 1e+37 0 0 empty \$0-device-number empty
+#X obj 200 118 nbx 1 14 -1e+37 1e+37 0 0 empty \$0-device-number empty
0 -6 0 14 -166441 -1 -1 3 256;
-#X msg 137 120 print;
-#X obj 242 314 mtof;
-#X obj 241 338 osc~;
-#X obj 126 422 *~;
-#X obj 182 488 dac~;
-#X obj 141 329 line~;
-#X msg 141 307 \$1 5;
-#X obj 141 288 hid_cube;
-#X obj 242 270 notescale 40 90;
-#X text 14 9 [polar_joystick];
+#X msg 112 119 print;
+#X obj 201 288 mtof;
+#X obj 201 308 osc~;
+#X obj 142 345 *~;
+#X obj 142 391 dac~;
+#X obj 101 295 line~;
+#X msg 101 273 \$1 5;
+#X obj 101 254 hid_cube;
+#X obj 201 268 notescale 40 90;
#X text 25 38 This patch uses the angle of the joystick to control
pitch and the distance from the centerpoint to control amplitude. The
joystick Z/twist is mapped to pan.;
-#X obj 183 455 pan~;
-#X obj 183 225 hid_polar;
-#X connect 0 0 18 0;
+#X obj 142 369 pan~;
+#X obj 143 226 hid_polar;
+#X text 254 444 released under the GNU GPL;
+#X text 40 429 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at>
+;
+#X text 14 9 polar_joystick;
+#X obj 201 248 hid_log;
+#X connect 0 0 17 0;
#X connect 0 1 1 0;
-#X connect 0 2 17 1;
-#X connect 1 0 18 1;
+#X connect 0 2 16 1;
+#X connect 1 0 17 1;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 3 0;
#X connect 6 0 0 0;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
-#X connect 9 0 17 0;
+#X connect 9 0 16 0;
#X connect 11 0 9 1;
#X connect 12 0 11 0;
#X connect 13 0 12 0;
#X connect 14 0 7 0;
-#X connect 17 0 10 0;
-#X connect 17 1 10 1;
-#X connect 18 0 13 0;
-#X connect 18 1 14 0;
+#X connect 16 0 10 0;
+#X connect 16 1 10 1;
+#X connect 17 0 13 0;
+#X connect 17 1 21 0;
+#X connect 21 0 14 0;
diff --git a/examples/spiral-joystick.pd b/examples/spiral-joystick.pd
index f2f00e6..807191d 100644
--- a/examples/spiral-joystick.pd
+++ b/examples/spiral-joystick.pd
@@ -1,57 +1,49 @@
-#N canvas 195 175 483 554 10;
-#X obj 184 159 joystick 3;
-#X obj 255 194 hid_invert;
-#X obj 183 92 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 1
+#N canvas 35 146 474 469 10;
+#X obj 165 174 hid_invert;
+#X obj 134 99 tgl 25 0 empty empty start 1 12 1 9 -225271 -1 -1 0 1
;
-#X msg 246 125 open \$1;
-#X obj 246 105 hradio 15 1 1 8 \$0-device-number empty choose_a_device
+#X msg 196 118 open \$1;
+#X obj 196 98 hradio 15 1 1 8 \$0-device-number empty choose_a_device
0 -6 1 9 -225271 -1 -1 3;
-#X obj 220 105 nbx 1 14 -1e+37 1e+37 0 0 empty \$0-device-number empty
+#X obj 170 98 nbx 1 14 -1e+37 1e+37 0 0 empty \$0-device-number empty
0 -6 0 14 -166441 -1 -1 3 256;
-#X msg 137 120 print;
-#X obj 249 309 osc~;
-#X obj 126 422 *~;
-#X obj 182 488 dac~;
-#X obj 141 329 line~;
-#X msg 141 307 \$1 5;
-#X obj 141 288 hid_cube;
-#X text 25 38 This patch uses the angle of the joystick to control
+#X msg 81 99 print;
+#X obj 165 282 osc~;
+#X obj 98 345 *~;
+#X obj 98 386 dac~;
+#X obj 58 283 line~;
+#X msg 58 261 \$1 5;
+#X obj 58 242 hid_cube;
+#X text 25 32 This patch uses the angle of the joystick to control
pitch and the distance from the centerpoint to control amplitude. The
joystick Z/twist is mapped to pan.;
-#X obj 183 455 pan~;
-#X text 14 9 [spiral_joystick];
-#X text 254 524 released under the GNU GPL;
-#X text 40 509 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at>
+#X obj 98 366 pan~;
+#X text 254 432 released under the GNU GPL;
+#X text 40 417 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at>
;
-#X obj 183 225 hid_spiral;
-#X floatatom 78 193 5 0 0 0 - - -;
-#X floatatom 124 193 5 0 0 0 - - -;
-#X msg 68 130 poll 2;
-#X floatatom 316 305 5 0 0 0 - - -;
-#X obj 249 283 pow 3;
-#X text 302 224 set 440 as start;
-#X obj 249 258 + 7.60591;
-#X text 303 240 (7.60591 ^ 3 = 440.001);
-#X connect 0 0 18 0;
-#X connect 0 0 19 0;
-#X connect 0 1 1 0;
-#X connect 0 1 20 0;
-#X connect 0 2 14 1;
-#X connect 1 0 18 1;
-#X connect 2 0 0 0;
-#X connect 3 0 0 0;
-#X connect 4 0 3 0;
-#X connect 6 0 0 0;
-#X connect 7 0 8 0;
-#X connect 8 0 14 0;
-#X connect 10 0 8 1;
+#X obj 100 198 hid_spiral;
+#X obj 165 262 pow 3;
+#X text 189 211 set 440 as start;
+#X obj 165 241 + 7.60591;
+#X text 187 223 (7.60591 ^ 3 = 440.001);
+#X obj 134 142 joystick 3;
+#X text 14 9 spiral_joystick;
+#X connect 0 0 16 1;
+#X connect 1 0 21 0;
+#X connect 2 0 21 0;
+#X connect 3 0 2 0;
+#X connect 5 0 21 0;
+#X connect 6 0 7 0;
+#X connect 7 0 13 0;
+#X connect 9 0 7 1;
+#X connect 10 0 9 0;
#X connect 11 0 10 0;
-#X connect 12 0 11 0;
-#X connect 14 0 9 0;
-#X connect 14 1 9 1;
-#X connect 18 0 12 0;
-#X connect 18 1 25 0;
-#X connect 21 0 0 0;
-#X connect 23 0 7 0;
-#X connect 23 0 22 0;
-#X connect 25 0 23 0;
+#X connect 13 0 8 0;
+#X connect 13 1 8 1;
+#X connect 16 0 11 0;
+#X connect 16 1 19 0;
+#X connect 17 0 6 0;
+#X connect 19 0 17 0;
+#X connect 21 0 16 0;
+#X connect 21 1 0 0;
+#X connect 21 2 13 1;