Mercurial > hg > weather-synthesis-prototyping
view SwordSounds2/Sword10_D1.pd @ 306:c57f401165ca tip
New Decision tree added
author | Rod Selfridge <r.selfridge@qmul.ac.uk> |
---|---|
date | Sat, 13 Jan 2018 14:47:35 +0000 |
parents | 6aaeb2789f99 |
children |
line wrap: on
line source
#N canvas 34 32 1433 837 10; #X obj 561 -83 vu 15 120 empty empty -1 -8 0 10 -66577 -1 1 0; #X obj 624 -83 vu 15 120 empty empty -1 -8 0 10 -66577 -1 1 0; #X text 621 -174 Gain; #X obj 560 -200 loadbang; #N canvas 865 368 284 318 opLevels 0; #X obj 85 188 dac~; #X obj 30 70 catch~ l; #X obj 155 76 catch~ r; #X obj 155 106 *~ 0.45; #X obj 30 104 *~ 0.45; #X obj 30 210 prvu~; #X obj 155 213 prvu~; #X obj 100 69 / 127; #X obj 100 34 inlet; #X obj 30 239 outlet; #X obj 155 241 outlet; #X obj 155 132 /~ 1; #X obj 30 131 /~ 1; #X obj 204 29 inlet; #X connect 1 0 4 0; #X connect 2 0 3 0; #X connect 3 0 11 0; #X connect 4 0 12 0; #X connect 5 0 9 0; #X connect 6 0 10 0; #X connect 7 0 3 1; #X connect 7 0 4 1; #X connect 8 0 7 0; #X connect 11 0 0 1; #X connect 11 0 6 0; #X connect 12 0 0 0; #X connect 12 0 5 0; #X connect 13 0 12 1; #X connect 13 0 11 1; #X restore 560 -126 pd opLevels; #X msg 560 -177 5; #X msg 34 -205 1; #X obj 34 -182 s bladeLen; #X obj -168 -173 s NoOfSources; #X obj 95 151 s topSpeed; #X obj 43 125 hsl 100 20 0 100 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 3070 1; #X floatatom 40 151 8 0 0 0 - - -; #X text 67 -206 Blade Length; #X text 66 -140 Arm Length; #X text -140 -196 Number of Sources; #X text 151 129 Top Speed; #X obj 830 -131 hsl 100 20 0 180 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 8000 1; #X floatatom 827 -99 8 0 0 0 - - -; #N canvas 528 427 426 335 thickCalc 0; #X obj 173 139 r NoOfSources; #X obj 158 115 -; #X obj 158 164 /; #X floatatom 126 147 5 0 0 0 - - -; #X floatatom 94 189 8 0 0 0 - - -; #X obj 173 72 t f b; #X obj 200 95 delay 9; #X text 58 237 Calculates the difference in thickness between sources ; #X text 59 254 based on the blade tapering in a straight line; #X obj 158 19 r hiltThick; #X obj 173 44 r tipThick; #X obj 158 187 s deltaThick; #X connect 0 0 2 1; #X connect 1 0 2 0; #X connect 1 0 3 0; #X connect 2 0 4 0; #X connect 2 0 11 0; #X connect 5 0 1 1; #X connect 5 1 6 0; #X connect 6 0 1 0; #X connect 9 0 1 0; #X connect 10 0 5 0; #X restore 392 -103 pd thickCalc; #X obj 37 212 hsl 100 20 0 0.03 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 3500 1; #X obj 36 297 hsl 100 20 0 0.01 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 1368 1; #X floatatom 34 242 8 0 0 0 - - -; #X obj 88 241 s hiltThick; #X floatatom 33 325 8 0 0 0 - - -; #X obj 91 324 s tipThick; #X text 151 214 Hilt Thickness; #X text 143 298 Tip Thickness; #X obj 234 -160 bng 50 250 50 0 empty empty empty 17 7 0 10 -4034 -1 -1; #X obj 234 -107 s GO; #X obj -249 138 hsl 100 20 100 1 1 0 empty empty empty -2 -8 0 10 -262144 -1 -1 8410 1; #X obj -253 223 hsl 100 20 -180 180 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 6600 1; #X floatatom -252 164 8 0 0 0 - - -; #X text -139 142 Distance to Observer; #X floatatom -256 251 8 0 0 0 - - -; #X text -131 217 Angle to Observer; #X obj 234 -206 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 234 -187 metro 200; #X obj 288 -211 hsl 100 20 300 50 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 900 1; #X obj 174 -160 bng 50 250 50 0 empty empty empty 17 7 0 10 -257985 -1 -1; #X obj 174 -107 s setUp; #X obj -13 99 r setUp; #X obj 769 -151 r setUp; #X obj -17 189 r setUp; #X obj -18 277 r setUp; #X obj -304 117 r setUp; #X obj -307 201 r setUp; #X obj -193 165 s obsDistance; #X obj -197 252 s obsAngle; #N canvas 215 79 911 675 circumferCalc 0; #X obj 440 104 +; #X obj 440 127 s length; #X obj 168 153 r start_armLength; #X obj 153 86 r presweepAzim; #X obj 644 76 bng 50 250 50 0 empty empty empty 17 7 0 10 -4034 -1 -1; #X obj 644 129 s GO; #X obj 584 76 bng 50 250 50 0 empty empty empty 17 7 0 10 -257985 -1 -1; #X obj 584 129 s setUp; #X obj 153 132 * 6.28312; #X obj 153 110 / 360; #X obj 153 174 *; #X floatatom 91 198 5 0 0 0 - - -; #X text 194 175 Circumference of the nearest source on blade; #X text 307 191 up to 0 azimuth; #X obj 153 200 s minPreCirc; #X obj 452 300 r start_armLength; #X obj 437 279 * 6.28312; #X obj 437 257 / 360; #X obj 437 321 *; #X floatatom 375 345 5 0 0 0 - - -; #X text 478 322 Circumference of the nearest source on blade; #X text 914 158 up to 0 azimuth; #X obj 437 233 r postsweepAzim; #X obj 437 347 s minPostCirc; #X obj 149 252 r presweepAzim; #X obj 149 298 * 6.28312; #X obj 149 276 / 360; #X obj 149 342 *; #X obj 164 320 r length; #X floatatom 111 364 5 0 0 0 - - -; #X obj 440 57 r bladeLen; #X obj 455 81 r start_armLength; #X obj 437 434 * 6.28312; #X obj 437 412 / 360; #X obj 437 478 *; #X obj 452 456 r length; #X floatatom 399 501 5 0 0 0 - - -; #X obj 437 388 r postsweepAzim; #X obj 164 362 r minPreCirc; #X obj 149 383 -; #X obj 149 426 /; #X floatatom 111 454 5 0 0 0 - - -; #X obj 164 403 r NoOfSources; #X obj 149 454 s deltaPreCirc; #X obj 437 519 -; #X obj 437 562 /; #X obj 452 539 r NoOfSources; #X obj 452 498 r minPostCirc; #X obj 437 590 s deltaPostCirc; #X floatatom 397 591 5 0 0 0 - - -; #X text 33 334 Max Circumference; #X text 323 472 Max Circumference; #X connect 0 0 1 0; #X connect 2 0 10 1; #X connect 3 0 9 0; #X connect 4 0 5 0; #X connect 6 0 7 0; #X connect 8 0 10 0; #X connect 9 0 8 0; #X connect 10 0 11 0; #X connect 10 0 14 0; #X connect 15 0 18 1; #X connect 16 0 18 0; #X connect 17 0 16 0; #X connect 18 0 19 0; #X connect 18 0 23 0; #X connect 22 0 17 0; #X connect 24 0 26 0; #X connect 25 0 27 0; #X connect 26 0 25 0; #X connect 27 0 29 0; #X connect 27 0 39 0; #X connect 28 0 27 1; #X connect 30 0 0 0; #X connect 31 0 0 1; #X connect 32 0 34 0; #X connect 33 0 32 0; #X connect 34 0 36 0; #X connect 34 0 44 0; #X connect 35 0 34 1; #X connect 37 0 33 0; #X connect 38 0 39 1; #X connect 39 0 40 0; #X connect 40 0 41 0; #X connect 40 0 43 0; #X connect 42 0 40 1; #X connect 44 0 45 0; #X connect 45 0 48 0; #X connect 45 0 49 0; #X connect 46 0 45 1; #X connect 47 0 44 1; #X restore 367 -26 pd circumferCalc; #N canvas 303 28 1094 768 angleCalc 0; #X obj -129 105 * 0.75; #X obj 325 234 * 0.25; #X obj -129 145 /; #X obj -144 199 * 1000; #X obj 263 254 delay \$1; #X obj 236 202 f; #X obj 236 159 r GO; #X obj 236 228 t f b; #X msg 227 367 0; #X obj 325 276 /; #X obj 325 298 * 1000; #X obj -127 225 s \$0_thisDe; #X obj 251 181 r \$0_thisDe; #X obj 145 237 r sweepAngle; #X obj -129 81 r maxCirc; #X obj 325 212 r maxCirc; #X obj -114 124 r topSpeed; #X obj 340 255 r topSpeed; #X obj 644 360 delay \$1; #X obj 646 302 f; #X obj 639 248 r GO; #X obj 646 328 t f b; #X obj 682 208 r maxCirc; #X obj 697 230 r topSpeed; #X obj 682 254 /; #X obj 682 276 * 1000; #X obj 644 407 s end; #X obj -77 312 r end; #X obj 145 260 * -0.25; #X text -193 45 0.75 represents the ratio of swing that; #X text 200 118 0.25 represents the ratio of swing that; #X text 200 132 the sword is decelerating; #X text -102 149 Time taken for acceleration; #X text -54 221 Send as a delay; #X text 280 160 Recieve as a delay; #X text -36 312 Reset angle; #X text -38 325 once swing complete; #X text 622 426 Send bang message at the; #X text 623 438 end of the swing to reset; #X text 379 296 Time for last; #X text 381 307 1/4 of swing; #X text -193 59 the sword is before 0 degrees; #X text -121 700 Output of complete swing \, split into 75% before 0 degrees and 25% past 0 degrees; #X text 568 517 Once delay from start to 0 degrees complete; #X text 564 535 count down from 0 to finish the total swing angle; #X text 98 9 Patch that calculates the angle between 0 degrees for the full length of the swing; #X obj -144 482 line~; #X obj 86 601 metro 10; #X obj 86 632 snapshot~; #X floatatom 85 656 8 0 0 0 - - -; #X obj 172 397 line~; #X msg 172 350 \$1 \$2; #X obj 151 319 pack; #X obj 86 570 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X floatatom -108 266 5 0 0 0 - - -; #X msg -90 438 \$1; #X obj -48 365 r sweepAngle; #X obj -48 387 * 0.75; #X msg -144 427 0 \$1; #X obj -62 341 r setUp; #X obj 151 294 f; #X obj -4 549 +~; #X obj 227 342 r setUp; #X floatatom -63 474 5 0 0 0 - - -; #X text 11 464 comment; #X obj -63 409 f; #X floatatom -26 434 5 0 0 0 - - -; #X obj 286 343 r end; #X obj 632 276 delay 9; #X obj 644 383 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj -144 174 f; #X obj -163 143 r GO; #X obj -4 633 s~ swordAngle; #X text 241 325 Set to 0 at end; #X obj 86 545 loadbang; #X obj 68 509 r obsAngle; #X obj -4 576 +~ 1; #X text 141 470 Adding in the observer angle here offsets the swing angle by the angle the observer is at. This makes all the future calculations as if the observer is positioned at 0 degrees to the swordSwing.; #X connect 0 0 2 0; #X connect 1 0 9 0; #X connect 2 0 70 1; #X connect 3 0 11 0; #X connect 3 0 54 0; #X connect 3 0 58 0; #X connect 4 0 60 0; #X connect 5 0 7 0; #X connect 6 0 5 0; #X connect 7 0 4 1; #X connect 7 1 4 0; #X connect 8 0 50 0; #X connect 9 0 10 0; #X connect 10 0 52 1; #X connect 12 0 5 1; #X connect 13 0 28 0; #X connect 14 0 0 0; #X connect 15 0 1 0; #X connect 16 0 2 1; #X connect 17 0 9 1; #X connect 18 0 69 0; #X connect 19 0 21 0; #X connect 20 0 68 0; #X connect 21 0 18 1; #X connect 21 1 18 0; #X connect 22 0 24 0; #X connect 23 0 24 1; #X connect 24 0 25 0; #X connect 25 0 19 1; #X connect 27 0 65 0; #X connect 28 0 60 1; #X connect 46 0 61 0; #X connect 47 0 48 0; #X connect 48 0 49 0; #X connect 50 0 61 1; #X connect 51 0 50 0; #X connect 52 0 51 0; #X connect 53 0 47 0; #X connect 55 0 46 0; #X connect 55 0 63 0; #X connect 56 0 57 0; #X connect 57 0 65 1; #X connect 57 0 66 0; #X connect 58 0 46 0; #X connect 59 0 65 0; #X connect 60 0 52 0; #X connect 61 0 76 0; #X connect 62 0 8 0; #X connect 65 0 55 0; #X connect 67 0 8 0; #X connect 68 0 19 0; #X connect 69 0 26 0; #X connect 70 0 3 0; #X connect 71 0 70 0; #X connect 74 0 53 0; #X connect 75 0 76 1; #X connect 76 0 72 0; #X connect 76 0 48 0; #X restore 391 -136 pd angleCalc; #X obj 563 -155 hsl 100 25 0 127 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 5354 1; #X obj 34 -229 loadbang; #X obj 32 -160 loadbang; #X obj -168 -218 loadbang; #X msg -166 -124 0; #X obj -166 -102 s elev; #X text -134 229 (Azimuth); #X obj -166 -147 loadbang; #X obj 457 565 s thisTS; #X obj 476 544 s thisSA; #X obj 496 522 s thisHT; #X obj 515 499 s thisTT; #X obj 535 478 s thisOD; #X obj 554 458 s thisOA; #X obj 574 436 s thisG; #X obj 40 99 r thisTS; #X obj 827 -152 r thisSA; #X obj 34 189 r thisHT; #X obj 33 277 r thisTT; #X obj -252 117 r thisOD; #X obj -255 202 r thisOA; #X obj 508 -175 r thisG; #X obj 457 412 unpack f f f f f f f; #X obj -218 -147 r setUp; #X obj -221 -216 r setUp; #X obj -17 -162 r setUp; #X obj -18 -227 r setUp; #X text 394 412 Presets; #X msg 466 307 20 160 0.01 0.004 2 0 127; #X msg 457 284 43 215 0.0085 0.0025 4 90 40; #X msg 476 330 30 280 0.0095 0.0032 2 60 120; #X text 726 293 Currently the noise sources are not connected but still getting a zipping type sound. It seems to get worse with sources lower down the blade - this needs looked into; #X obj 457 255 loadbang; #X obj 174 -212 loadbang; #X obj 174 -188 delay 13; #X obj 409 337 t b; #X obj 389 360 s setUp; #X obj -257 297 hsl 100 20 -180 180 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X floatatom -260 325 8 0 0 0 - - -; #X text -135 291 Angle to Observer; #X obj -311 275 r setUp; #X obj -259 276 r thisOE; #X obj -201 326 s obsElev; #X text -138 303 (Elevation); #X obj 828 -53 hsl 100 20 0 180 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 3300 1; #X floatatom 825 -21 8 0 0 0 - - -; #X obj 767 -73 r setUp; #X obj 825 -74 r thisSA; #X obj 823 60 hsl 100 20 0 90 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 5600 1; #X floatatom 820 92 8 0 0 0 - - -; #X obj 762 40 r setUp; #X obj 820 39 r thisSA; #X obj 821 138 hsl 100 20 0 90 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 2400 1; #X floatatom 818 170 8 0 0 0 - - -; #X obj 760 118 r setUp; #X obj 818 117 r thisSA; #N canvas 419 64 689 650 allSource 1; #X obj 187 127 r distance; #X obj 170 106 r angle; #X obj 153 65 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 153 37 r setUp; #X obj 204 147 r elev; #X msg 153 84 10; #X obj 153 170 tenSource; #X connect 0 0 6 2; #X connect 1 0 6 1; #X connect 2 0 5 0; #X connect 3 0 2 0; #X connect 4 0 6 3; #X connect 5 0 6 0; #X restore 391 -75 pd allSource; #X obj 875 91 s presweepElev; #X obj 873 169 s postsweepElev; #X text 934 61 pre-sweep elevation; #X text 932 138 post-sweep elevation; #X text 941 -130 pre-sweep azimuth; #X text 939 -52 post-sweep azimuth; #X obj 882 -100 s presweepAzim; #X obj 880 -22 s postsweepAzim; #X obj 32 -118 s start_armLength; #X msg 32 -139 0.35; #X obj 410 -50 sweepTime; #X obj 672 -195 hsl 100 25 1 100 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 900 1; #X floatatom 688 -155 5 0 0 0 - - -; #X msg -168 -196 10; #X connect 3 0 5 0; #X connect 4 0 0 0; #X connect 4 1 1 0; #X connect 5 0 50 0; #X connect 6 0 7 0; #X connect 10 0 9 0; #X connect 10 0 11 0; #X connect 16 0 17 0; #X connect 16 0 113 0; #X connect 19 0 21 0; #X connect 19 0 22 0; #X connect 20 0 23 0; #X connect 20 0 24 0; #X connect 27 0 28 0; #X connect 29 0 31 0; #X connect 29 0 46 0; #X connect 30 0 33 0; #X connect 30 0 47 0; #X connect 35 0 36 0; #X connect 36 0 27 0; #X connect 37 0 36 1; #X connect 38 0 39 0; #X connect 40 0 10 0; #X connect 41 0 16 0; #X connect 42 0 19 0; #X connect 43 0 20 0; #X connect 44 0 29 0; #X connect 45 0 30 0; #X connect 50 0 4 0; #X connect 51 0 6 0; #X connect 52 0 116 0; #X connect 53 0 120 0; #X connect 54 0 55 0; #X connect 57 0 54 0; #X connect 65 0 10 0; #X connect 67 0 19 0; #X connect 68 0 20 0; #X connect 69 0 29 0; #X connect 70 0 30 0; #X connect 71 0 50 0; #X connect 72 0 58 0; #X connect 72 1 59 0; #X connect 72 2 60 0; #X connect 72 3 61 0; #X connect 72 4 62 0; #X connect 72 5 63 0; #X connect 72 6 64 0; #X connect 73 0 54 0; #X connect 74 0 120 0; #X connect 75 0 116 0; #X connect 76 0 6 0; #X connect 78 0 72 0; #X connect 78 0 85 0; #X connect 79 0 72 0; #X connect 79 0 85 0; #X connect 80 0 72 0; #X connect 80 0 85 0; #X connect 82 0 79 0; #X connect 83 0 84 0; #X connect 84 0 38 0; #X connect 85 0 86 0; #X connect 87 0 88 0; #X connect 87 0 92 0; #X connect 90 0 87 0; #X connect 91 0 87 0; #X connect 94 0 95 0; #X connect 94 0 114 0; #X connect 96 0 94 0; #X connect 98 0 99 0; #X connect 98 0 107 0; #X connect 100 0 98 0; #X connect 101 0 98 0; #X connect 102 0 103 0; #X connect 102 0 108 0; #X connect 104 0 102 0; #X connect 105 0 102 0; #X connect 116 0 115 0; #X connect 118 0 4 1; #X connect 118 0 119 0; #X connect 120 0 8 0;