diff options
36 files changed, 535 insertions, 467 deletions
diff --git a/doc/buttongate-help.pd b/doc/buttongate-help.pd index 23091e6..ae6c733 100644 --- a/doc/buttongate-help.pd +++ b/doc/buttongate-help.pd @@ -1,5 +1,6 @@ #N canvas 345 96 463 514 10; -#X obj 5 2 cnv 15 450 20 empty empty [buttongate] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty buttongate 2 11 1 18 -233017 -66577 0; #X obj 160 287 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; @@ -9,7 +10,7 @@ #X text 27 470 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 484 released under the GNU GPL; -#X obj 223 417 pddp_open all_about_hid; +#X obj 223 417 pddp/pddplink ../all_about_hid.pd -text all_about_hid; #X text 114 418 For more info:; #X text 17 38 [buttongate] is a simple gate controlled by a HID button. You must specify the device and the button which controls the gate. @@ -29,7 +30,7 @@ optional control messages to the HID.; #X text 23 348 Keyboard keys can also be used to control this object. You can get the [hid] keycode from here:; #X obj 324 368 ev_key-list; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 10 0; diff --git a/doc/deg2hid-help.pd b/doc/deg2hid-help.pd index 9b3f966..ff8b09d 100644 --- a/doc/deg2hid-help.pd +++ b/doc/deg2hid-help.pd @@ -1,14 +1,15 @@ #N canvas 82 386 483 323 10; -#X obj 5 2 cnv 15 450 20 empty empty [deg2hid] 2 11 1 18 -233017 -66577 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty deg2hid 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 254 269 released under the GNU GPL; #X text 185 228 For more info:; -#X obj 289 226 pddp_open all_about_hid_mapping; +#X obj 289 226 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X text 40 254 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at> ; #X text 300 168 related objects:; -#X obj 333 184 rad2hid; +#X obj 333 184 hid/rad2hid; #X floatatom 56 203 7 0 0 1 - - -; #X obj 59 103 hsl 300 15 -720 720 0 0 empty empty degrees 6 7 1 10 -262131 -1 -1 3100 0; @@ -16,9 +17,9 @@ #X text 26 34 This object converts numbers from the [hid] range (0 to 1) to radians (-pi to pi) with the 0's lining up in the same place. ; -#X obj 274 184 hid2rad; -#X obj 392 184 hid2deg; -#X obj 56 168 deg2hid; +#X obj 274 184 hid/hid2rad; +#X obj 392 184 hid/hid2deg; +#X obj 56 168 hid/deg2hid; #X connect 9 0 10 0; #X connect 9 0 14 0; #X connect 14 0 8 0; diff --git a/doc/hid-help.pd b/doc/hid-help.pd index abf4af8..c1550f0 100644 --- a/doc/hid-help.pd +++ b/doc/hid-help.pd @@ -1,9 +1,9 @@ -#N canvas 369 41 715 555 10; +#N canvas 366 51 715 555 10; #X floatatom 27 439 5 0 0 0 - - -; #X floatatom 83 439 5 0 0 0 - - -; #X floatatom 63 395 6 0 0 0 - - -; -#X obj 191 164 tgl 35 0 empty empty empty 0 -6 0 8 -24198 -1 -1 25 -25; +#X obj 191 164 tgl 35 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 25 +; #X floatatom 571 340 12 0 0 1 value - -; #X symbolatom 531 356 15 0 0 1 event_code - -; #X symbolatom 492 372 15 0 0 1 event_type - -; @@ -295,7 +295,7 @@ btn_8 btn_9 btn_10 btn_11 btn_12 btn_13 btn_14 btn_15; 1; #X msg 25 155 debug 0; #X msg 298 145 info; -#N canvas 743 25 411 235 see 0; +#N canvas 752 103 411 235 see 0; #N canvas 108 318 543 264 route 0; #X obj 27 14 inlet; #X obj 72 226 outlet; @@ -359,7 +359,7 @@ type vendorID productID; #X connect 2 0 0 0; #X connect 2 0 3 0; #X restore 420 271 pd see device info; -#N canvas 0 22 380 450 open 0; +#N canvas 553 77 380 450 open 0; #X obj 77 61 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1 -1 0; #X msg 78 81 open mouse \$1; @@ -402,7 +402,7 @@ type vendorID productID; #X connect 16 0 5 0; #X connect 17 0 5 0; #X restore 203 59 pd open by device type; -#N canvas 88 102 470 320 open 0; +#N canvas 796 51 470 320 open 0; #X text 217 82 Gravis/Destroyer Tiltpad; #X msg 76 81 open 0x047D 0x4008; #X msg 73 53 open 0x046d 0xc01d; @@ -412,9 +412,12 @@ type vendorID productID; IDs (it is not case sensitive):; #X text 221 111 Overtone CUI v1.0; #X msg 80 110 open 0x1043 0x0015; +#X msg 83 136 open 0x06a3 0xff12; +#X text 221 134 Saitek Cyborgforce; #X connect 1 0 4 0; #X connect 2 0 4 0; #X connect 7 0 4 0; +#X connect 8 0 4 0; #X restore 174 37 pd open by vendor/product ID; #N canvas 114 93 467 346 test 0; #X obj 144 45 inlet; @@ -473,12 +476,13 @@ IDs (it is not case sensitive):; #X connect 10 0 8 0; #X coords 0 -1 1 1 165 17 1 60 60; #X restore 25 134 pd serin; -#X msg 262 114 open 6; +#X msg 262 114 open 0; +#X obj 249 300 pddp/print; #N canvas 162 133 570 420 serin 0; -#X obj 209 61 cnv 15 15 15 empty \$0-open-canvas 6 4 8 0 14 -233017 +#X obj 286 61 cnv 15 30 15 empty \$0-open-canvas 0 4 8 0 14 -233017 +-1 0; +#X obj 60 61 hradio 15 1 1 15 empty empty empty 0 -6 0 8 -225271 -1 -1 0; -#X obj 60 61 hradio 15 1 1 10 empty empty empty 0 -6 0 8 -225271 -1 --1 6; #X obj 60 13 inlet; #X msg 200 202 label \$1; #X obj 200 180 makefilename %d; @@ -500,9 +504,8 @@ IDs (it is not case sensitive):; #X connect 8 1 9 0; #X connect 9 0 7 0; #X connect 10 0 8 0; -#X coords 0 -1 1 1 165 17 1 60 60; -#X restore 262 93 pd serin; -#X obj 249 300 pddp/print; +#X coords 0 -1 1 1 257 17 1 60 60; +#X restore 262 92 pd serin; #X connect 3 0 29 0; #X connect 9 0 10 1; #X connect 10 0 9 0; @@ -524,7 +527,7 @@ IDs (it is not case sensitive):; #X connect 29 0 20 0; #X connect 29 0 38 0; #X connect 29 0 75 0; -#X connect 29 0 81 0; +#X connect 29 0 80 0; #X connect 29 1 72 0; #X connect 36 0 0 0; #X connect 36 1 1 0; @@ -567,4 +570,4 @@ IDs (it is not case sensitive):; #X connect 76 0 29 0; #X connect 78 0 70 0; #X connect 79 0 29 0; -#X connect 80 0 79 0; +#X connect 81 0 79 0; diff --git a/doc/hid2deg-help.pd b/doc/hid2deg-help.pd index 54aff31..addef1a 100644 --- a/doc/hid2deg-help.pd +++ b/doc/hid2deg-help.pd @@ -1,21 +1,22 @@ #N canvas 589 387 483 323 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid2deg] 2 11 1 18 -233017 -66577 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid2deg 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 254 269 released under the GNU GPL; #X text 185 228 For more info:; -#X obj 289 226 pddp_open all_about_hid_mapping; +#X obj 289 226 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X text 40 254 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at> ; #X text 300 168 related objects:; -#X obj 333 184 rad2hid; -#X obj 392 184 deg2hid; +#X obj 333 184 hid/rad2hid; +#X obj 392 184 hid/deg2hid; #X floatatom 69 185 7 0 0 1 degrees - -; #X obj 72 85 hsl 128 15 0 1 0 0 empty empty hid 6 7 1 10 -262131 -1 -1 500 0; #X floatatom 95 115 5 0 0 0 - - -; -#X obj 274 184 hid2rad; -#X obj 69 150 hid2deg; +#X obj 274 184 hid/hid2rad; +#X obj 69 150 hid/hid2deg; #X text 26 34 This object converts numbers from the [hid] range (0 to 1) to degrees (0 to 360) with the 0 being north.; #X connect 10 0 11 0; diff --git a/doc/hid2rad-help.pd b/doc/hid2rad-help.pd index b04fe68..034587b 100644 --- a/doc/hid2rad-help.pd +++ b/doc/hid2rad-help.pd @@ -1,17 +1,18 @@ #N canvas 633 307 471 311 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid2rad] 2 11 1 18 -233017 -66577 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid2rad 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 254 269 released under the GNU GPL; #X text 185 228 For more info:; -#X obj 289 226 pddp_open all_about_hid_mapping; +#X obj 289 226 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X text 40 254 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at> ; #X text 300 168 related objects:; -#X obj 273 184 rad2hid; -#X obj 332 184 deg2hid; -#X obj 391 184 hid2deg; -#X obj 69 150 hid2rad; +#X obj 273 184 hid/rad2hid; +#X obj 332 184 hid/deg2hid; +#X obj 391 184 hid/hid2deg; +#X obj 69 150 hid/hid2rad; #X floatatom 69 185 9 0 0 1 radians - -; #X obj 72 85 hsl 128 15 0 1 0 0 empty empty hid 6 7 1 10 -262131 -1 -1 0 0; diff --git a/doc/hid_average-help.pd b/doc/hid_average-help.pd index 8133973..c43037f 100644 --- a/doc/hid_average-help.pd +++ b/doc/hid_average-help.pd @@ -1,11 +1,12 @@ #N canvas 135 352 479 396 10; +#X declare -lib hid; #X text 27 340 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 354 released under the GNU GPL; #X floatatom 101 195 5 0 0 0 - - -; #X floatatom 101 251 5 0 0 0 - - -; #X text 98 303 For more info:; -#X obj 202 301 pddp_open all_about_hid_mapping; +#X obj 202 301 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X obj 193 194 hsl 85 18 0.1 10 1 1 empty empty average_count 0 9 1 12 -228992 -1 -1 3500 0; #X floatatom 189 223 5 0 0 0 - - -; @@ -14,10 +15,10 @@ -1 -1 0 1; #X obj 104 164 hsl 250 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; -#X obj 5 2 cnv 15 450 20 empty empty [hid_average] 2 11 1 18 -233017 +#X obj 5 2 cnv 15 450 20 empty empty hid_average 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; -#X obj 101 221 hid_average; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; +#X obj 101 221 hid/hid_average; #X text 18 36 Smooths a stream of numbers using weighted averaging. By default \, the average is the last 10 values. You can set this using the right inlet.; diff --git a/doc/hid_centered-help.pd b/doc/hid_centered-help.pd index 5e4173d..eef755e 100644 --- a/doc/hid_centered-help.pd +++ b/doc/hid_centered-help.pd @@ -1,13 +1,14 @@ #N canvas 389 382 468 357 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_centered] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_centered 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 27 320 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 334 released under the GNU GPL; #X text 98 291 For more info:; -#X obj 202 289 pddp_open all_about_hid_mapping; -#X obj 102 234 hid_centered; +#X obj 202 289 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; +#X obj 102 234 hid/hid_centered; #X obj 137 105 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 1 1; #X msg 200 138 open \$1; @@ -16,7 +17,7 @@ #X obj 174 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 obj 157 170 joystick 0; -#X obj 205 235 hid_centered; +#X obj 205 235 hid/hid_centered; #X floatatom 205 256 5 0 0 0 Y - -; #X floatatom 102 255 5 0 0 0 X - -; #X floatatom 205 216 5 0 0 0 Y - -; diff --git a/doc/hid_cube-help.pd b/doc/hid_cube-help.pd index 00dec9e..8bca8b0 100644 --- a/doc/hid_cube-help.pd +++ b/doc/hid_cube-help.pd @@ -1,19 +1,20 @@ #N canvas 556 145 472 353 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_graph] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_graph 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 27 300 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 314 released under the GNU GPL; #X text 98 271 For more info:; -#X obj 202 269 pddp_open all_about_hid_mapping; +#X obj 202 269 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X floatatom 25 123 8 0 0 0 - - -; #X floatatom 25 184 8 0 0 0 - - -; #X obj 28 201 hsl 200 15 0 1 0 0 empty empty empty 22 8 1 12 -262144 -1 -1 0 1; #X obj 28 103 hsl 200 15 0 1 0 0 empty empty empty 22 8 1 12 -261681 -1 -1 0 1; -#X obj 25 153 hid_cube; +#X obj 25 153 hid/hid_cube; #X text 15 34 This object maps the input range to a cube curve \, i.e. [pow 3] or "X to power of 3".; #N canvas 0 22 450 300 graph1 0; @@ -34,7 +35,7 @@ #X obj 57 13 loadbang; #X obj 57 207 / 100; #X text 99 207 [hid] output range: 0 to 1; -#X obj 56 233 hid_cube; +#X obj 56 233 hid/hid_cube; #X obj 56 283 tabwrite hid_cube; #X connect 0 0 1 0; #X connect 1 0 3 0; diff --git a/doc/hid_cuberoot-help.pd b/doc/hid_cuberoot-help.pd index 4514224..03c202b 100644 --- a/doc/hid_cuberoot-help.pd +++ b/doc/hid_cuberoot-help.pd @@ -1,19 +1,20 @@ #N canvas 416 140 464 319 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_cuberoot] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_cuberoot 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 27 280 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 294 released under the GNU GPL; #X text 98 251 For more info:; -#X obj 202 249 pddp_open all_about_hid_mapping; +#X obj 202 249 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X floatatom 25 123 8 0 0 0 - - -; #X floatatom 25 184 8 0 0 0 - - -; #X obj 28 201 hsl 200 15 0 1 0 0 empty empty empty 22 8 1 12 -262144 -1 -1 0 1; #X obj 28 103 hsl 200 15 0 1 0 0 empty empty empty 22 8 1 12 -261681 -1 -1 0 1; -#X obj 25 153 hid_cuberoot; +#X obj 25 153 hid/hid_cuberoot; #N canvas 0 22 450 300 graph1 0; #X array hid_cuberoot 100 float 0; #X coords 0 1 99 0 100 100 1; @@ -32,7 +33,7 @@ #X obj 57 13 loadbang; #X obj 57 207 / 100; #X text 99 207 [hid] output range: 0 to 1; -#X obj 56 233 hid_cuberoot; +#X obj 56 233 hid/hid_cuberoot; #X obj 56 283 tabwrite hid_cuberoot; #X connect 0 0 1 0; #X connect 1 0 3 0; diff --git a/doc/hid_exp-help.pd b/doc/hid_exp-help.pd index 1dd0541..323165b 100644 --- a/doc/hid_exp-help.pd +++ b/doc/hid_exp-help.pd @@ -1,19 +1,20 @@ #N canvas 567 104 472 353 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_exp] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_exp 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 27 300 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 314 released under the GNU GPL; #X text 98 271 For more info:; -#X obj 202 269 pddp_open all_about_hid_mapping; +#X obj 202 269 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X floatatom 25 123 8 0 0 0 - - -; #X floatatom 25 184 8 0 0 0 - - -; #X obj 28 201 hsl 200 15 0 1 0 0 empty empty empty 22 8 1 12 -262144 -1 -1 0 1; #X obj 28 103 hsl 200 15 0 1 0 0 empty empty empty 22 8 1 12 -261681 -1 -1 0 1; -#X obj 25 153 hid_exp; +#X obj 25 153 hid/hid_exp; #N canvas 0 22 450 300 graph1 0; #X array hid_exp 100 float 0; #X coords 0 1 99 0 100 100 1; @@ -32,7 +33,7 @@ #X obj 57 13 loadbang; #X obj 57 207 / 100; #X text 99 207 [hid] output range: 0 to 1; -#X obj 56 233 hid_exp; +#X obj 56 233 hid/hid_exp; #X obj 56 283 tabwrite hid_exp; #X connect 0 0 1 0; #X connect 1 0 3 0; diff --git a/doc/hid_graph-help.pd b/doc/hid_graph-help.pd index 21155dc..be2750b 100644 --- a/doc/hid_graph-help.pd +++ b/doc/hid_graph-help.pd @@ -1,12 +1,13 @@ #N canvas 61 248 495 470 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_graph] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_graph 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 27 410 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 424 released under the GNU GPL; #X text 98 381 For more info:; -#X obj 202 379 pddp_open all_about_hid_mapping; +#X obj 202 379 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X msg 19 150 reset; #X floatatom 95 163 5 0 0 0 - - -; #X floatatom 94 314 5 0 0 0 - - -; @@ -14,7 +15,7 @@ -1 -1 0 1; #X obj 98 143 hsl 250 15 0 1 0 0 empty empty empty 22 8 1 12 -261681 -1 -1 0 1; -#X obj 94 187 hid_graph; +#X obj 94 187 hid/hid_graph; #X text 18 33 This object allows you to draw an arbitrary curve \, which is then applied to the input range. To change the curve \, click anywhere on the black diagonal line and start dragging.; diff --git a/doc/hid_invert-help.pd b/doc/hid_invert-help.pd index 5203a36..29734f4 100644 --- a/doc/hid_invert-help.pd +++ b/doc/hid_invert-help.pd @@ -1,20 +1,21 @@ #N canvas 380 628 469 312 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_invert] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_invert 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 27 270 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 284 released under the GNU GPL; #X floatatom 153 90 5 0 0 0 - - -; #X floatatom 153 166 5 0 0 0 - - -; -#X obj 153 126 hid_invert; +#X obj 153 126 hid/hid_invert; #X obj 156 71 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X obj 156 183 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X text 27 43 Inverts the stream of numbers.; #X text 98 233 For more info:; -#X obj 202 231 pddp_open all_about_hid_mapping; +#X obj 202 231 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X connect 4 0 6 0; #X connect 5 0 8 0; #X connect 6 0 5 0; diff --git a/doc/hid_log-help.pd b/doc/hid_log-help.pd index a5ccaf2..c881746 100644 --- a/doc/hid_log-help.pd +++ b/doc/hid_log-help.pd @@ -1,19 +1,20 @@ #N canvas 567 104 472 353 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_log] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_log 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 27 300 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 314 released under the GNU GPL; #X text 98 271 For more info:; -#X obj 202 269 pddp_open all_about_hid_mapping; +#X obj 202 269 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X floatatom 25 123 8 0 0 0 - - -; #X floatatom 25 184 8 0 0 0 - - -; #X obj 28 201 hsl 200 15 0 1 0 0 empty empty empty 22 8 1 12 -262144 -1 -1 0 1; #X obj 28 103 hsl 200 15 0 1 0 0 empty empty empty 22 8 1 12 -261681 -1 -1 0 1; -#X obj 25 153 hid_log; +#X obj 25 153 hid/hid_log; #N canvas 0 22 450 300 graph1 0; #X array hid_log 100 float 0; #X coords 0 1 99 0 100 100 1; @@ -32,7 +33,7 @@ #X obj 57 13 loadbang; #X obj 57 207 / 100; #X text 99 207 [hid] output range: 0 to 1; -#X obj 56 233 hid_log; +#X obj 56 233 hid/hid_log; #X obj 56 283 tabwrite hid_log; #X connect 0 0 1 0; #X connect 1 0 3 0; diff --git a/doc/hid_lowpass-help.pd b/doc/hid_lowpass-help.pd index 549952c..7c9a358 100644 --- a/doc/hid_lowpass-help.pd +++ b/doc/hid_lowpass-help.pd @@ -1,15 +1,16 @@ #N canvas 119 269 475 392 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_lowpass] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_lowpass 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 27 340 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 354 released under the GNU GPL; #X floatatom 101 199 5 0 0 0 - - -; #X floatatom 101 255 5 0 0 0 - - -; #X text 98 312 For more info:; -#X obj 202 310 pddp_open all_about_hid_mapping; -#X obj 101 225 hid_lowpass; +#X obj 202 310 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; +#X obj 101 225 hid/hid_lowpass; #X obj 193 198 hsl 75 18 1 100 1 1 empty empty refresh(Hz) 4 9 1 12 -228992 -1 -1 3700 0; #X floatatom 189 227 5 0 0 0 - - -; diff --git a/doc/hid_menu-help.pd b/doc/hid_menu-help.pd index 4f9b3b4..9294f95 100644 --- a/doc/hid_menu-help.pd +++ b/doc/hid_menu-help.pd @@ -1,9 +1,10 @@ #N canvas 380 628 473 316 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_menu] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_menu 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 27 270 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 284 released under the GNU GPL; #X text 161 235 For more info:; -#X obj 266 234 pddp_open all_about_hid; +#X obj 266 234 pddp/pddplink ../all_about_hid.pd -text all_about_hid; diff --git a/doc/hid_one2four-help.pd b/doc/hid_one2four-help.pd index e4f9588..3fefe61 100644 --- a/doc/hid_one2four-help.pd +++ b/doc/hid_one2four-help.pd @@ -1,7 +1,8 @@ #N canvas 427 177 464 315 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_one2four] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_one2four 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 27 270 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 284 released under the GNU GPL; @@ -12,11 +13,11 @@ #X obj 26 203 hsl 75 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X text 98 243 For more info:; -#X obj 202 241 pddp_open all_about_hid_mapping; +#X obj 202 241 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X text 18 28 Simple one-to-three mapping object. The first inlet is passed thru \, the range of the output data on the other inlet starts at the points in the input range specified as arugments.; -#X obj 82 145 hid_one2four 0.3 0.6 0.9; +#X obj 82 145 hid/hid_one2four 0.3 0.6 0.9; #X floatatom 113 186 5 0 0 0 - - -; #X obj 116 203 hsl 75 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; diff --git a/doc/hid_one2three-help.pd b/doc/hid_one2three-help.pd index 3a9ce78..e90480a 100644 --- a/doc/hid_one2three-help.pd +++ b/doc/hid_one2three-help.pd @@ -1,7 +1,8 @@ #N canvas 541 218 473 316 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_one2three] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_one2three 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 27 270 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 284 released under the GNU GPL; @@ -12,11 +13,11 @@ #X obj 26 203 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X text 98 243 For more info:; -#X obj 202 241 pddp_open all_about_hid_mapping; +#X obj 202 241 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X floatatom 173 186 5 0 0 0 - - -; #X obj 176 203 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; -#X obj 153 145 hid_one2three 0.3 0.7; +#X obj 153 145 hid/hid_one2three 0.3 0.7; #X floatatom 323 186 5 0 0 0 - - -; #X obj 326 203 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; diff --git a/doc/hid_one2two-help.pd b/doc/hid_one2two-help.pd index 6d5e201..abdf3ab 100644 --- a/doc/hid_one2two-help.pd +++ b/doc/hid_one2two-help.pd @@ -1,7 +1,8 @@ #N canvas 541 218 473 316 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_one2two] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_one2two 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 27 270 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 284 released under the GNU GPL; @@ -12,14 +13,14 @@ #X obj 86 203 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 11200 1; #X text 98 243 For more info:; -#X obj 202 241 pddp_open all_about_hid_mapping; +#X obj 202 241 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X floatatom 263 186 5 0 0 0 - - -; #X obj 266 203 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 10557 1; #X text 18 28 Simple one-to-two mapping object. The first inlet is passed thru \, the range of the output data on the second inlet starts at the point in the input range specified as an arugment.; -#X obj 153 145 hid_one2two 0.3; +#X obj 153 145 hid/hid_one2two 0.3; #X connect 4 0 13 0; #X connect 5 0 7 0; #X connect 6 0 4 0; diff --git a/doc/hid_polar-help.pd b/doc/hid_polar-help.pd index 7dbf79c..0391555 100644 --- a/doc/hid_polar-help.pd +++ b/doc/hid_polar-help.pd @@ -1,13 +1,14 @@ #N canvas 601 232 482 455 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_polar] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_polar 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 244 411 released under the GNU GPL; #X floatatom 100 248 5 0 0 0 - - -; #X floatatom 100 335 7 0 0 0 radius-> - -; #X text 124 370 For more info:; -#X obj 228 368 pddp_open all_about_hid_mapping; -#X obj 100 295 hid_polar; +#X obj 228 368 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; +#X obj 100 295 hid/hid_polar; #X text 27 397 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at> ; #X obj 101 161 hsl 128 15 0 1 0 0 empty empty x-axis 133 7 1 10 -225280 @@ -25,9 +26,9 @@ #X text 17 29 Converts cartesian coordinates(x \, y) to polar coordinates (radius \, angle). The angle is in radians (-pi to pi). The angle 0 is at cartesian (1 \, 0.5) or to the right.; -#X obj 361 293 hid_spiral; -#X obj 245 293 hid2rad; -#X obj 303 293 hid2deg; +#X obj 361 293 hid/hid_spiral; +#X obj 245 293 hid/hid2rad; +#X obj 303 293 hid/hid2deg; #X connect 3 0 7 0; #X connect 7 0 4 0; #X connect 7 1 11 0; diff --git a/doc/hid_rel2abs-help.pd b/doc/hid_rel2abs-help.pd index 5c4b4df..8f55f07 100644 --- a/doc/hid_rel2abs-help.pd +++ b/doc/hid_rel2abs-help.pd @@ -1,7 +1,8 @@ #N canvas 435 259 469 312 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_invert] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_invert 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 27 270 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 284 released under the GNU GPL; @@ -16,10 +17,10 @@ #X floatatom 153 207 5 0 0 0 - - -; #X floatatom 252 208 5 0 0 0 - - -; #X floatatom 211 208 5 0 0 0 - - -; -#X obj 252 174 hid_rel2abs 0 100; -#X obj 73 175 hid_rel2abs -10 10; +#X obj 252 174 hid/hid_rel2abs 0 100; +#X obj 73 175 hid/hid_rel2abs -10 10; #X text 98 240 For more info:; -#X obj 202 238 pddp_open all_about_hid_mapping; +#X obj 202 238 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X msg 73 129 reset; #X msg 284 129 reset; #X connect 5 0 10 0; diff --git a/doc/hid_smooth-help.pd b/doc/hid_smooth-help.pd index 6d55ca0..96312d7 100644 --- a/doc/hid_smooth-help.pd +++ b/doc/hid_smooth-help.pd @@ -1,20 +1,21 @@ #N canvas 388 256 475 392 10; +#X declare -lib hid; #X text 27 340 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 354 released under the GNU GPL; #X floatatom 102 195 5 0 0 0 - - -; #X floatatom 102 251 5 0 0 0 - - -; #X text 98 303 For more info:; -#X obj 202 301 pddp_open all_about_hid_mapping; +#X obj 202 301 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X obj 103 131 noise4hidhelp; #X obj 105 268 hsl 250 15 0 1 0 0 empty empty empty 22 8 1 12 -262144 -1 -1 16106 1; #X obj 105 164 hsl 250 15 0 1 0 0 empty empty empty 22 8 1 12 -262144 -1 -1 16509 1; -#X obj 5 2 cnv 15 450 20 empty empty [hid_smooth] 2 11 1 18 -233017 +#X obj 5 2 cnv 15 450 20 empty empty hid_smooth 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; -#X obj 102 221 hid_smooth; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; +#X obj 102 221 hid/hid_smooth; #X text 18 36 Smooths a stream of numbers using weighted averaging of the last 10 values. This object is an shortcut for [hid_average] with the default settings.; diff --git a/doc/hid_spiral-help.pd b/doc/hid_spiral-help.pd index 924d3bb..bf64f12 100644 --- a/doc/hid_spiral-help.pd +++ b/doc/hid_spiral-help.pd @@ -1,7 +1,8 @@ #N canvas 56 302 475 480 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_spiral] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_spiral 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 245 451 released under the GNU GPL; #X floatatom 70 288 5 0 0 0 - - -; #X floatatom 70 375 5 0 0 0 radius-> - -; @@ -20,9 +21,9 @@ #X msg 69 126 0.5; #X text 15 126 center:; #X obj 323 324 spiral-joystick; -#X obj 70 335 hid_spiral; -#X obj 279 406 pddp_open all_about_hid_mapping; -#X obj 362 271 hid_polar; +#X obj 70 335 hid/hid_spiral; +#X obj 279 406 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; +#X obj 362 271 hid/hid_polar; #X text 24 32 Converts cartesian coordinates(x \, y) to spiral in polar coordinates (radius \, angle). The angle is from 0 to 1 The angle 0 is at cartesian (1 \, 0) or far right center.; diff --git a/doc/hid_square-help.pd b/doc/hid_square-help.pd index 4df5232..fbcac51 100644 --- a/doc/hid_square-help.pd +++ b/doc/hid_square-help.pd @@ -1,19 +1,20 @@ #N canvas 556 145 476 357 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_square] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_square 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 27 300 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 314 released under the GNU GPL; #X text 98 271 For more info:; -#X obj 202 269 pddp_open all_about_hid_mapping; +#X obj 202 269 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X floatatom 25 123 8 0 0 0 - - -; #X floatatom 25 184 8 0 0 0 - - -; #X obj 28 201 hsl 200 15 0 1 0 0 empty empty empty 22 8 1 12 -262144 -1 -1 0 1; #X obj 28 103 hsl 200 15 0 1 0 0 empty empty empty 22 8 1 12 -261681 -1 -1 0 1; -#X obj 25 153 hid_square; +#X obj 25 153 hid/hid_square; #N canvas 0 22 450 300 graph1 0; #X array hid_square 100 float 0; #X coords 0 1 99 0 100 100 1; @@ -32,7 +33,7 @@ #X obj 57 13 loadbang; #X obj 57 207 / 100; #X text 99 207 [hid] output range: 0 to 1; -#X obj 56 233 hid_square; +#X obj 56 233 hid/hid_square; #X obj 56 283 tabwrite hid_square; #X connect 0 0 1 0; #X connect 1 0 3 0; diff --git a/doc/hid_squareroot-help.pd b/doc/hid_squareroot-help.pd index 600c1b6..65d9620 100644 --- a/doc/hid_squareroot-help.pd +++ b/doc/hid_squareroot-help.pd @@ -1,19 +1,20 @@ #N canvas 416 140 476 357 10; -#X obj 5 2 cnv 15 450 20 empty empty [hid_squareroot] 2 11 1 18 -233017 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty hid_squareroot 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 27 300 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 244 314 released under the GNU GPL; #X text 98 271 For more info:; -#X obj 202 269 pddp_open all_about_hid_mapping; +#X obj 202 269 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X floatatom 25 123 8 0 0 0 - - -; #X floatatom 25 184 8 0 0 0 - - -; #X obj 28 201 hsl 200 15 0 1 0 0 empty empty empty 22 8 1 12 -262144 -1 -1 0 1; #X obj 28 103 hsl 200 15 0 1 0 0 empty empty empty 22 8 1 12 -261681 -1 -1 0 1; -#X obj 25 153 hid_squareroot; +#X obj 25 153 hid/hid_squareroot; #N canvas 0 22 450 300 graph1 0; #X array hid_squareroot 100 float 0; #X coords 0 1 99 0 100 100 1; @@ -32,7 +33,7 @@ #X obj 57 13 loadbang; #X obj 57 207 / 100; #X text 99 207 [hid] output range: 0 to 1; -#X obj 56 233 hid_squareroot; +#X obj 56 233 hid/hid_squareroot; #X obj 56 283 tabwrite hid_squareroot; #X connect 0 0 1 0; #X connect 1 0 3 0; diff --git a/doc/joystick-help.pd b/doc/joystick-help.pd index 26b4172..a4a8f7d 100644 --- a/doc/joystick-help.pd +++ b/doc/joystick-help.pd @@ -1,4 +1,5 @@ #N canvas 31 125 670 468 10; +#X declare -lib hid; #X obj 168 91 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 1 1 ; #X floatatom 63 234 7 0 0 3 Y-axis - -; @@ -28,7 +29,7 @@ #X symbolatom 335 234 6 0 0 3 code - -; #X floatatom 400 234 5 0 0 3 value - -; #X text 345 199 buttons; -#X obj 2 2 cnv 15 650 20 empty empty [joystick] 2 11 1 18 -233017 -66577 +#X obj 2 2 cnv 15 650 20 empty empty joystick 2 11 1 18 -233017 -66577 0; #X msg 215 93 open 1; #X text 1 412 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> @@ -36,7 +37,7 @@ #X text 218 426 released under the GNU GPL; #X text 414 426 $Author: eighthave $; #X text 414 413 $Revision: 1.11 $; -#X obj 239 375 pddp_open all_about_hid; +#X obj 239 375 pddp/pddplink ../all_about_hid.pd -text all_about_hid; #X text 130 376 For more info:; #X floatatom 245 234 5 0 0 3 hat0X - -; #X floatatom 288 234 5 0 0 3 hat0Y - -; @@ -48,22 +49,22 @@ btn_8 btn_9; #X obj 219 426 dac~; #X obj 168 376 *~; #X obj 201 398 linearpan~; -#X obj 70 168 hid_invert; +#X obj 70 168 hid/hid_invert; #X obj 70 242 mtof; #X obj 168 313 osc~; #X msg 57 88 \; pd dsp \$1; -#X obj 70 193 hid_squareroot; +#X obj 70 193 hid/hid_squareroot; #X obj 287 11 inlet; -#X obj 203 323 hid_log; +#X obj 203 323 hid/hid_log; #X obj 180 65 joystick 0; #X obj 168 287 +~; #X obj 238 212 *~; #X obj 238 179 osc~; #X obj 304 143 * 300; #X obj 238 143 * 200; -#X obj 304 123 hid_square; +#X obj 304 123 hid/hid_square; #X obj 304 179 +; -#X obj 238 123 hid_exp; +#X obj 238 123 hid/hid_exp; #X obj 203 360 line~; #X msg 203 342 \$1 5; #X obj 70 218 notescale 40 80; @@ -99,7 +100,7 @@ btn_8 btn_9; #X obj 440 92 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 1 ; #X text 333 73 Select your device and turn on to make noise:; -#X msg 619 3 pddp; +#X obj 619 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X msg 503 125 open \$1; #X obj 503 105 hradio 15 1 1 8 \$0-device-number empty choose_a_device 0 -6 1 9 -262144 -1 -1 2; @@ -109,7 +110,7 @@ btn_8 btn_9; the output of axis data. Move each element of the device thru its full range to calibrate it.; #X obj 335 215 unpack s f; -#X obj 407 375 pddp_open all_about_hid_mapping; +#X obj 407 375 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X text 422 177 (remember to calibrate all parts; #X text 430 190 of the joystick first); #X msg 394 120 print; diff --git a/doc/keyboard-help.pd b/doc/keyboard-help.pd index 866957e..f16b62b 100644 --- a/doc/keyboard-help.pd +++ b/doc/keyboard-help.pd @@ -1,5 +1,5 @@ -#N canvas 109 184 567 478 10; -#X obj 168 91 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 1 +#N canvas 499 42 567 478 10; +#X obj 168 91 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 1 1 ; #X obj 11 369 tgl 20 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1 ; @@ -7,19 +7,18 @@ #X floatatom 296 222 5 0 0 1 value - -; #X obj 168 195 unpack symbol float; #X text 239 238 buttons; -#X obj 2 2 cnv 15 550 20 empty empty [keyboard] 2 11 1 18 -233017 -66577 +#X obj 2 2 cnv 15 550 20 empty empty keyboard 2 11 1 18 -233017 -66577 0; -#X msg 215 93 open 1; +#X msg 204 93 open 1; #X text 1 432 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 218 446 released under the GNU GPL; #X text 414 446 $Author: eighthave $; #X text 414 433 $Revision: 1.4 $; -#X obj 348 402 pddp_open all_about_hid; +#X obj 348 402 pddp/pddplink ../all_about_hid.pd -text all_about_hid +; #X text 239 403 For more info:; -#X msg 220 112 open 3; -#X msg 225 131 open 5; -#X obj 168 154 keyboard 0; +#X msg 209 112 open 3; #X obj 32 369 tgl 20 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1 ; #X obj 53 369 tgl 20 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1 @@ -76,36 +75,70 @@ will get keyboard events.; #X obj 75 315 route key_4 key_5 key_6 key_7 key_8 key_9 key_10 key_11 key_12 key_13 key_14 key_15 key_16 key_17 key_18 key_19 key_20 key_21 key_22 key_23 key_24 key_25 key_26 key_27; -#X msg 519 3 pddp; -#X connect 0 0 16 0; +#X obj 519 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp +; +#X obj 168 174 hid/keyboard 0; +#X msg 109 123 print; +#N canvas 162 133 570 420 serin 0; +#X obj 286 61 cnv 15 30 15 empty \$0-open-canvas 1 4 8 0 14 -233017 +-1 0; +#X obj 60 61 hradio 15 1 1 15 empty empty empty 0 -6 0 8 -225271 -1 +-1 1; +#X obj 60 13 inlet; +#X msg 200 202 label \$1; +#X obj 200 180 makefilename %d; +#X obj 59 108 int; +#X obj 59 337 outlet; +#X msg 201 306 set \$1 \$2; +#X obj 59 266 trigger bang anything; +#X obj 201 286 list; +#X msg 60 210 open \$1; +#X obj 200 225 send \$0-open-canvas; +#X connect 1 0 5 0; +#X connect 2 0 1 0; +#X connect 3 0 11 0; +#X connect 4 0 3 0; +#X connect 5 0 4 0; +#X connect 5 0 10 0; +#X connect 7 0 6 0; +#X connect 8 0 6 0; +#X connect 8 1 9 0; +#X connect 9 0 7 0; +#X connect 10 0 8 0; +#X coords 0 -1 1 1 257 17 1 60 60; +#X restore 216 131 pd serin; +#X msg 216 152 open 1; +#X connect 0 0 42 0; #X connect 4 0 2 0; #X connect 4 1 3 0; -#X connect 7 0 16 0; -#X connect 14 0 16 0; -#X connect 15 0 16 0; -#X connect 16 0 4 0; -#X connect 16 0 42 0; -#X connect 42 0 1 0; -#X connect 42 1 17 0; -#X connect 42 2 18 0; -#X connect 42 3 19 0; -#X connect 42 4 20 0; -#X connect 42 5 21 0; -#X connect 42 6 22 0; -#X connect 42 7 23 0; -#X connect 42 8 24 0; -#X connect 42 9 25 0; -#X connect 42 10 26 0; -#X connect 42 11 27 0; -#X connect 42 12 28 0; -#X connect 42 13 29 0; -#X connect 42 14 30 0; -#X connect 42 15 31 0; -#X connect 42 16 32 0; -#X connect 42 17 33 0; -#X connect 42 18 34 0; -#X connect 42 19 35 0; -#X connect 42 20 36 0; -#X connect 42 21 37 0; -#X connect 42 22 38 0; -#X connect 42 23 39 0; +#X connect 7 0 42 0; +#X connect 14 0 42 0; +#X connect 40 0 1 0; +#X connect 40 1 15 0; +#X connect 40 2 16 0; +#X connect 40 3 17 0; +#X connect 40 4 18 0; +#X connect 40 5 19 0; +#X connect 40 6 20 0; +#X connect 40 7 21 0; +#X connect 40 8 22 0; +#X connect 40 9 23 0; +#X connect 40 10 24 0; +#X connect 40 11 25 0; +#X connect 40 12 26 0; +#X connect 40 13 27 0; +#X connect 40 14 28 0; +#X connect 40 15 29 0; +#X connect 40 16 30 0; +#X connect 40 17 31 0; +#X connect 40 18 32 0; +#X connect 40 19 33 0; +#X connect 40 20 34 0; +#X connect 40 21 35 0; +#X connect 40 22 36 0; +#X connect 40 23 37 0; +#X connect 42 0 4 0; +#X connect 42 0 40 0; +#X connect 43 0 42 0; +#X connect 44 0 45 0; +#X connect 45 0 42 0; diff --git a/doc/keygate-help.pd b/doc/keygate-help.pd index a3edf3a..8033e0e 100644 --- a/doc/keygate-help.pd +++ b/doc/keygate-help.pd @@ -1,5 +1,6 @@ #N canvas 525 201 462 476 10; -#X obj 5 2 cnv 15 450 20 empty empty [keygate] 2 11 1 18 -233017 -66577 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty keygate 2 11 1 18 -233017 -66577 0; #X obj 160 257 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; @@ -9,7 +10,7 @@ #X text 33 416 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 250 430 released under the GNU GPL; -#X obj 237 369 pddp_open all_about_hid; +#X obj 237 369 pddp/pddplink ../all_about_hid.pd -text all_about_hid; #X text 128 370 For more info:; #X text 15 207 data to be gated -->; #X obj 281 258 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 @@ -24,7 +25,7 @@ inlet takes the data to be gated.; #X text 18 89 The "f" key on the any keyboard controls this gate:; #X text 310 263 <-- key released; #X text 41 264 key pressed -->; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 14 0; diff --git a/doc/mouse-help.pd b/doc/mouse-help.pd index 79290aa..b3f1387 100644 --- a/doc/mouse-help.pd +++ b/doc/mouse-help.pd @@ -1,4 +1,4 @@ -#N canvas 349 114 659 461 10; +#N canvas 56 46 659 461 10; #X symbolatom 211 268 6 0 0 1 code - -; #X obj 130 106 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 1; @@ -8,121 +8,120 @@ #X floatatom 31 268 7 0 0 3 X - -; #X obj 193 335 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; -#X obj 238 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 +#X obj 232 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 1 1; -#X obj 283 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 +#X obj 271 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; #X msg 175 83 open 0; #X msg 180 102 open 1; #X msg 185 121 open 2; -#N canvas 22 231 672 582 mouse-noise 1; -#X obj 112 38 inlet; -#X obj 210 324 noise~; -#X obj 155 346 osc~; -#X obj 113 397 *~; -#X msg 155 94 \; pd dsp 1; -#X obj 110 510 dac~; -#X obj 386 33 inlet; -#X text 448 34 open msgs; -#X obj 138 169 mouse \$1; -#X text 328 192 get button value only; -#X obj 210 350 *~; -#X obj 317 242 / 2; -#X obj 113 458 linearpan~; -#X obj 289 439 line; -#X msg 289 416 \$1 20; -#X obj 313 328 +; -#X obj 359 328 f; -#X msg 343 297 0; -#X obj 155 252 abs; -#X obj 189 192 unpack symbol float; -#X obj 110 345 line~; -#X msg 110 322 \$1 3; -#X obj 155 327 * 20; -#X obj 326 349 min 20; -#X obj 326 368 max 0; -#X obj 296 301 int; -#X obj 326 389 / 20; -#X obj 155 297 mtof; -#X obj 155 213 hid_rel2abs 0 1; -#X obj 155 233 - 1; -#X floatatom 217 521 5 0 0 0 - - -; -#X obj 155 277 notescale 30 60; -#X obj 179 410 loadbang; -#X msg 177 433 0.5; -#X obj 26 260 select 0; -#X msg 26 282 0; -#X text 11 234 mute on finish; -#X obj 112 71 t f f b; -#X connect 0 0 37 0; +#N canvas 94 191 532 519 mouse-noise 0; +#X obj 26 18 inlet; +#X obj 199 314 noise~; +#X obj 155 336 osc~; +#X obj 113 387 *~; +#X msg 167 65 \; pd dsp 1; +#X obj 139 488 dac~; +#X obj 386 13 inlet; +#X text 448 14 open msgs; +#X obj 132 149 hid/mouse \$1; +#X text 340 169 get button value only; +#X obj 199 336 *~; +#X obj 312 207 / 2; +#X obj 113 448 pan/linear_pan~; +#X obj 276 426 line; +#X msg 276 403 \$1 20; +#X obj 276 318 +; +#X msg 313 294 0; +#X obj 155 242 abs; +#X obj 201 169 unpack symbol float; +#X obj 110 335 line~; +#X msg 110 312 \$1 3; +#X obj 155 314 * 20; +#X obj 276 339 min 20; +#X obj 276 358 max 0; +#X obj 276 294 int; +#X obj 276 379 / 20; +#X obj 155 287 mtof; +#X obj 155 203 hid/hid_rel2abs 0 1; +#X obj 155 223 - 1; +#X obj 155 267 mapping/notescale 30 60; +#X obj 200 403 loadbang; +#X msg 200 424 0.5; +#X obj 26 250 select 0; +#X msg 26 272 0; +#X text 11 224 mute on finish; +#X obj 26 43 trigger float float bang; +#X obj 312 318 float; +#X connect 0 0 35 0; #X connect 1 0 10 0; #X connect 2 0 3 1; #X connect 3 0 12 0; #X connect 6 0 8 0; -#X connect 8 0 21 0; -#X connect 8 1 28 0; -#X connect 8 2 25 0; -#X connect 8 3 19 0; +#X connect 8 0 20 0; +#X connect 8 1 27 0; +#X connect 8 2 24 0; +#X connect 8 3 18 0; #X connect 10 0 3 1; #X connect 11 0 10 1; #X connect 12 0 5 0; #X connect 12 1 5 1; #X connect 13 0 12 1; #X connect 14 0 13 0; -#X connect 15 0 23 0; +#X connect 15 0 22 0; #X connect 16 0 15 1; -#X connect 17 0 16 1; -#X connect 17 0 15 1; -#X connect 18 0 31 0; -#X connect 19 1 11 0; -#X connect 20 0 3 0; -#X connect 21 0 20 0; -#X connect 22 0 2 0; -#X connect 23 0 24 0; -#X connect 24 0 16 0; -#X connect 24 0 26 0; -#X connect 25 0 15 0; -#X connect 26 0 14 0; -#X connect 27 0 22 0; -#X connect 28 0 29 0; -#X connect 29 0 18 0; -#X connect 31 0 27 0; -#X connect 31 0 30 0; +#X connect 16 0 36 1; +#X connect 17 0 29 0; +#X connect 18 1 11 0; +#X connect 19 0 3 0; +#X connect 20 0 19 0; +#X connect 21 0 2 0; +#X connect 22 0 23 0; +#X connect 23 0 25 0; +#X connect 23 0 36 0; +#X connect 24 0 15 0; +#X connect 25 0 14 0; +#X connect 26 0 21 0; +#X connect 27 0 28 0; +#X connect 28 0 17 0; +#X connect 29 0 26 0; +#X connect 30 0 31 0; +#X connect 31 0 12 1; #X connect 32 0 33 0; -#X connect 33 0 12 1; -#X connect 34 0 35 0; -#X connect 35 0 21 0; -#X connect 37 0 34 0; -#X connect 37 1 8 0; -#X connect 37 2 4 0; -#X restore 425 186 pd mouse-noise 1; -#X obj 425 119 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 +#X connect 33 0 20 0; +#X connect 35 0 32 0; +#X connect 35 1 8 0; +#X connect 35 2 4 0; +#X connect 36 0 15 1; +#X restore 407 176 pd mouse-noise 1; +#X obj 407 119 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 1 1; -#X text 308 95 turn this on to make some noise with the mouse; +#X text 354 95 turn this on to make some noise with the mouse; #X obj 211 241 unpack symbol float; #X text 282 284 buttons; -#X obj 329 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 +#X obj 310 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; -#X obj 374 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 +#X obj 349 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; -#X obj 419 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 +#X obj 388 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; -#X obj 465 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 +#X obj 427 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; -#X obj 510 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 +#X obj 466 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; -#X obj 2 2 cnv 15 650 20 empty empty [mouse] 2 11 1 18 -233017 -66577 +#X obj 2 2 cnv 15 650 20 empty empty mouse 2 11 1 18 -233017 -66577 0; -#X obj 555 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 +#X obj 505 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; #X text 11 422 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at> ; #X text 228 436 released under the GNU GPL; #X text 424 436 $Author: eighthave $; #X text 424 423 $Revision: 1.13 $; -#X obj 466 382 pddp_open all_about_hid; +#X obj 466 382 pddp/pddplink ../all_about_hid.pd -text all_about_hid +; #X text 357 383 For more info:; -#X obj 601 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 +#X obj 544 334 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; #X obj 193 314 route btn_0 btn_1 btn_2 btn_3 btn_4 btn_5 btn_6 btn_7 btn_8; @@ -131,13 +130,15 @@ the output of axis data. Move the device around as fast as possible in each axis to calibrate it.; #X text 13 111 turn on polling:; #X msg 180 146 refresh; -#X obj 130 171 mouse 0; -#X msg 619 3 pddp; +#X obj 130 171 hid/mouse 0; +#X obj 619 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp +; #X msg 500 148 open \$1; #X obj 500 128 hradio 15 1 1 8 \$0-device-number empty choose_a_device -0 -6 1 9 -262144 -1 -1 4; +0 -6 1 9 -262144 -1 -1 6; #X obj 474 128 nbx 1 14 -1e+37 1e+37 0 0 empty \$0-device-number empty -0 -6 0 14 -166441 -1 -1 4 256; +0 -6 0 14 -166441 -1 -1 6 256; +#X msg 76 142 print; #X connect 1 0 35 0; #X connect 9 0 35 0; #X connect 10 0 35 0; @@ -163,3 +164,4 @@ in each axis to calibrate it.; #X connect 35 3 31 0; #X connect 37 0 12 1; #X connect 38 0 37 0; +#X connect 40 0 35 0; diff --git a/doc/notescale-help.pd b/doc/notescale-help.pd index 12992e0..f3f69a7 100644 --- a/doc/notescale-help.pd +++ b/doc/notescale-help.pd @@ -1,9 +1,10 @@ #N canvas 577 303 464 467 10; +#X declare -lib hid; #X floatatom 26 85 5 0 0 0 - - -; #X floatatom 26 160 0 0 0 0 - - -; -#X obj 2 2 cnv 15 450 20 empty empty [notescale] 2 11 1 18 -233017 +#X obj 2 2 cnv 15 450 20 empty empty notescale 2 11 1 18 -233017 -66577 0; -#X msg 418 3 pddp; +#X obj 418 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X floatatom 137 266 5 0 0 0 - - -; #X obj 140 330 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; diff --git a/doc/rad2hid-help.pd b/doc/rad2hid-help.pd index 654a01e..2442620 100644 --- a/doc/rad2hid-help.pd +++ b/doc/rad2hid-help.pd @@ -1,21 +1,22 @@ #N canvas 147 313 467 307 10; -#X obj 5 2 cnv 15 450 20 empty empty [rad2hid] 2 11 1 18 -233017 -66577 +#X declare -lib hid; +#X obj 5 2 cnv 15 450 20 empty empty rad2hid 2 11 1 18 -233017 -66577 0; -#X msg 422 3 pddp; +#X obj 422 3 pddp/pddplink http://puredata.info/dev/pddp -text pddp; #X text 254 269 released under the GNU GPL; #X text 185 228 For more info:; -#X obj 289 226 pddp_open all_about_hid_mapping; +#X obj 289 226 pddp/pddplink ../all_about_hid_mapping.pd -text all_about_hid_mapping; #X text 40 254 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at> ; #X text 300 168 related objects:; -#X obj 273 184 rad2hid; -#X obj 332 184 deg2hid; -#X obj 391 184 hid2deg; +#X obj 273 184 hid/rad2hid; +#X obj 332 184 hid/deg2hid; +#X obj 391 184 hid/hid2deg; #X floatatom 69 195 5 0 0 1 hid - -; #X obj 72 95 hsl 128 15 -3.14159 3.14159 0 0 empty empty radians 6 7 1 10 -262131 -1 -1 0 0; #X floatatom 95 125 9 0 0 0 - - -; -#X obj 69 160 rad2hid; +#X obj 69 160 hid/rad2hid; #X text 21 35 This object converts numbers from radians (-pi to pi) to the [hid] range (0 to 1) with the 0's lining up in the same place. ; diff --git a/examples/polar-joystick.pd b/examples/polar-joystick.pd index e6a0092..6a65caf 100644 --- a/examples/polar-joystick.pd +++ b/examples/polar-joystick.pd @@ -1,50 +1,50 @@ -#N canvas 628 147 472 478 10; -#X obj 163 119 tgl 25 0 empty empty start 1 12 1 9 -225271 -1 -1 1 +#N canvas 254 77 472 478 10; +#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 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 obj 226 118 hradio 15 1 1 15 \$0-device-number empty choose_a_device +0 -6 1 9 -225271 -1 -1 0; +#X obj 190 119 nbx 2 14 -1e+37 1e+37 0 0 empty \$0-device-number empty +0 -6 0 14 -166441 -1 -1 0 256; #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 177 285 mtof; +#X obj 177 305 osc~; +#X obj 118 355 *~; +#X obj 118 401 dac~; +#X obj 77 305 line~; +#X msg 77 283 \$1 5; #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 142 369 pan~; +#X obj 118 379 pan/equal_power_pan~; #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 164 172 hid/joystick 3; -#X obj 201 204 invert; -#X obj 291 11 import mapping; -#X obj 143 226 polar; -#X obj 101 254 hid/hid_cube; -#X obj 201 248 hid/hid_log; -#X obj 201 268 notescale 50 74; +#X obj 163 164 hid/joystick 3; +#X obj 177 194 mapping/reverse; +#X obj 102 216 mapping/polar; +#X obj 77 264 hid/hid_cube; +#X obj 391 11 pddp/dsp; +#X obj 177 265 mapping/notescale 60 72; +#X obj 177 245 mapping/stepper; #X connect 0 0 16 0; #X connect 1 0 16 0; #X connect 2 0 1 0; #X connect 4 0 16 0; #X connect 5 0 6 0; -#X connect 6 0 7 0; +#X connect 6 0 7 1; #X connect 7 0 12 0; -#X connect 9 0 7 1; +#X connect 9 0 7 0; #X connect 10 0 9 0; #X connect 12 0 8 0; #X connect 12 1 8 1; -#X connect 16 0 19 0; +#X connect 16 0 18 0; #X connect 16 1 17 0; #X connect 16 2 12 1; -#X connect 17 0 19 1; -#X connect 19 0 20 0; -#X connect 19 1 21 0; -#X connect 20 0 10 0; -#X connect 21 0 22 0; -#X connect 22 0 5 0; +#X connect 17 0 18 1; +#X connect 18 0 19 0; +#X connect 18 1 22 0; +#X connect 19 0 10 0; +#X connect 21 0 5 0; +#X connect 22 0 21 0; diff --git a/examples/spiral-joystick.pd b/examples/spiral-joystick.pd index fb5e21c..9aac4e2 100644 --- a/examples/spiral-joystick.pd +++ b/examples/spiral-joystick.pd @@ -1,52 +1,52 @@ -#N canvas 645 306 478 473 10; -#X obj 323 10 import mapping; +#N canvas 400 56 478 473 10; #X obj 134 99 tgl 25 0 empty empty start 1 12 1 9 -225271 -1 -1 1 1 ; -#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 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 216 118 open \$1; +#X obj 180 98 nbx 2 14 -1e+37 1e+37 0 0 empty \$0-device-number empty +0 -6 0 14 -166441 -1 -1 10 256; #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 172 282 osc~; +#X obj 105 345 *~; +#X obj 105 389 dac~; +#X obj 65 283 line~; +#X msg 65 261 \$1 5; #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 98 366 pan~; +#X obj 105 366 pan/equal_power_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 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 172 262 pow 3; +#X text 196 211 set 440 as start; +#X obj 172 241 + 7.60591; +#X text 194 223 (7.60591 ^ 3 = 440.001); #X text 14 9 spiral_joystick; #X obj 134 142 hid/joystick 3; -#X obj 165 174 invert; -#X obj 100 198 spiral; -#X obj 58 242 hid/hid_cube; -#X floatatom 231 172 5 0 0 0 - - -; -#X connect 1 0 20 0; -#X connect 2 0 20 0; -#X connect 3 0 2 0; -#X connect 5 0 20 0; -#X connect 6 0 7 0; -#X connect 7 0 12 0; -#X connect 9 0 7 1; -#X connect 10 0 9 0; -#X connect 12 0 8 0; -#X connect 12 1 8 1; -#X connect 15 0 6 0; -#X connect 17 0 15 0; -#X connect 20 0 22 0; -#X connect 20 1 21 0; -#X connect 20 1 24 0; -#X connect 20 2 12 1; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 1 17 0; -#X connect 23 0 10 0; +#X obj 147 171 mapping/reverse; +#X obj 107 198 mapping/spiral; +#X obj 65 242 hid/hid_cube; +#X msg 167 118 print; +#X obj 389 10 pddp/dsp; +#X obj 216 97 hradio 15 1 1 15 \$0-device-number empty choose_a_device +0 -6 1 9 -225271 -1 -1 10; +#X connect 0 0 18 0; +#X connect 1 0 18 0; +#X connect 3 0 18 0; +#X connect 4 0 5 0; +#X connect 5 0 10 0; +#X connect 7 0 5 1; +#X connect 8 0 7 0; +#X connect 10 0 6 0; +#X connect 10 1 6 1; +#X connect 13 0 4 0; +#X connect 15 0 13 0; +#X connect 18 0 20 0; +#X connect 18 1 19 0; +#X connect 18 2 10 1; +#X connect 19 0 20 1; +#X connect 20 0 21 0; +#X connect 20 1 15 0; +#X connect 21 0 8 0; +#X connect 22 0 18 0; +#X connect 24 0 1 0; @@ -38,7 +38,7 @@ #define DEBUG(x) //#define DEBUG(x) x -unsigned short global_debug_level = 0; +unsigned short global_debug_level = 0; /* higher numbers means more messages */ static t_class *hid_class; @@ -177,7 +177,6 @@ static short get_device_number_from_arguments(int argc, t_atom *argv) first_argument = atom_getsymbolarg(0,argc,argv); if(first_argument == &s_) { // single float arg means device # - post("first_argument == &s_"); device_number = (short) atom_getfloatarg(0,argc,argv); if(device_number < 0) device_number = -1; debug_print(LOG_DEBUG,"[hid] setting device# to %d",device_number); @@ -346,7 +345,10 @@ static void hid_open(t_hid *x, t_symbol *s, int argc, t_atom *argv) if(hid_open_device(x,device_number)) error("[hid] can not open device %d",device_number); else + { x->x_device_open = 1; + x->x_device_number = device_number; + } } } else debug_print(LOG_WARNING,"[hid] device does not exist"); @@ -453,7 +455,6 @@ static void *hid_new(t_symbol *s, int argc, t_atom *argv) #endif /* init vars */ - global_debug_level = 9; /* high numbers here means see more messages */ x->x_has_ff = 0; x->x_device_open = 0; x->x_started = 0; diff --git a/hid_linux.c b/hid_linux.c index ff298ef..7d605e3 100644 --- a/hid_linux.c +++ b/hid_linux.c @@ -30,7 +30,7 @@ #define NBITS(x) (((x)/BITS_PER_LONG)+1) #define LONG(x) ((x)/BITS_PER_LONG) #define test_bit(bit, array) ((array[LONG(bit)] >> (bit%BITS_PER_LONG)) & 1) - +#define ISBITSET(x,i) ((x[i>>3] & (1<<(i&7)))!=0) /* * from an email from Vojtech: @@ -65,7 +65,7 @@ t_symbol* hid_convert_linux_buttons_to_numbers(__u16 linux_code) snprintf(hid_code, MAXPDSTRING,"btn_%d",linux_code - BTN_WHEEL); else return 0; } - return gensym(hid_code ? hid_code : "?"); + return gensym(hid_code); } /* Georg Holzmann: implementation of the keys */ @@ -261,30 +261,27 @@ void hid_print_device_list(void) debug_print(LOG_DEBUG,"hid_print_device_list"); int i,fd; char device_output_string[MAXPDSTRING] = "Unknown"; - char dev_handle_name[MAXPDSTRING] = "/dev/input/event0"; + char dev_handle_name[FILENAME_MAX] = "/dev/input/event0"; post(""); - for(i=0;i<128;++i) + for(i=0;i<MAX_DEVICES;++i) { - snprintf(dev_handle_name, MAXPDSTRING, "/dev/input/event%d", i); - if(dev_handle_name) - { - /* open the device read-only, non-exclusive */ - fd = open (dev_handle_name, O_RDONLY | O_NONBLOCK); - /* test if device open */ - if(fd < 0 ) - { - fd = -1; - } - else - { - /* get name of device */ - ioctl(fd, EVIOCGNAME(sizeof(device_output_string)), device_output_string); - post("Device %d: '%s' on '%s'", i, device_output_string, dev_handle_name); + snprintf(dev_handle_name, FILENAME_MAX, "/dev/input/event%d", i); + /* open the device read-only, non-exclusive */ + fd = open (dev_handle_name, O_RDONLY | O_NONBLOCK); + /* test if device open */ + if(fd < 0 ) + { + fd = -1; + } + else + { + /* get name of device */ + ioctl(fd, EVIOCGNAME(sizeof(device_output_string)), device_output_string); + post("Device %d: '%s' on '%s'", i, device_output_string, dev_handle_name); - close (fd); - } - } + close (fd); + } } post(""); } @@ -300,34 +297,39 @@ static void hid_build_element_list(t_hid *x) t_hid_element *new_element = NULL; t_int i, j; + if( x->x_fd < 0 ) + return; + element_count[x->x_device_number] = 0; - if( x->x_fd ) + + /* get bitmask representing supported elements (axes, keys, etc.) */ + memset(element_bitmask, 0, sizeof(element_bitmask)); + if( ioctl(x->x_fd, EVIOCGBIT(0, EV_MAX), element_bitmask[0]) < 0 ) + perror("[hid] error: evdev ioctl: element_bitmask"); + memset(abs_bitmask, 0, sizeof(abs_bitmask)); + if( ioctl(x->x_fd, EVIOCGBIT(EV_ABS, sizeof(abs_bitmask)), abs_bitmask) < 0 ) + perror("[hid] error: evdev ioctl: abs_bitmask"); + for( i = 1; i < EV_MAX; i++ ) { - /* get bitmask representing supported elements (axes, keys, etc.) */ - memset(element_bitmask, 0, sizeof(element_bitmask)); - if( ioctl(x->x_fd, EVIOCGBIT(0, EV_MAX), element_bitmask[0]) < 0 ) - perror("[hid] error: evdev ioctl: element_bitmask"); - memset(abs_bitmask, 0, sizeof(abs_bitmask)); - if( ioctl(x->x_fd, EVIOCGBIT(EV_ABS, sizeof(abs_bitmask)), abs_bitmask) < 0 ) - perror("[hid] error: evdev ioctl: abs_bitmask"); - for( i = 1; i < EV_MAX; i++ ) + if(test_bit(i, element_bitmask[0])) { - if(test_bit(i, element_bitmask[0])) + /* get bitmask representing supported elements */ + ioctl(x->x_fd, EVIOCGBIT(i, KEY_MAX), element_bitmask[i]); + /* cycle through all possible event codes (axes, keys, etc.) + * testing to see which are supported. + */ + for(j = 0; j < KEY_MAX; j++) { - /* get bitmask representing supported button types */ - ioctl(x->x_fd, EVIOCGBIT(i, KEY_MAX), element_bitmask[i]); - /* cycle through all possible event codes (axes, keys, etc.) - * testing to see which are supported. - * i = i j = j - */ - for(j = 0; j < KEY_MAX; j++) + if(test_bit(j, element_bitmask[i])) { - new_element = getbytes(sizeof(t_hid_element)); - if( (i == EV_ABS) && (test_bit(j, abs_bitmask)) ) + new_element = getbytes(sizeof(t_hid_element)); + if( (i == EV_ABS) && (j < ABS_MAX) && (test_bit(j, abs_bitmask)) ) { - /* this means that the bit is set in the axes list */ - if(ioctl(x->x_fd, EVIOCGABS(j), &abs_features)) - perror("evdev EVIOCGABS ioctl"); + if(ioctl(x->x_fd, EVIOCGABS(j), &abs_features) < 0) + { + post("[hid]: EVIOCGABS ioctl error for element: 0x%03x", j, j); + perror("[hid]: EVIOCGABS ioctl error:"); + } new_element->min = abs_features.minimum; new_element->max = abs_features.maximum; } @@ -336,38 +338,26 @@ static void hid_build_element_list(t_hid *x) new_element->min = 0; new_element->max = 0; } - if(test_bit(j, element_bitmask[i])) + new_element->linux_type = i; /* the int from linux/input.h */ + new_element->type = gensym(ev[i] ? ev[i] : "?"); /* the symbol */ + new_element->linux_code = j; + if((i == EV_KEY) && (j >= BTN_MISC) && (j < KEY_OK) ) { - new_element->linux_type = i; /* the int from linux/input.h */ - new_element->type = gensym(ev[i] ? ev[i] : "?"); /* the symbol */ - new_element->linux_code = j; - if((i == EV_KEY) && (j >= BTN_MISC) && (j < KEY_OK) ) - { - new_element->name = hid_convert_linux_buttons_to_numbers(j); - } - else - { - new_element->name = gensym(event_names[i][j] ? event_names[i][j] : "?"); - } - if( i == EV_REL ) - new_element->relative = 1; - else - new_element->relative = 0; - // fill in the t_hid_element struct here - post("x->x_device_number: %d element_count[]: %d", - x->x_device_number, element_count[x->x_device_number]); - post("linux_type/linux_code: %d/%d type/name: %s/%s max: %d min: %d ", - new_element->linux_type, new_element->linux_code, - new_element->type->s_name, new_element->name->s_name, - new_element->max, new_element->min); - post("\tpolled: %d relative: %d", - new_element->polled, new_element->relative); - element[x->x_device_number][element_count[x->x_device_number]] = new_element; - ++element_count[x->x_device_number]; + new_element->name = hid_convert_linux_buttons_to_numbers(j); } + else + { + new_element->name = gensym(event_names[i][j] ? event_names[i][j] : "?"); + } + if( i == EV_REL ) + new_element->relative = 1; + else + new_element->relative = 0; + element[x->x_device_number][element_count[x->x_device_number]] = new_element; + ++element_count[x->x_device_number]; } - } - } + } + } } } @@ -377,8 +367,6 @@ static void hid_build_element_list(t_hid *x) void hid_get_events(t_hid *x) { - debug_print(9,"hid_get_events"); - /* for debugging, counts how many events are processed each time hid_read() is called */ DEBUG(t_int event_counter = 0;); unsigned short i; @@ -434,27 +422,24 @@ t_int hid_open_device(t_hid *x, short device_number) debug_print(LOG_DEBUG,"hid_open_device"); char device_name[MAXPDSTRING] = "Unknown"; - char block_device[MAXPDSTRING] = "/dev/input/event0"; + char block_device[FILENAME_MAX] = "/dev/input/event0"; struct input_event hid_input_event; x->x_fd = -1; x->x_device_number = device_number; - snprintf(block_device,MAXPDSTRING,"/dev/input/event%d",x->x_device_number); - - if(block_device) - { - /* open the device read-only, non-exclusive */ - x->x_fd = open(block_device, O_RDONLY | O_NONBLOCK); - /* test if device open */ - if(x->x_fd < 0 ) - { - error("[hid] open %s failed",block_device); - x->x_fd = -1; - return 1; - } - } - + snprintf(block_device,FILENAME_MAX,"/dev/input/event%d",x->x_device_number); + + /* open the device read-only, non-exclusive */ + x->x_fd = open(block_device, O_RDONLY | O_NONBLOCK); + /* test if device open */ + if(x->x_fd < 0 ) + { + error("[hid] open %s failed",block_device); + x->x_fd = -1; + return 1; + } + /* read input_events from the HID_DEVICE stream * It seems that is just there to flush the input event queue */ @@ -465,7 +450,6 @@ t_int hid_open_device(t_hid *x, short device_number) post ("[hid] opened device %d (%s): %s", x->x_device_number,block_device,device_name); - post("pre hid_build_element_list"); hid_build_element_list(x); return (0); @@ -496,7 +480,7 @@ void hid_build_device_list(void) unsigned int i; unsigned int last_active_device = 0; char device_name[MAXPDSTRING] = "Unknown"; - char block_device[MAXPDSTRING] = "/dev/input/event0"; + char block_device[FILENAME_MAX] = "/dev/input/event0"; struct input_event x_input_event; debug_print(LOG_DEBUG,"hid_build_device_list"); @@ -551,7 +535,7 @@ void hid_platform_specific_info(t_hid* x) char product_id_string[7]; t_atom *output_atom = getbytes(sizeof(t_atom)); - ioctl(x->x_fd, EVIOCGID); + ioctl(x->x_fd, EVIOCGID, &my_id); snprintf(vendor_id_string,7,"0x%04x", my_id.vendor); SETSYMBOL(output_atom, gensym(vendor_id_string)); outlet_anything( x->x_status_outlet, gensym("vendorID"), @@ -570,6 +554,23 @@ void hid_platform_specific_info(t_hid* x) short get_device_number_by_id(unsigned short vendor_id, unsigned short product_id) { + int i, fd; + char dev_handle_name[FILENAME_MAX]; + struct input_id my_id; + + for(i=0;i<MAX_DEVICES;++i) + { + snprintf(dev_handle_name, FILENAME_MAX, "/dev/input/event%d", i); + /* open the device read-only, non-exclusive */ + fd = open (dev_handle_name, O_RDONLY | O_NONBLOCK); + /* test if device open */ + if(fd > -1 ) + { + ioctl(fd, EVIOCGID, &my_id); + if( (vendor_id == my_id.vendor) && (product_id == my_id.product) ) + return i; + } + } return -1; } diff --git a/joystick.pd b/joystick.pd index 5ea64cc..ef58f1a 100644 --- a/joystick.pd +++ b/joystick.pd @@ -1,4 +1,4 @@ -#N canvas 181 117 827 593 10; +#N canvas 123 51 827 593 10; #X msg 176 64 start; #X msg 185 83 stop; #X obj 157 30 inlet; @@ -13,7 +13,6 @@ #X obj 183 468 outlet; #X obj 249 428 outlet; #X obj 315 387 outlet; -#X obj 301 91 print RAW; #X text 574 280 button code/value list; #X text 171 509 X-axis; #X text 232 468 Y-axis; @@ -26,10 +25,10 @@ #X text 367 388 throttle/slider; #X text 426 343 hat0x; #X text 496 319 hat0y; -#X obj 315 368 autoscale 0 1; -#X obj 249 409 autoscale 0 1; -#X obj 183 449 autoscale 0 1; -#X obj 118 489 autoscale 0 1; +#X obj 315 368 mapping/autoscale 0 1; +#X obj 249 409 mapping/autoscale 0 1; +#X obj 183 449 mapping/autoscale 0 1; +#X obj 118 489 mapping/autoscale 0 1; #X text 8 6 [joystick]; #X obj 159 139 route abs key ff; #X msg 23 300 reset; @@ -58,25 +57,27 @@ device.; #X restore 23 110 pd reset_on_open; #X obj 118 264 route abs_x abs_y abs_rz abs_throttle abs_hat0x abs_hat0y ; +#X obj 26 78 route float; #X connect 0 0 9 0; #X connect 1 0 9 0; #X connect 2 0 9 0; -#X connect 2 0 32 0; -#X connect 9 0 30 0; -#X connect 25 0 12 0; -#X connect 26 0 11 0; -#X connect 27 0 10 0; -#X connect 28 0 4 0; -#X connect 30 0 33 0; -#X connect 30 1 8 0; -#X connect 31 0 28 0; -#X connect 31 0 27 0; -#X connect 31 0 26 0; -#X connect 31 0 25 0; -#X connect 32 0 31 0; -#X connect 33 0 28 0; -#X connect 33 1 27 0; -#X connect 33 2 26 0; -#X connect 33 3 25 0; -#X connect 33 4 5 0; -#X connect 33 5 6 0; +#X connect 2 0 33 0; +#X connect 9 0 29 0; +#X connect 24 0 12 0; +#X connect 25 0 11 0; +#X connect 26 0 10 0; +#X connect 27 0 4 0; +#X connect 29 0 32 0; +#X connect 29 1 8 0; +#X connect 30 0 27 0; +#X connect 30 0 26 0; +#X connect 30 0 25 0; +#X connect 30 0 24 0; +#X connect 31 0 30 0; +#X connect 32 0 27 0; +#X connect 32 1 26 0; +#X connect 32 2 25 0; +#X connect 32 3 24 0; +#X connect 32 4 5 0; +#X connect 32 5 6 0; +#X connect 33 1 31 0; @@ -14,8 +14,8 @@ #X msg 257 84 open \$1; #X obj 257 61 f \$1; #X obj 257 37 loadbang; -#X obj 25 323 autoscale -1 1; -#X obj 179 323 autoscale -1 1; +#X obj 25 323 mapping/autoscale -1 1; +#X obj 179 323 mapping/autoscale -1 1; #X obj 137 288 route rel_x rel_y rel_wheel; #X obj 398 313 print MOUSE_UNIMPLEMENTED_EVENT; #X text 413 139 this is for once this feature is implemented; |