Update of /cvsroot/pure-data/externals/mapping/pd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22278/pd
Added Files: autoscale.pd curve_exp.pd curve_graph.pd curve_log.pd curve_power.pd curve_root.pd debounce.pd degrees2mapping.pd disjoin.pd join.pd mapping2degrees.pd mapping2radians.pd polar.pd radians2mapping.pd reverse.pd vector.pd Log Message: this is the first checkin for the new mapping lib, which is a join effort of Cyrille and Hans. We are combining Cyrille's ds_/datastream classes with my hid_* classes, and I think Cyrille has drawn on the La-Kitchen classes for working with sensors.
--- NEW FILE: degrees2mapping.pd --- #N canvas 380 212 444 356 10; #X obj 88 30 inlet; #X obj 89 264 outlet; #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 143 264 output range: 0 to 360 , 0 = north/top; #X text 19 9 [deg2hid]; #X text 129 28 input range: 0 to 360 , 0 = east/right; #X obj 88 170 / 360; #X text 162 108 % is an int operation; #X text 169 126 this saves accuracy; #X obj 89 121 % 3.6e+07; #X obj 89 142 / 100000; #X obj 89 100 * 100000; #X obj 45 210 moses 0; #X obj 45 230 + 1; #X connect 0 0 12 0; #X connect 7 0 13 0; #X connect 10 0 11 0; #X connect 11 0 7 0; #X connect 12 0 10 0; #X connect 13 0 14 0; #X connect 13 1 1 0; #X connect 14 0 1 0;
--- NEW FILE: vector.pd --- #N canvas 711 171 488 431 10; #X obj 30 75 inlet; #X obj 25 300 outlet; #X text 73 300 output range: 0 to 1; #X obj 232 299 outlet; #X obj 164 73 inlet; #X text 11 31 x-axis value; #X text 167 30 y-axis value; #X obj 25 269 / 1.41421; #X text 92 269 (sqrt 2); #X text 280 299 output range: 0 to 1; #X text 245 371 released under the GNU GPL; #X text 28 357 (C) Copyright 2005 Hans-Christoph Steiner hans@at.or.at ; #X text 9 48 input range: -1 to 1; #X text 168 48 input range: -1 to 1; #X text 230 319 direction; #X text 23 318 magnatude; #X obj 153 197 zexy/cart2pol; #X obj 231 267 radians2mapping; #X obj 29 159 float; #X obj 76 127 trigger bang float; #X connect 0 0 18 0; #X connect 4 0 19 0; #X connect 7 0 1 0; #X connect 16 0 7 0; #X connect 16 1 17 0; #X connect 17 0 3 0; #X connect 18 0 16 0; #X connect 19 0 18 0; #X connect 19 1 16 1;
--- NEW FILE: curve_graph.pd --- #N canvas 606 208 100 116 10; #X obj 103 188 inlet; #N canvas 0 22 466 316 graph5 0; #X array $0_ 100 float 2; #X coords 0 1 100 0 100 100 1; #X restore 0 16 graph; #X obj 198 378 outlet; #X text 238 311 gives a range of 0-100; #X text 245 379 output range 0 to 1; #X text 79 167 [hid_graph]; #X obj 198 310 * 100; #X text 143 190 input range: 0 to 1; #X obj 103 237 route reset; #X obj 75 380 f; #X obj 45 380 +; #X msg 89 348 0; #X msg 45 348 1; #X obj 45 464 / 100; #X obj 45 441 trigger f f; #X obj 21 278 trigger bang bang; #X msg 21 303 100; #X obj 21 322 until; #X obj 198 333 tabread $0_; #X obj 45 496 tabwrite $0_; #X obj -7 229 loadbang; #X connect 0 0 8 0; #X connect 6 0 18 0; #X connect 8 0 15 0; #X connect 8 1 6 0; #X connect 9 0 10 1; #X connect 10 0 14 0; #X connect 10 0 9 0; #X connect 11 0 9 1; #X connect 11 0 10 1; #X connect 12 0 10 0; #X connect 13 0 19 0; #X connect 14 0 13 0; #X connect 14 1 19 1; #X connect 15 0 16 0; #X connect 15 1 11 0; #X connect 16 0 17 0; #X connect 17 0 12 0; #X connect 18 0 2 0; #X connect 20 0 15 0; #X coords 0 0 1 1 100 116 1;
--- NEW FILE: curve_log.pd --- #N canvas 297 485 422 322 10; #X obj 31 45 inlet; #X obj 31 282 outlet; #X text 79 45 input range: 0 to 1; #X text 87 282 output range: 0 to 1; #X text 9 5 [hid_log]; #X obj 30 145 rmstodb; #X obj 30 175 / 100; #X connect 0 0 5 0; #X connect 5 0 6 0; #X connect 6 0 1 0;
--- NEW FILE: autoscale.pd --- #N canvas 206 226 777 546 10; #X obj 45 30 inlet; #X obj 175 453 outlet; #X obj 235 268 f; #X text 262 268 min; #X text 360 269 max; #X obj 454 167 f $1; #X obj 652 167 f $2; #X obj 235 245 moses 0; #X obj 320 245 moses 0; #X obj 175 102 trigger float float float bang bang; #X obj 175 390 expr (($f1 - $f2) * (($f5 - $f4) / ($f3 - $f2))) + $f4 ; #X obj 326 205 oneshot; #X obj 364 226 f; #X obj 320 178 t f b f; #X obj 241 205 oneshot; #X obj 279 226 f; #X obj 235 178 t f b f; #X obj 384 269 + 1e-09; #X obj 478 213 ==; #X obj 478 233 sel 1; #X obj 545 77 loadbang; #X obj 478 299 print [autoscale]; #X floatatom 472 189 5 0 0 0 - - -; #X obj 545 100 t b b; #X obj 478 256 oneshot; #X text 2 476 (C) Copyright 2004 Hans-Christoph Steiner hans@at.or.at ; #X text 219 491 released under the GNU GPL; #X text 417 475 $Revision: 1.1 $$Date: 2006/01/29 05:43:33 $; #X text 417 488 $Author: eighthave $; #X obj 45 62 route reset; #X obj 45 81 bang; #X msg 45 129 0; #X msg 114 102 clear; #X text 172 47 these [oneshot] bits are just here to get the max/min tracking started; #X text 8 3 [autoscale]; #X msg 478 278 using default range (0-1); #X obj 454 329 expr if ($f1 == $f2 , 0 , $f1) ; if ($f1 == $f2 , 1 , $f2); #X connect 0 0 29 0; #X connect 2 0 7 1; #X connect 2 0 10 1; #X connect 5 0 18 0; #X connect 5 0 22 0; #X connect 5 0 36 0; #X connect 6 0 18 1; #X connect 6 0 36 1; #X connect 7 0 2 0; #X connect 8 1 17 0; #X connect 9 0 10 0; #X connect 9 1 16 0; #X connect 9 2 13 0; #X connect 9 3 5 0; #X connect 9 4 6 0; #X connect 10 0 1 0; #X connect 11 0 12 0; #X connect 12 0 8 1; #X connect 13 0 8 0; #X connect 13 1 11 0; #X connect 13 2 12 1; #X connect 14 0 15 0; #X connect 15 0 7 1; #X connect 16 0 7 0; #X connect 16 1 14 0; #X connect 16 2 15 1; #X connect 17 0 8 1; #X connect 17 0 10 2; #X connect 18 0 19 0; #X connect 19 0 24 0; #X connect 20 0 23 0; #X connect 23 0 5 0; #X connect 23 1 6 0; #X connect 24 0 35 0; #X connect 29 0 30 0; #X connect 29 1 9 0; #X connect 30 0 31 0; #X connect 30 0 32 0; #X connect 31 0 2 0; #X connect 31 0 12 0; #X connect 32 0 14 0; #X connect 32 0 11 0; #X connect 35 0 21 0; #X connect 36 0 10 3; #X connect 36 1 10 4;
--- NEW FILE: debounce.pd --- #N canvas 132 316 478 432 10; #X obj 38 43 inlet; #X obj 252 108 f $1; #X obj 252 85 loadbang; #X obj 226 33 inlet; #X obj 251 132 select 0; #X text 274 34 delay between state change; #X obj 62 381 outlet; #X obj 61 325 f; #X text 298 152 set default; #X obj 246 189 send $0-delay; #X obj 157 271 delay; #X obj 187 248 receive $0-delay; #X text 80 31 float input; #X text 120 378 debounced float output; #X msg 250 152 10; #X obj 100 103 change; #X connect 0 0 7 1; #X connect 0 0 15 0; #X connect 1 0 4 0; #X connect 2 0 1 0; #X connect 3 0 9 0; #X connect 4 0 14 0; #X connect 4 1 9 0; #X connect 7 0 6 0; #X connect 10 0 7 0; #X connect 11 0 10 1; #X connect 14 0 9 0;
--- NEW FILE: curve_root.pd --- #N canvas 295 229 460 377 10; #X obj 40 32 inlet; #X obj 40 299 outlet; #X obj 40 94 min 1; #X text 5 6 input range: -1 to 1; #X obj 40 114 max -1; #X obj 41 271 pow; #X text 96 298 output range: -1 to 1; #X obj 58 246 /; #X msg 58 226 1 $1; #X obj 142 33 inlet; #X obj 155 107 float_argument $1 1; #X obj 155 86 loadbang; #X connect 0 0 2 0; #X connect 2 0 4 0; #X connect 4 0 5 0; #X connect 5 0 1 0; #X connect 7 0 5 1; #X connect 8 0 7 0; #X connect 9 0 8 0; #X connect 10 0 8 0; #X connect 11 0 10 0;
--- NEW FILE: join.pd --- #N canvas 492 503 452 397 10; #X obj 32 24 inlet; #X obj 78 25 inlet; #X obj 125 25 inlet; #X obj 32 215 outlet; #X obj 125 71 t b f; #X obj 142 48 loadbang; #X msg 125 93 1; #X obj 125 117 - $1; #X obj 78 180 + $1; #X obj 32 119 * $1; #X obj 78 153 *; #X connect 0 0 9 0; #X connect 1 0 10 0; #X connect 2 0 4 0; #X connect 2 0 8 1; #X connect 2 0 9 1; #X connect 4 0 6 0; #X connect 4 1 7 1; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 10 1; #X connect 8 0 3 0; #X connect 9 0 3 0; #X connect 10 0 8 0;
--- NEW FILE: polar.pd --- #N canvas 189 157 476 419 10; #X obj 30 58 inlet; #X obj 25 313 outlet; #X text 73 313 output range: 0 to 1; #X text 72 57 input range: 0 to 1; #X text 11 5 [hid_polar]; #X obj 232 312 outlet; #X obj 224 56 inlet; #X text 264 57 input range: 0 to 1; #X text 29 29 x-axis value; #X text 221 26 y-axis value; #X obj 252 140 - 1; #X obj 252 120 * 2; #X obj 29 140 - 1; #X obj 29 120 * 2; #X text 61 125 convert range to -1 to 1; #X text 280 312 output range: 0 to 1; #X text 245 371 released under the GNU GPL; #X text 28 357 (C) Copyright 2005 Hans-Christoph Steiner hans@at.or.at ; #X text 23 331 radius; #X text 230 332 angle; #X obj 88 218 vector; #X connect 0 0 13 0; #X connect 6 0 11 0; #X connect 10 0 20 1; #X connect 11 0 10 0; #X connect 12 0 20 0; #X connect 13 0 12 0; #X connect 20 0 1 0; #X connect 20 1 5 0;
--- NEW FILE: mapping2radians.pd --- #N canvas 287 246 432 344 10; #X obj 88 30 inlet; #X obj 89 264 outlet; #X text 19 9 [hid2rad]; #X obj 89 198 * 6.28318; #X obj 88 101 moses 0.5; #X obj 88 56 min 1; #X obj 88 74 max 0; #X obj 147 133 - 1; #X text 133 63 its a [hid] object , so limit input range; #X text 129 28 input range: 0 to 1; #X text 143 264 output range: -pi to pi; #X text 232 311 released under the GNU GPL; #X text 15 297 (C) Copyright 2005 Hans-Christoph Steiner hans@at.or.at ; #X connect 0 0 5 0; #X connect 3 0 1 0; #X connect 4 0 3 0; #X connect 4 1 7 0; #X connect 5 0 6 0; #X connect 6 0 4 0; #X connect 7 0 3 0;
--- NEW FILE: curve_exp.pd --- #N canvas 225 325 499 325 10; #X obj 72 38 inlet; #X obj 72 258 outlet; #X text 120 38 input range: 0 to 1; #X text 128 258 output range: 0 to 1; #X text 7 9 [hid_exp]; #X obj 73 142 dbtorms; #X obj 73 120 * 100; #X connect 0 0 6 0; #X connect 5 0 1 0; #X connect 6 0 5 0;
--- NEW FILE: reverse.pd --- #N canvas 360 364 385 311 10; #X obj 70 32 inlet; #X obj 84 249 outlet; #X text 140 249 output range: 0 to 1; #X text 118 32 input range: 0 to 1; #X obj 84 142 -; #X msg 70 122 1; #X obj 70 103 t b f; #X connect 0 0 6 0; #X connect 4 0 1 0; #X connect 5 0 4 0; #X connect 6 0 5 0; #X connect 6 1 4 1;
--- NEW FILE: curve_power.pd --- #N canvas 612 444 456 373 10; #X obj 42 53 inlet; #X obj 42 230 outlet; #X text 5 14 input range: -1 to 1; #X obj 43 182 pow; #X text 98 229 output range: -1 to 1; #X obj 138 53 inlet; #X obj 146 106 float_argument $1 1; #X obj 146 84 loadbang; #X connect 0 0 3 0; #X connect 3 0 1 0; #X connect 5 0 3 1; #X connect 6 0 3 1; #X connect 7 0 6 0;
--- NEW FILE: disjoin.pd --- #N canvas 0 22 454 304 10; #X obj 62 28 inlet; #X obj 62 53 moses $1; #X obj 62 204 outlet; #X obj 113 203 outlet; #X obj 62 100 / $1; #X obj 152 27 inlet; #X obj 113 101 - $1; #X obj 177 83 t b f; #X obj 161 63 loadbang; #X obj 113 158 / 1; #X msg 177 105 1; #X obj 177 129 - $1; #X connect 0 0 1 0; #X connect 1 0 4 0; #X connect 1 1 6 0; #X connect 4 0 2 0; #X connect 5 0 4 1; #X connect 5 0 6 1; #X connect 5 0 7 0; #X connect 6 0 9 0; #X connect 7 0 10 0; #X connect 7 1 11 1; #X connect 8 0 10 0; #X connect 9 0 3 0; #X connect 10 0 11 0; #X connect 11 0 9 1;
--- NEW FILE: radians2mapping.pd --- #N canvas 258 110 429 400 10; #X obj 42 36 inlet; #X obj 140 297 outlet; #X text 19 9 [rad2hid]; #X obj 141 234 % 628318; #X obj 127 167 moses 0; #X obj 141 255 / 628318; #X obj 42 96 * 100000; #X obj 41 167 % 628318; #X obj 42 136 moses -314159; #X obj 85 200 + 628318; #X text 10 66 % is an int operation , we want floats , so convert to large integers; #X text 225 351 released under the GNU GPL; #X text 8 337 (C) Copyright 2005 Hans-Christoph Steiner hans@at.or.at ; #X connect 0 0 6 0; #X connect 3 0 5 0; #X connect 4 0 9 0; #X connect 4 1 3 0; #X connect 5 0 1 0; #X connect 6 0 8 0; #X connect 7 0 9 0; #X connect 8 0 7 0; #X connect 8 1 4 0; #X connect 9 0 3 0;
--- NEW FILE: mapping2degrees.pd --- #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;