aboutsummaryrefslogtreecommitdiff
path: root/input_noticer-help.pd
blob: 38da2abf7a67ed7d03b388e63844ae3bf404a417 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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;