Revision: 10102 http://pure-data.svn.sourceforge.net/pure-data/?rev=10102&view=rev Author: eighthave Date: 2008-06-25 12:54:45 -0700 (Wed, 25 Jun 2008)
Log Message: ----------- ported from [hid] to [hidio] using the same style as spiral-joystick
Added Paths: ----------- trunk/externals/io/hidio/examples/polar-joystick.pd
Added: trunk/externals/io/hidio/examples/polar-joystick.pd =================================================================== --- trunk/externals/io/hidio/examples/polar-joystick.pd (rev 0) +++ trunk/externals/io/hidio/examples/polar-joystick.pd 2008-06-25 19:54:45 UTC (rev 10102) @@ -0,0 +1,104 @@ +#N canvas 75 22 599 612 10; +#X declare -lib mapping; +#X obj 434 14 import mapping; +#X obj 219 459 mtof; +#X obj 219 479 osc~; +#X obj 30 479 line~; +#X msg 30 457 $1 5; +#X text 25 8 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 100 81 tgl 18 0 empty empty start 1 12 2 9 -225271 -1 -1 1 1 +; +#X obj 19 81 pddp/dsp; +#X obj 123 141 hidio; +#X obj 192 277 route x y rz z; +#X text 289 277 some joysticks call twist 'z' , others 'rz'; +#X obj 23 194 route absolute; +#X obj 23 277 route x y rz z; +#X obj 192 193 route absolute; +#X obj 192 172 route range; +#X obj 63 322 /; +#X obj 192 213 unpack symbol float float; +#X obj 192 234 pack symbol float; +#X obj 192 255 list trim; +#X obj 23 213 unpack symbol float float; +#X obj 23 234 pack symbol float; +#X obj 23 255 list trim; +#X obj 90 322 /; +#X obj 130 322 /; +#X obj 170 322 /; +#X msg 143 81 open joystick; +#X text 153 59 1; +#X text 102 59 2; +#X text 34 59 3; +#X text 247 68 <-- click these in the order specified; +#X obj 90 357 reverse; +#N canvas 0 22 450 300 get 0; +#X obj 60 9 inlet; +#X obj 60 261 outlet; +#X msg 60 197 info; +#X text 103 199 the [info( message outputs the range info; +#X obj 60 99 route open; +#X obj 60 173 purepd/once; +#X obj 60 121 select 1 0; +#X connect 0 0 4 0; +#X connect 2 0 1 0; +#X connect 4 0 6 0; +#X connect 5 0 2 0; +#X connect 6 0 5 0; +#X connect 6 1 5 1; +#X restore 176 116 pd get range info; +#X text 206 323 scale things to max 1 using the range values queryied +; +#X obj 63 380 polar; +#X obj 92 533 *~; +#X obj 122 577 dac~; +#X obj 92 554 pan/equal_power_pan~; +#X obj 212 536 hsl 128 15 0 1 0 1 empty empty empty -2 -8 0 10 -262144 +-1 -1 6350 0; +#X obj 219 419 stepper; +#X obj 30 436 elliptic_sigmoid 0.38 0.3; +#X text 309 233 we don't need instance numbers , so ignore them; +#X obj 219 439 notescale 56 68; +#X connect 1 0 2 0; +#X connect 2 0 34 1; +#X connect 3 0 34 0; +#X connect 4 0 3 0; +#X connect 6 0 8 0; +#X connect 8 0 11 0; +#X connect 8 1 14 0; +#X connect 8 1 31 0; +#X connect 9 0 15 1; +#X connect 9 1 22 1; +#X connect 9 2 23 1; +#X connect 9 3 24 0; +#X connect 11 0 19 0; +#X connect 12 0 15 0; +#X connect 12 1 22 0; +#X connect 12 2 23 0; +#X connect 12 3 24 0; +#X connect 13 0 16 0; +#X connect 14 0 13 0; +#X connect 15 0 33 0; +#X connect 16 0 17 0; +#X connect 16 2 17 1; +#X connect 17 0 18 0; +#X connect 18 0 9 0; +#X connect 19 0 20 0; +#X connect 19 2 20 1; +#X connect 20 0 21 0; +#X connect 21 0 12 0; +#X connect 22 0 30 0; +#X connect 25 0 8 0; +#X connect 30 0 33 1; +#X connect 31 0 8 0; +#X connect 33 0 39 0; +#X connect 33 1 38 0; +#X connect 34 0 36 0; +#X connect 36 0 35 0; +#X connect 36 1 35 1; +#X connect 37 0 36 1; +#X connect 38 0 41 0; +#X connect 39 0 4 0; +#X connect 41 0 1 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.