diff options
-rw-r--r-- | doc/pddp/all_about_hid.pd | 160 | ||||
-rw-r--r-- | doc/pddp/all_about_hid_mapping.pd | 112 |
2 files changed, 154 insertions, 118 deletions
diff --git a/doc/pddp/all_about_hid.pd b/doc/pddp/all_about_hid.pd index e45fb7a6..f4338124 100644 --- a/doc/pddp/all_about_hid.pd +++ b/doc/pddp/all_about_hid.pd @@ -1,27 +1,27 @@ -#N canvas 215 37 866 651 10; -#X obj 3 3 cnv 15 850 20 empty empty all_about_hid 20 10 1 18 -233017 +#N canvas 281 174 864 594 10; +#X obj 5 2 cnv 15 850 20 empty empty all_about_hid 20 10 1 18 -233017 -66577 0; -#X obj 819 4 pddp; -#X text 10 36 "HID" stands for "Human Interface Device". A HID is any +#X obj 821 3 pddp; +#X text 5 29 "HID" stands for "Human Interface Device". A HID is any device that is meant to allow humans to interact with a computer. Usually \, HIDs are mice \, keyboards \, joysticks \, tablets \, gamepads \, etc. There a number of unusual HIDs \, like the Griffin PowerMate on the low end \, or the SensAble PHANTOM 6DOF on the high end.; -#X obj 610 415 gemmouse; -#X text 5 241 KEYBOARDS; -#X obj 39 270 key; -#X obj 71 270 keyup; -#X obj 446 415 gemkeyboard; -#X obj 674 415 gemtablet; -#X obj 745 415 gemorb; -#X obj 532 415 gemkeyname; -#X obj 116 270 keyname; -#X text 16 598 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> +#X obj 595 437 gemmouse; +#X text 0 214 KEYBOARDS; +#X obj 34 233 key; +#X obj 66 233 keyup; +#X obj 431 437 gemkeyboard; +#X obj 659 437 gemtablet; +#X obj 730 437 gemorb; +#X obj 517 437 gemkeyname; +#X obj 111 233 keyname; +#X text 16 557 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; -#X text 233 612 released under the GNU GPL; -#X text 439 599 $Revision: 1.2 $$Date: 2004-11-27 20:05:25 $; -#X text 440 612 $Author: eighthave $; -#N canvas 0 22 627 431 deprecated 0; +#X text 233 571 released under the GNU GPL; +#X text 429 558 $Revision: 1.3 $$Date: 2004-11-28 23:58:40 $; +#X text 430 571 $Author: eighthave $; +#N canvas 0 22 643 447 deprecated 0; #X text 35 38 The use of these objects is deprecated since the functionality that they provide is available in the [hid] object \, which is a unified \, cross-platform approach.; @@ -29,72 +29,98 @@ that they provide is available in the [hid] object \, which is a unified #X text 22 148 CYCLONE; #X obj 27 181 MouseState; #X obj 108 181 mousefilter; -#X obj 105 311 linuxmouse; -#X obj 184 311 linuxjoystick; -#X obj 27 311 linuxevent; +#X obj 24 311 linuxjoystick; #X text 22 346 J. SARLO'S [joystick]; #X text 31 374 only works with Windows and GNU/Linux; -#X text 26 293 only works with Linux kernels; -#X text 22 278 LINUXEVENT; #X text 26 163 meant for porting Max/MSP patches to Pd.; #X text 21 218 RAWHID; #X text 28 230 incomplete \, first stab at creating [hid]; #X obj 30 248 rawmouse; #X obj 94 248 rawjoystick; -#X restore 443 532 pd deprecated HID objects; -#X text 440 393 USING HIDs WITH GEM; -#X text 450 468 There are quite a few objects that support HIDs from +#X obj 125 311 linuxevent; +#X text 26 293 These have been replaced by [linuxhid] and [joystick] +; +#X text 22 278 LINUXEVENT; +#X restore 438 533 pd deprecated HID objects; +#X text 425 415 USING HIDs WITH GEM; +#X text 435 478 There are quite a few objects that support HIDs from many different sources. Here are a bunch whose functionality is available in the [hid] object \, so it is recommended that you do not use these objects any more.; -#X text 440 153 REFRESH RATES; -#X text 451 175 device type; -#X text 727 159 latency; -#X text 780 175 (Hz); -#X text 700 175 (ms); -#X text 450 185 -------------------------------------------------------- +#X text 436 176 device type; +#X text 712 160 latency; +#X text 765 176 (Hz); +#X text 685 176 (ms); +#X text 435 186 -------------------------------------------------------- ; -#X text 700 200 15.5; -#X text 780 200 64; -#X text 450 215 USB mice on Windows; -#X text 700 215 8-10; -#X text 780 215 100-125; -#X text 450 230 USB mice on GNU/Linux; -#X text 700 230 1-10; -#X text 780 230 100-1000; -#X text 450 245 USB wireless mice; -#X text 700 245 12-20; -#X text 780 245 50-80; -#X text 450 260 PS/2 mouse; -#X text 700 260 5-25; -#X text 780 260 40-200; -#X text 10 301 - these objects are quite simple to use \, but are limited -to the 'printing' characters.; -#X text 450 65 While it does not make sense to use a poll rate that +#X text 685 201 15.5; +#X text 765 201 64; +#X text 685 216 8-10; +#X text 765 216 100-125; +#X text 435 231 USB mice on GNU/Linux; +#X text 685 231 1-10; +#X text 765 231 100-1000; +#X text 435 246 USB wireless mice; +#X text 685 246 12-20; +#X text 765 246 50-80; +#X text 434 334 While it does not make sense to use a poll rate that is much faster than the refresh rate of the device \, it does make sense to make the poll rate somewhat faster. If you poll at the same rate as the device refreshes \, you could get up to double the latency \, i.e. if [hid] polls right before the event is reported.; -#X text 440 451 DEPRECATED OBJECTS; -#X text 440 40 POLLING AND LATENCY; -#X text 10 124 When talking about HIDs \, "DOF" is often mentioned. +#X text 425 461 DEPRECATED OBJECTS; +#X text 5 117 When talking about HIDs \, "DOF" is often mentioned. "DOF" stands for "degrees of freedom". A degree of freedom is one dimension in which that HID can give information. A mouse generally had 2DOFs: X-axis and Y-axis \, though a wheel could be considered another DOF. The PHANTOM 6DOF device has six degrees of freedom: X \, Y \, Z movement \; X \, Y \, Z rotation.; -#X text 12 336 - [keyname] reports Shift \, Ctrl \, Alt \, Meta \, -etc.; -#X text 8 379 GENERAL HIDs; -#X obj 85 405 mouse; -#X obj 128 405 joystick; -#X obj 192 405 tablet; -#X obj 242 405 gamepad; -#X text 450 200 ADB (Apple Desktop Bus) devices; -#X text 450 289 P5 Glove; -#X text 700 289 22; -#X text 780 289 45; -#X text 450 275 Serial mouse; -#X text 780 275 40; -#X text 700 275 25; -#X obj 21 405 keyboard; +#X text 0 325 GENERAL HIDs; +#X obj 76 424 mouse; +#X obj 119 424 joystick; +#X obj 183 424 tablet; +#X obj 233 424 gamepad; +#X text 435 201 ADB (Apple Desktop Bus) devices; +#X text 435 303 P5 Glove; +#X text 685 303 22; +#X text 765 303 45; +#X text 765 289 40; +#X text 685 289 25; +#X obj 12 424 keyboard; +#X text 685 275 5-25; +#X text 765 275 40-200; +#X text 435 261 Generic USB Devices; +#X text 685 261 10; +#X text 765 261 100; +#X text 435 275 PS/2 mice; +#X text 435 289 Serial mice; +#X text 425 23 LATENCY AND POLLING; +#X text 425 156 REFRESH RATES OF VARIOUS DEVICES; +#X obj 11 347 hid; +#X text 11 369 Basically any device that is supported by the various +HID layers on each OS is supported by the [hid] object. So any of those +devices can be used as controllers with Pd. There already exists a +number of objects for more common HIDs:; +#X text 434 39 An essential detail to making an usable instrument is +the latency between when you perform an action and the sound it produces. +If the latency is too large \, it will make the instrument annoying +to play \, or even unplayable. So the aim is to have as low latency +as possible. To put it into perspective \, if you were playing an electric +guitar and the amp was 3m (10ft) away from you \, there would be a +9ms delay between when you plucked the string and when you heard the +sound.; +#X text 435 314 -------------------------------------------------------- +; +#X text 3 453 PLATFORM-SPECIFIC HID OBJECTS; +#X obj 90 528 linuxmouse; +#X text 15 470 To get full access to some devices \, you need to use +the platform-specific objects. The objects have dummy versions on the +other platforms so that you open the patches on other platforms and +edit them without breaking them.; +#X text 5 254 These objects are quite simple to use \, but are limited. +They only receive key events when Pd has focus \; they output alternating +1s and 0s to represent auto-repeat \; [key] and [heyup] are limited +to the 'printing' characters. [keyname] reports Shift \, Ctrl \, Alt +\, Meta \, etc.; +#X obj 12 528 linuxhid; +#X text 435 216 USB mice on Windows or MacOS X; diff --git a/doc/pddp/all_about_hid_mapping.pd b/doc/pddp/all_about_hid_mapping.pd index 3e211cb3..352e8473 100644 --- a/doc/pddp/all_about_hid_mapping.pd +++ b/doc/pddp/all_about_hid_mapping.pd @@ -1,45 +1,45 @@ -#N canvas 230 123 871 499 10; +#N canvas 304 56 868 550 10; #N canvas 0 22 450 300 graph1 0; #X array cuberoot 100 float 0; #X coords 0 1 99 0 100 100 1; -#X restore 426 61 graph; +#X restore 516 61 graph; #N canvas 0 22 450 300 graph5 0; -#X array exponent 100 float 0; +#X array exponential 100 float 0; #X coords 0 1 99 0 100 100 1; -#X restore 741 269 graph; +#X restore 731 269 graph; #N canvas 0 22 450 300 graph1 0; #X array cube 100 float 0; #X coords 0 1 99 0 100 100 1; -#X restore 741 61 graph; +#X restore 731 61 graph; #N canvas 0 22 450 300 graph5 0; #X array square 100 float 0; #X coords 0 1 99 0 100 100 1; -#X restore 741 165 graph; -#X obj 54 152 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +#X restore 731 165 graph; +#X obj 60 152 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; -#X floatatom 32 227 5 0 0 0 - - -; -#X floatatom 75 226 5 0 0 0 - - -; -#X floatatom 120 226 5 0 0 0 - - -; +#X floatatom 38 227 5 0 0 0 - - -; +#X floatatom 81 226 5 0 0 0 - - -; +#X floatatom 126 226 5 0 0 0 - - -; #N canvas 0 22 450 300 graph1 0; #X array logarithmic 100 float 0; #X coords 0 1 99 0 100 100 1; -#X restore 426 269 graph; +#X restore 516 269 graph; #N canvas 0 22 450 300 graph1 0; #X array squareroot 100 float 0; #X coords 0 1 99 0 100 100 1; -#X restore 426 165 graph; -#X obj 166 253 hid_rel2abs; -#X msg 178 224 reset; -#X floatatom 170 288 5 0 0 0 - - -; -#X obj 75 244 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X restore 516 165 graph; +#X obj 172 253 hid_rel2abs; +#X msg 184 224 reset; +#X floatatom 176 288 5 0 0 0 - - -; +#X obj 81 244 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 119 244 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 125 244 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 32 251 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 38 251 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X msg 96 165 poll 50; -#X floatatom 44 343 5 0 0 0 - - -; -#X obj 43 281 hid_smooth; +#X msg 102 165 poll 50; +#X floatatom 50 343 5 0 0 0 - - -; +#X obj 49 281 hid_smooth; #N canvas 27 65 573 553 draw_arrays 0; #X msg 77 62 bang; #X obj 77 83 until; @@ -50,7 +50,7 @@ #X obj 106 127 mod 100; #X obj 183 345 tabwrite logarithmic; #X obj 77 170 t f f; -#X obj 183 486 tabwrite exponent; +#X obj 183 486 tabwrite exponential; #X obj 114 197 s array_index; #X obj 443 267 r array_index; #X obj 183 439 tabwrite square; @@ -95,36 +95,46 @@ #X connect 22 0 15 0; #X connect 23 0 12 0; #X connect 24 0 13 0; -#X restore 573 30 pd draw_arrays; -#X obj 621 316 hid_exp; -#X obj 289 317 hid_log; -#X obj 74 187 mouse 0; -#X msg 80 113 open 1; -#X msg 90 139 open 2; -#X obj 2 2 cnv 15 850 20 empty empty all_about_hid_mapping 20 10 1 +#X restore 563 30 pd draw_arrays; +#X obj 650 316 hid_exp; +#X obj 411 317 hid_log; +#X obj 80 187 mouse 0; +#X msg 86 113 open 1; +#X msg 96 139 open 2; +#X obj 5 2 cnv 15 850 20 empty empty all_about_hid_mapping 20 10 1 18 -233017 -66577 0; -#X obj 818 3 pddp; -#X obj 125 329 hid_graph; -#X floatatom 124 476 5 0 0 0 - - -; -#X obj 15 41 notescale; -#X obj 624 104 pow 3; -#X obj 284 100 pow 0.333333; -#X text 614 173 square; -#X text 617 82 cube; -#X text 279 175 square root; -#X text 275 78 cube root; -#X text 280 299 logarithmic; -#X obj 622 203 pow 2; -#X obj 288 194 pow 0.5; -#X obj 288 213 sqrt; -#X obj 112 43 hid_centered; -#X obj 284 123 hid_cuberoot; -#X obj 624 130 hid_cube; -#X obj 622 224 hid_square; -#X obj 289 235 hid_squareroot; -#X text 612 297 exponential; -#X obj 29 68 buttongate; -#X obj 125 66 keygate; +#X obj 821 3 pddp; +#X obj 156 329 hid_graph; +#X floatatom 130 476 5 0 0 0 - - -; +#X obj 13 40 notescale; +#X obj 653 104 pow 3; +#X obj 406 100 pow 0.333333; +#X text 643 173 square; +#X text 646 82 cube; +#X text 401 175 square root; +#X text 397 78 cube root; +#X text 402 299 logarithmic; +#X obj 651 203 pow 2; +#X obj 410 194 pow 0.5; +#X obj 410 214 sqrt; +#X obj 110 33 hid_centered; +#X obj 406 123 hid_cuberoot; +#X obj 653 130 hid_cube; +#X obj 651 224 hid_square; +#X obj 411 235 hid_squareroot; +#X text 641 297 exponential; +#X obj 12 64 buttongate; +#X obj 12 83 keygate; +#X text 341 393 - CURVE TEXT IDEAS; +#X text 370 419 - amplitude is generally perceived on a logarithmic +scale; +#X text 371 443 - pitch is perceived on [some kind of scale]; +#X obj 110 52 hid_invert; +#X text 22 500 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> +; +#X text 239 514 released under the GNU GPL; +#X text 445 501 $Revision: 1.4 $$Date: 2004-11-28 23:58:41 $; +#X text 446 514 $Author: eighthave $; #X connect 4 0 22 0; #X connect 5 0 15 0; #X connect 5 0 18 0; |