aboutsummaryrefslogtreecommitdiff
path: root/hid2deg.pd
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-04-13 03:47:20 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-04-13 03:47:20 +0000
commit480b757207c659f0c3e06277e29733b52d46bcdc (patch)
tree63b412810be7243aa2259207b21623edb7eba400 /hid2deg.pd
parent132e0237c9d00eab8c3cb7a45bdc493c0166373a (diff)
- created a suite of hid objects for using polar coordinates and converting
between the range of 0-1 and degrees/radians. - made two joystick/polar examples - added some pretty colors to help patches svn path=/trunk/externals/hcs/hid/; revision=2754
Diffstat (limited to 'hid2deg.pd')
-rw-r--r--hid2deg.pd31
1 files changed, 31 insertions, 0 deletions
diff --git a/hid2deg.pd b/hid2deg.pd
new file mode 100644
index 0000000..af40bca
--- /dev/null
+++ b/hid2deg.pd
@@ -0,0 +1,31 @@
+#N canvas 163 40 444 356 10;
+#X obj 88 30 inlet;
+#X obj 89 264 outlet;
+#X obj 88 56 min 1;
+#X obj 88 74 max 0;
+#X text 133 63 its a [hid] object \, so limit input range;
+#X text 232 311 released under the GNU GPL;
+#X text 15 297 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at>
+;
+#X text 19 9 [hid2deg];
+#X text 129 28 input range: 0 to 1 \, 0 = east/right;
+#X text 143 264 output range: 0 to 360 \, 0 = north/top;
+#X obj 88 100 * 360;
+#X text 162 189 % is an int operation;
+#X text 169 207 this saves accuracy;
+#X obj 88 148 abs;
+#X obj 88 123 - 450;
+#X text 131 122 <- rotate zero to north;
+#X text 130 148 <- change direction of rotation;
+#X obj 89 202 % 3.6e+07;
+#X obj 89 223 / 100000;
+#X obj 89 181 * 100000;
+#X connect 0 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 10 0;
+#X connect 10 0 14 0;
+#X connect 13 0 19 0;
+#X connect 14 0 13 0;
+#X connect 17 0 18 0;
+#X connect 18 0 1 0;
+#X connect 19 0 17 0;