aboutsummaryrefslogtreecommitdiff
path: root/input_noticer-help.pd
diff options
context:
space:
mode:
Diffstat (limited to 'input_noticer-help.pd')
-rw-r--r--input_noticer-help.pd63
1 files changed, 63 insertions, 0 deletions
diff --git a/input_noticer-help.pd b/input_noticer-help.pd
new file mode 100644
index 0000000..38da2ab
--- /dev/null
+++ b/input_noticer-help.pd
@@ -0,0 +1,63 @@
+#N canvas 0 25 1367 915 10;
+#X obj 49 93 print A;
+#X obj 49 70 route 0 1;
+#X obj 107 140 print C;
+#X obj 78 116 print B;
+#X obj 49 10 loadbang;
+#X obj 49 45 input_noticer joystick "SideWinder Dual Strike";
+#X obj 110 10 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X text 549 12 INSTANTIATION ARGUMENTS:;
+#X text 549 31 1) device type: for instance \, as I have entered here:
+joystick;
+#X text 658 182 This external takes the "joystick" that I have entered
+\, and creates "input.joystick" from it \, and then asks HAL to look
+for all devices that have that capability.;
+#X text 659 275 In linux \, this references the HAL info.product field
+for the device. The input_noticer will iterate through all devices
+that HAL returns with the given Capabilities field (see above) \, and
+look for the user-supplied substring. The corresponding linux.device_file
+field is returned \, which will be something like "/dev/input/event6".
+This can be used to connect to objects like [hid].;
+#X text 127 10 <- BANG to scan for devices \, outputs any that are
+found;
+#X text 59 469 USING input_noticer output:;
+#X text 63 489 Output from input_noticer is a list \, like 0 \, /dev/input/event5
+1 \, /dev/input/event6;
+#X text 61 535 Use [route] to separate the messages \, and you'll have
+just the second list element \, like /dev/input/event5;
+#X text 109 611 5 means /dev/input/event5;
+#X text 661 60 In linux \, this references the HAL (Hardware Abstraction
+Layer) Capabilities field for the device. You can have a look at what
+your favorite device has by using the HAL Device Manager \, and look
+at the "Device" tab of the most specific entry for your input device.
+In my case \, the device tree for my joystick looks like: "SideWinder
+Dual Strike" -> "USB Hid Interface" -> "Microsoft SideWinder Dual Strike
+USB Version 1.0". Capabilities listed are: input \, input.joystick
+;
+#X text 549 236 2) product substring: for instance \, as I have entered
+here: "SideWinder Dual Strike";
+#X text 61 568 To feed this to [hid] \, you'll need to strip the number
+from the end \, since [hid] currently wants just the number \, and
+interprets the number as follows:;
+#X obj 7 166 parseeventnodenum;
+#X floatatom 7 188 5 0 0 0 - - -;
+#X obj 37 280 hid 0;
+#X msg 37 236 open \$1;
+#X obj 37 301 print joystick;
+#X obj 7 207 t b f;
+#X msg -8 235 start;
+#X connect 1 0 0 0;
+#X connect 1 0 19 0;
+#X connect 1 1 3 0;
+#X connect 1 2 2 0;
+#X connect 4 0 5 0;
+#X connect 5 0 1 0;
+#X connect 6 0 5 0;
+#X connect 19 0 20 0;
+#X connect 20 0 24 0;
+#X connect 21 0 23 0;
+#X connect 22 0 21 0;
+#X connect 24 0 25 0;
+#X connect 24 1 22 0;
+#X connect 25 0 21 0;