diff --git a/_dariusmasheen.pd b/_dariusmasheen.pd new file mode 100755 index 0000000..8c683ad --- /dev/null +++ b/_dariusmasheen.pd @@ -0,0 +1,126 @@ +#N canvas -1504 13 974 769 12; +#X obj 74 93 bartoa; +#X obj 74 123 deegaj; +#X obj 74 153 johnsz2; +#X obj 74 183 martse; +#X obj 74 213 mucelj; +#X obj 74 243 nik; +#X obj 74 273 novaa; +#X obj 74 303 ortegm3; +#X obj 74 333 persow; +#X obj 74 363 plancs; +#X obj 74 393 quarlm; +#X obj 74 423 rothgj; +#X obj 74 453 schans2; +#X obj 74 483 sheny13; +#X obj 74 513 smithd32; +#X obj 74 543 takakh; +#X obj 74 573 villan2; +#X obj 74 603 zhaox10; +#X obj 74 633 zhuy16; +#X obj 74 663 houchl; +#X text 24 21 [ARTS 2020] SUMMER 2020 "MASHEEN"; +#X text 275 70 1 Create a subpatch saved with the filename as your +RCS id; +#X text 275 110 2 In your patch create two inlets and two outlets; +#X text 330 187 e.g.; +#X text 330 257 e.g.; +#X text 275 150 3 Add a "Receive" object named with your RCS ID_tempo +; +#X obj 384 187 receive hamilr4_tempo; +#X obj 384 257 receive hamilr4_control; +#X text 275 220 4 Add a "Receive" object named with your RCS ID_control +; +#X obj 74 63 hamilr4; +#N canvas 0 50 479 747 tempo_sender 0; +#X obj 89 687 s hamilr4_tempo; +#X obj 89 13 inlet; +#X obj 113 657 s houchl_tempo; +#X obj 123 627 s zhuy16_tempo; +#X obj 133 597 s zhaox10_tempo; +#X obj 143 567 s villan2_tempo; +#X obj 153 537 s takakh_tempo; +#X obj 163 507 s smithd32_tempo; +#X obj 173 477 s sheny13_tempo; +#X obj 183 447 s schans2_tempo; +#X obj 193 417 s rothgj_tempo; +#X obj 203 387 s quarlm_tempo; +#X obj 213 357 s plancs_tempo; +#X obj 223 327 s persow_tempo; +#X obj 233 297 s ortegm3_tempo; +#X obj 243 267 s novaa_tempo; +#X obj 253 237 s nik_tempo; +#X obj 263 207 s mucelj_tempo; +#X obj 273 177 s martse_tempo; +#X obj 283 147 s johnsz2_tempo; +#X obj 293 117 s deegaj_tempo; +#X obj 303 87 s bartoa_tempo; +#X connect 1 0 0 0; +#X connect 1 0 2 0; +#X connect 1 0 3 0; +#X connect 1 0 4 0; +#X connect 1 0 5 0; +#X connect 1 0 6 0; +#X connect 1 0 7 0; +#X connect 1 0 8 0; +#X connect 1 0 9 0; +#X connect 1 0 10 0; +#X connect 1 0 11 0; +#X connect 1 0 12 0; +#X connect 1 0 13 0; +#X connect 1 0 14 0; +#X connect 1 0 15 0; +#X connect 1 0 16 0; +#X connect 1 0 17 0; +#X connect 1 0 18 0; +#X connect 1 0 19 0; +#X connect 1 0 20 0; +#X connect 1 0 21 0; +#X restore 277 525 pd tempo_sender; +#X obj 277 466 metro 500; +#X obj 277 496 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 277 431 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X text 275 300 5 Make your patch _do something_ with a metro beat +(coming in from the _tempo receive) and spit out audio from your left +outlet. DO NOT INCLUDE A [DAC~] OBJECT IN YOUR PATCH \, just pass audio +out the outlet for now.; +#X text 275 380 6 Send Rob your patch on Sunday.; +#X obj 166 547 dac~; +#X obj 423 607 osc~ 800; +#X obj 408 651 *~; +#X obj 408 576 vline~; +#X msg 408 527 1 20 \, 0 20 20; +#X text 456 575 translate to audio rate signal; +#X text 486 608 generate 800 hz sine tone; +#X text 438 650 multiply sine tone by amplitude envelope; +#X text 512 524 go to 1 (full volume) in 20 \, then go to zero (no +volume) in 20 ms after waiting 20 ms; +#X floatatom 519 464 5 0 0 0 - - -; +#X obj 577 410 loadbang; +#X obj 376 419 hsl 128 15 200 2000 0 0 empty empty empty -2 -8 0 10 +-262144 -1 -1 0 1; +#X msg 519 436 500; +#X obj 407 680 *~ 0.2; +#X obj 432 705 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 407 726 *~ 1; +#X connect 14 0 36 0; +#X connect 14 0 36 1; +#X connect 31 0 32 0; +#X connect 31 0 40 0; +#X connect 32 0 30 0; +#X connect 33 0 31 0; +#X connect 37 0 38 1; +#X connect 38 0 49 0; +#X connect 39 0 38 0; +#X connect 40 0 39 0; +#X connect 45 0 31 1; +#X connect 46 0 48 0; +#X connect 47 0 45 0; +#X connect 48 0 47 0; +#X connect 49 0 51 0; +#X connect 50 0 51 1; +#X connect 51 0 36 0; +#X connect 51 0 36 1; diff --git a/bartoa.pd b/bartoa.pd new file mode 100644 index 0000000..26a6652 --- /dev/null +++ b/bartoa.pd @@ -0,0 +1,64 @@ +#N canvas 309 80 1371 826 12; +#X obj 72 143 inlet~; +#X obj 292 602 inlet; +#X obj 142 775 outlet; +#X obj 49 779 outlet~; +#X obj 145 275 receive bartoa_tempo; +#X obj 794 1 receive bartoa_control; +#X obj 794 52 list trim; +#X msg 794 73 1 2 3 4 5, f 37; +#X obj 794 31 list prepend set; +#X obj 145 336 f; +#X obj 185 336 + 1; +#X floatatom 145 360 5 0 0 0 - - -; +#N canvas 0 50 450 250 (subpatch) 0; +#X array melody 60 float 3; +#A 0 62 62 74 74 69 69 68 67 65 62 65 67 60 60 74 74 69 69 68 67 65 +62 65 67 59 59 74 74 69 69 68 67 65 62 65 67 58 58 74 74 69 69 68 67 +65 62 65 67 74 69 0 68 0 67 0 65 0 62 65 67; +#X coords 0 127 60 0 200 140 1 0 0; +#X restore 442 304 graph; +#X obj 145 453 tabread melody; +#X floatatom 145 507 10 0 0 0 - - -; +#X floatatom 145 407 5 0 0 0 - - -; +#X msg 213 310 0; +#X obj 145 530 mtof; +#X floatatom 145 554 5 0 0 0 - - -; +#X obj 145 307 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X msg 379 459 \; melody 0 62 62 74 74 69 69 68 67 65 62 65 67 60 60 +74 74 69 69 68 67 65 62 65 67 59 59 74 74 69 69 68 67 65 62 65 67 58 +58 74 74 69 69 68 67 65 62 65 67, f 49; +#X obj 145 384 % 48; +#X text 349 589 Perhaps input volume from parent patch?; +#X msg 225 614 0.1; +#X msg 287 634 0; +#X obj 145 629 osc~; +#X obj 145 674 *~; +#X obj 215 715 throw~ bartoa_audio_1; +#X obj 1060 236 loadbang; +#X text 858 192 ROB - added this \, need to set a volume at the loading +of your patch; +#X connect 1 0 26 1; +#X connect 4 0 19 0; +#X connect 5 0 8 0; +#X connect 6 0 7 0; +#X connect 8 0 6 0; +#X connect 9 0 10 0; +#X connect 9 0 11 0; +#X connect 10 0 9 1; +#X connect 11 0 21 0; +#X connect 13 0 14 0; +#X connect 14 0 17 0; +#X connect 15 0 13 0; +#X connect 16 0 9 1; +#X connect 17 0 18 0; +#X connect 18 0 25 0; +#X connect 19 0 9 0; +#X connect 21 0 15 0; +#X connect 23 0 26 1; +#X connect 24 0 26 1; +#X connect 25 0 26 0; +#X connect 26 0 3 0; +#X connect 26 0 27 0; +#X connect 28 0 23 0; diff --git a/bpmtoms.pd b/bpmtoms.pd new file mode 100644 index 0000000..d60ea37 --- /dev/null +++ b/bpmtoms.pd @@ -0,0 +1,20 @@ +#N canvas 250 30 450 300 12; +#X floatatom 267 137 5 0 0 0 - - -; +#X obj 267 169 expr 60000/$f1; +#X floatatom 267 203 10 0 0 0 - - -; +#X text 311 138 bpm; +#X text 343 203 ms; +#X obj 267 101 inlet; +#X obj 267 236 outlet; +#X text 114 31 Convert BPM to MS for Metro; +#X floatatom 107 120 5 0 0 0 - - -; +#X text 111 100 bpm; +#X floatatom 161 121 10 0 0 0 - - -; +#X text 184 101 ms; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 2 0 10 0; +#X connect 5 0 8 0; +#X connect 8 0 0 0; +#X coords 0 -1 1 1 140 48 2 100 100; diff --git a/channel.pd b/channel.pd new file mode 100644 index 0000000..2033b09 --- /dev/null +++ b/channel.pd @@ -0,0 +1,154 @@ +#N canvas 267 203 559 552 12; +#X obj 25 33 cnv 15 88 392 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 68 56 vu 15 200 masheen_meter_text empty -1 -8 0 10 -66577 -1 +1 0; +#X obj 28 56 vsl 20 200 1 101 1 0 empty empty empty 0 -9 0 10 -262144 +-1 -1 12200 1; +#X obj 321 133 *~; +#X obj 339 96 line~; +#X msg 339 72 \$1 20; +#X floatatom 339 50 5 0 0 0 - - -; +#X obj 55 1 inlet~; +#X obj 17 461 outlet~; +#X floatatom 321 221 5 0 0 0 - - -; +#X obj 321 194 env~ 16384 8192; +#X obj 339 1 - 1; +#X obj 339 26 / 100; +#X floatatom 201 221 5 0 0 0 - - -; +#X obj 201 194 env~ 16384 8192; +#X obj 201 249 - 103; +#X obj 321 249 - 103; +#X obj 50 56 vu 15 200 masheen_meter_text empty -1 -8 0 10 -66577 -1 +0 0; +#X floatatom 48 287 5 0 0 0 - - -; +#X obj 55 395 tgl 20 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X text 77 352 S; +#X text 77 374 M; +#X text 77 396 R; +#X obj 55 373 tgl 20 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 55 351 tgl 20 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#N canvas 892 187 864 792 mute_solo 1; +#X obj 17 57 inlet~; +#X obj 217 17 inlet; +#X obj 287 17 inlet; +#X text 217 -5 solo; +#X text 287 -5 mute; +#X floatatom 217 111 5 0 0 0 - - -; +#X floatatom 287 111 5 0 0 0 - - -; +#X obj 320 378 outlet; +#X text 389 322 set mute button; +#X text 403 94 If solo is pressed \, override mute; +#X msg 354 350 0; +#X obj 17 456 gate~; +#X msg 352 93 0; +#X obj 286 158 t b f; +#X msg 320 322 set \$1; +#X floatatom 267 220 5 0 0 0 - - -; +#X obj 267 194 -; +#X obj 48 736 outlet~; +#X floatatom 49 428 5 0 0 0 - - -; +#X obj 267 249 expr if($f1 < 0 \, 1 \, 0); +#X obj 336 352 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X floatatom 341 295 5 0 0 0 - - -; +#X obj 269 317 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 267 273 select 1; +#X obj 716 59 s solo_mode; +#X obj 716 37 expr if($f1 == 1 \, 1 \, -1); +#X obj 111 543 v global_solo_count; +#X text 111 474 Check to see if there are any solo'd channels; +#X floatatom 111 615 5 0 0 0 - - -; +#X obj 48 672 gate~; +#X floatatom 141 567 5 0 0 0 - - -; +#X obj 111 493 r solo_mode; +#X obj 111 518 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X text 714 83 Update global count for solo-mode (> 0 we're soloing) +; +#X text 286 684 expr if( $f1 > 0 \, if($f2 > 0 \, 1 \, 0) \, 1); +#X obj 111 591 expr if( $f1 > 0 \, if($f2 > 0 \, 1 \, 0) \, 1); +#X obj 76 562 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 151 615 r init; +#X obj 352 70 r init; +#X obj 194 493 r init; +#X obj 269 495 r solo_all; +#X obj 269 544 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 269 519 pipe 10; +#X connect 0 0 11 0; +#X connect 1 0 5 0; +#X connect 1 0 25 0; +#X connect 2 0 6 0; +#X connect 5 0 16 0; +#X connect 5 0 35 1; +#X connect 6 0 13 0; +#X connect 11 1 29 0; +#X connect 12 0 6 0; +#X connect 12 0 5 0; +#X connect 13 0 5 0; +#X connect 13 1 16 1; +#X connect 14 0 7 0; +#X connect 14 0 20 0; +#X connect 14 0 10 0; +#X connect 15 0 19 0; +#X connect 16 0 15 0; +#X connect 18 0 11 1; +#X connect 19 0 18 0; +#X connect 19 0 23 0; +#X connect 23 0 22 0; +#X connect 23 1 14 0; +#X connect 23 1 21 0; +#X connect 25 0 24 0; +#X connect 26 0 30 0; +#X connect 26 0 35 0; +#X connect 26 0 36 0; +#X connect 28 0 29 1; +#X connect 29 0 17 0; +#X connect 31 0 32 0; +#X connect 32 0 26 0; +#X connect 35 0 28 0; +#X connect 36 0 5 0; +#X connect 37 0 28 0; +#X connect 38 0 12 0; +#X connect 39 0 32 0; +#X connect 40 0 42 0; +#X connect 41 0 26 0; +#X connect 42 0 41 0; +#X restore 165 305 pd mute_solo; +#X obj -61 354 r mute all; +#X obj -61 332 r solo all; +#X obj -61 376 r rec all; +#X obj 32 312 panner; +#X obj 73 461 outlet~; +#X connect 2 0 11 0; +#X connect 3 0 10 0; +#X connect 3 0 25 0; +#X connect 4 0 3 1; +#X connect 5 0 4 0; +#X connect 6 0 5 0; +#X connect 6 0 18 0; +#X connect 7 0 3 0; +#X connect 7 0 14 0; +#X connect 9 0 16 0; +#X connect 10 0 9 0; +#X connect 11 0 12 0; +#X connect 12 0 6 0; +#X connect 13 0 15 0; +#X connect 14 0 13 0; +#X connect 15 0 17 0; +#X connect 16 0 1 0; +#X connect 23 0 25 2; +#X connect 24 0 25 1; +#X connect 25 0 29 0; +#X connect 26 0 23 0; +#X connect 27 0 24 0; +#X connect 28 0 19 0; +#X connect 29 0 8 0; +#X connect 29 1 30 0; +#X coords 0 -1 1 1 88 392 1 25 32; diff --git a/envelopes.pd b/envelopes.pd new file mode 100755 index 0000000..491b3af --- /dev/null +++ b/envelopes.pd @@ -0,0 +1,141 @@ +#N canvas -9 -9 1920 976 10; +#X floatatom 51 84 5 0 0 0 - - -; +#X obj 51 136 mtof; +#X text 86 85 MIDI pitch; +#X obj 521 246 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#N canvas 0 23 450 300 two_notes 0; +#X obj 37 37 inlet; +#X obj 37 58 metro 500; +#X obj 37 79 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 +; +#X obj 37 100 sel 0 1; +#X msg 38 122 55; +#X msg 69 122 67; +#X floatatom 69 143 5 0 0 0 - - -; +#X obj 69 163 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 3 1 5 0; +#X connect 4 0 6 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X restore 520 268 pd two_notes; +#X obj 604 247 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#N canvas 0 23 450 300 many_notes 0; +#X obj 37 37 inlet; +#X obj 37 241 outlet; +#X obj 37 96 f 0; +#X obj 36 138 % 8; +#X obj 179 150 table pitches; +#X msg 179 174 \; pitches 0 60 67 62 58 63 70 72 65; +#X obj 37 188 tabread pitches; +#X obj 37 58 metro 170; +#X floatatom 37 212 5 0 0 0 - - -; +#X obj 37 117 + 1; +#X floatatom 37 159 5 0 0 0 - - -; +#X connect 0 0 7 0; +#X connect 2 0 9 0; +#X connect 3 0 2 1; +#X connect 3 0 10 0; +#X connect 6 0 8 0; +#X connect 7 0 2 0; +#X connect 8 0 1 0; +#X connect 9 0 3 0; +#X connect 10 0 6 0; +#X restore 604 269 pd many_notes; +#X obj 521 317 s notes; +#X floatatom 521 293 5 0 0 0 - - -; +#N canvas -9 -9 1920 976 oscs 0; +#X obj 37 37 inlet; +#X obj 37 121 osc~; +#X obj 104 123 osc~; +#X obj 104 70 * 1.015; +#X obj 192 127 osc~; +#X obj 192 74 * 0.503; +#X text 186 145 octave below; +#X obj 279 122 osc~; +#X obj 279 74 * 1.496; +#X obj 279 159 *~ 0.5; +#X obj 426 126 osc~; +#X obj 426 78 * 2.01; +#X obj 426 163 *~ 0.25; +#X text 415 182 octave up; +#X text 274 180 fifth up; +#X obj 73 256 outlet~; +#X connect 0 0 1 0; +#X connect 0 0 3 0; +#X connect 0 0 11 0; +#X connect 0 0 8 0; +#X connect 0 0 5 0; +#X connect 1 0 15 0; +#X connect 2 0 15 0; +#X connect 3 0 2 0; +#X connect 4 0 15 0; +#X connect 5 0 4 0; +#X connect 7 0 9 0; +#X connect 8 0 7 0; +#X connect 9 0 15 0; +#X connect 10 0 12 0; +#X connect 11 0 10 0; +#X connect 12 0 15 0; +#X restore 51 169 pd oscs; +#N canvas 0 23 450 300 env 0; +#X obj 119 125 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X msg 119 164 1 5; +#X obj 161 180 pack 0 500; +#X obj 161 199 line~; +#X obj 161 222 *~; +#X obj 161 244 *~; +#X text 226 107 decay; +#X floatatom 228 125 5 0 0 0 - - -; +#X obj 113 73 inlet; +#X obj 234 90 inlet; +#X obj 161 162 del 50; +#X obj 161 265 outlet~; +#X connect 0 0 1 0; +#X connect 0 0 10 0; +#X connect 1 0 3 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 3 0 4 1; +#X connect 4 0 5 0; +#X connect 4 0 5 1; +#X connect 5 0 11 0; +#X connect 7 0 2 1; +#X connect 8 0 0 0; +#X connect 9 0 7 0; +#X connect 10 0 2 0; +#X restore 123 157 pd env; +#X text 158 127 decay; +#X floatatom 197 128 5 0 0 0 - - -; +#X obj 51 104 t f b; +#X obj 51 211 *~; +#X obj 51 27 inlet; +#X obj 197 86 inlet; +#X obj 51 289 outlet~; +#X obj 109 27 inlet; +#X obj 51 58 f 60; +#X obj 51 251 *~ 0.1; +#X connect 0 0 13 0; +#X connect 1 0 9 0; +#X connect 3 0 4 0; +#X connect 4 0 8 0; +#X connect 5 0 6 0; +#X connect 6 0 8 0; +#X connect 8 0 7 0; +#X connect 9 0 14 0; +#X connect 10 0 14 1; +#X connect 12 0 10 1; +#X connect 13 0 1 0; +#X connect 13 1 10 0; +#X connect 14 0 20 0; +#X connect 15 0 19 1; +#X connect 16 0 12 0; +#X connect 18 0 19 0; +#X connect 19 0 0 0; +#X connect 20 0 17 0; diff --git a/gate~.pd b/gate~.pd new file mode 100644 index 0000000..5d09598 --- /dev/null +++ b/gate~.pd @@ -0,0 +1,43 @@ +#N canvas 0 23 728 483 12; +#X text 469 38 Send test signal to all channels; +#N canvas 0 23 450 300 gate~ 0; +#X obj 70 51 inlet~; +#X obj 139 51 inlet; +#X obj 70 132 *~; +#X obj 70 156 outlet~; +#X obj 139 80 expr 1 - $f1; +#X obj 140 132 *~; +#X obj 140 156 outlet~; +#X connect 0 0 2 0; +#X connect 0 0 5 0; +#X connect 1 0 4 0; +#X connect 1 0 2 1; +#X connect 2 0 3 0; +#X connect 4 0 5 1; +#X connect 5 0 6 0; +#X restore 392 64 pd gate~; +#X obj 445 37 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 70 51 inlet~; +#X obj 127 51 inlet; +#X obj 70 202 *~; +#X obj 70 226 outlet~; +#X obj 208 90 expr 1 - $f1; +#X obj 140 202 *~; +#X obj 140 226 outlet~; +#X obj 208 141 line~; +#X obj 127 141 line~; +#X msg 208 117 \$1 20; +#X msg 127 116 \$1 20; +#X connect 2 0 1 1; +#X connect 3 0 5 0; +#X connect 3 0 8 0; +#X connect 4 0 7 0; +#X connect 4 0 13 0; +#X connect 5 0 6 0; +#X connect 7 0 12 0; +#X connect 8 0 9 0; +#X connect 10 0 8 1; +#X connect 11 0 5 1; +#X connect 12 0 10 0; +#X connect 13 0 11 0; diff --git a/hamilr4.pd b/hamilr4.pd new file mode 100644 index 0000000..e44e94f --- /dev/null +++ b/hamilr4.pd @@ -0,0 +1,496 @@ +#N canvas 0 23 1920 1129 12; +#X obj 112 997 outlet; +#X obj 53 997 outlet~; +#X text 184 995 Two outlets: the first is an audio outlet (note the +"~") and the second is for data; +#X obj 0 -2 cnv 15 1920 90 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X text 9 11 Two inlets: the first is for audio (note the "~") and +the second is for data; +#X obj 19 58 inlet~; +#X obj 79 58 inlet; +#X obj 1030 56 receive hamilr4_tempo; +#X obj 1184 56 receive hamilr4_control; +#X obj 1030 97 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 1184 119 list trim; +#X msg 1184 140 1 2 3 4 5; +#X obj 1184 98 list prepend set; +#X text 1030 0 Two named receives \, one for tempo (receives a "bang" +event from the global clock metro) and the other receives a list of +control data... this can be any size.; +#X obj 823 272 osc~ 740; +#X obj 893 272 osc~ 840; +#N canvas 0 23 450 300 notes 0; +#X msg 983 782 masheen_meter_no_text; +#X msg 984 728 \; masheen_meter_no_text scale \$1; +#X msg 984 697 0; +#X msg 985 825 \; foo7_rcv label_pos \$1 \$2; +#X text 701 667 Sends to set properties of meter text:; +#X obj 1265 673 f; +#X msg 1243 652 bang; +#X floatatom 1281 651 3 50 88 0 - - -; +#X floatatom 1316 673 3 0 37 0 - - -; +#X obj 1265 696 pack 0 0; +#X text 1343 673 y-label; +#X text 1309 651 x-label; +#X obj 1285 788 f; +#X msg 1263 767 bang; +#X floatatom 1301 766 3 0 2 0 - - -; +#X floatatom 1336 788 3 8 36 0 - - -; +#X obj 1285 811 pack 0 0; +#X text 1329 766 font; +#X text 1365 788 height; +#X msg 1285 837 \; foo7_rcv label_font \$1 \$2; +#X msg 1265 721 \; foo7_rcv label_po`s \$1 \$2; +#X msg 783 745 \; foo7_rcv label hello; +#X connect 2 0 1 0; +#X connect 5 0 9 0; +#X connect 6 0 5 0; +#X connect 7 0 5 1; +#X connect 8 0 9 1; +#X connect 9 0 20 0; +#X connect 12 0 16 0; +#X connect 13 0 12 0; +#X connect 14 0 12 1; +#X connect 15 0 16 1; +#X connect 16 0 19 0; +#X restore 1786 62 pd notes; +#X obj 1628 429 channel; +#X obj 1717 429 channel; +#X obj 1628 886 throw~ main_out_left; +#X obj 1708 850 throw~ main_out_right; +#N canvas 0 23 450 300 gate~ 0; +#X obj 70 51 inlet~; +#X obj 139 51 inlet; +#X obj 70 132 *~; +#X obj 70 156 outlet~; +#X obj 139 80 expr 1 - $f1; +#X obj 140 132 *~; +#X obj 140 156 outlet~; +#X connect 0 0 2 0; +#X connect 0 0 5 0; +#X connect 1 0 4 0; +#X connect 1 0 2 1; +#X connect 2 0 3 0; +#X connect 4 0 5 1; +#X connect 5 0 6 0; +#X restore 1628 395 pd gate~; +#X obj 1810 380 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 +1 1; +#N canvas 0 23 450 300 gate~ 0; +#X obj 70 51 inlet~; +#X obj 139 51 inlet; +#X obj 70 132 *~; +#X obj 70 156 outlet~; +#X obj 139 80 expr 1 - $f1; +#X obj 140 132 *~; +#X obj 140 156 outlet~; +#X connect 0 0 2 0; +#X connect 0 0 5 0; +#X connect 1 0 4 0; +#X connect 1 0 2 1; +#X connect 2 0 3 0; +#X connect 4 0 5 1; +#X connect 5 0 6 0; +#X restore 1717 395 pd gate~; +#X obj 1628 328 catch~ hamilr4_audio_1; +#X obj 1717 351 catch~ hamilr4_audio_2; +#N canvas 0 23 450 300 hamilr4_throws 0; +#X obj 77 28 inlet~; +#X obj 77 130 throw~ hamilr4_audio_1; +#X obj 148 103 throw~ hamilr4_audio_2; +#X obj 148 31 inlet~; +#X connect 0 0 1 0; +#X connect 3 0 2 0; +#X restore 817 326 pd hamilr4_throws; +#N canvas 1117 23 693 620 throws 0; +#X obj 59 541 throw~ bartoa_audio_1; +#X obj 79 522 throw~ deegaj_audio_1; +#X obj 99 503 throw~ houchl_audio_1; +#X obj 119 484 throw~ johnsz2_audio_1; +#X obj 139 465 throw~ martse_audio_1; +#X obj 159 446 throw~ mucelj_audio_1; +#X obj 179 427 throw~ nelsoc5_audio_1; +#X obj 199 408 throw~ nik_audio_1; +#X obj 219 389 throw~ novaa_audio_1; +#X obj 239 370 throw~ ortegm3_audio_1; +#X obj 259 351 throw~ persow_audio_1; +#X obj 279 332 throw~ plancs_audio_1; +#X obj 298 313 throw~ quarlm_audio_1; +#X obj 318 294 throw~ rothgj_audio_1; +#X obj 338 275 throw~ schans2_audio_1; +#X obj 358 256 throw~ sheny13_audio_1; +#X obj 378 237 throw~ smith32_audio_1; +#X obj 398 218 throw~ takakh_audio_1; +#X obj 418 199 throw~ villan2_audio_1; +#X obj 438 180 throw~ zhaox10_audio_1; +#X obj 458 161 throw~ zhuy16_audio_1; +#X obj 73 138 osc~ 240; +#X text 58 79 Mono audio throws for each user; +#X restore 1786 16 pd throws; +#N canvas 298 91 1121 615 tests 0; +#N canvas 1117 23 693 620 throws_mono_test 0; +#X obj 59 541 throw~ bartoa_audio_1; +#X obj 79 522 throw~ deegaj_audio_1; +#X obj 99 503 throw~ houchl_audio_1; +#X obj 119 484 throw~ johnsz2_audio_1; +#X obj 139 465 throw~ martse_audio_1; +#X obj 159 446 throw~ mucelj_audio_1; +#X obj 179 427 throw~ nelsoc5_audio_1; +#X obj 199 408 throw~ nik_audio_1; +#X obj 219 389 throw~ novaa_audio_1; +#X obj 239 370 throw~ ortegm3_audio_1; +#X obj 259 351 throw~ persow_audio_1; +#X obj 279 332 throw~ plancs_audio_1; +#X obj 298 313 throw~ quarlm_audio_1; +#X obj 318 294 throw~ rothgj_audio_1; +#X obj 338 275 throw~ schans2_audio_1; +#X obj 358 256 throw~ sheny13_audio_1; +#X obj 378 237 throw~ smith32_audio_1; +#X obj 398 218 throw~ takakh_audio_1; +#X obj 418 199 throw~ villan2_audio_1; +#X obj 438 180 throw~ zhaox10_audio_1; +#X obj 458 161 throw~ zhuy16_audio_1; +#X text 70 86 Mono audio throws - same signal for each user; +#X obj 67 136 inlet~; +#X connect 22 0 0 0; +#X connect 22 0 1 0; +#X connect 22 0 2 0; +#X connect 22 0 3 0; +#X connect 22 0 4 0; +#X connect 22 0 5 0; +#X connect 22 0 6 0; +#X connect 22 0 7 0; +#X connect 22 0 8 0; +#X connect 22 0 9 0; +#X connect 22 0 10 0; +#X connect 22 0 11 0; +#X connect 22 0 12 0; +#X connect 22 0 13 0; +#X connect 22 0 14 0; +#X connect 22 0 15 0; +#X connect 22 0 16 0; +#X connect 22 0 17 0; +#X connect 22 0 18 0; +#X connect 22 0 19 0; +#X connect 22 0 20 0; +#X restore 46 143 pd throws_mono_test; +#X obj 46 53 osc~ 440; +#X obj 451 125 channel; +#X obj 540 125 channel; +#X text 123 92 Send test signal to all channels; +#X obj 451 552 throw~ main_out_left; +#X obj 540 529 throw~ main_out_right; +#N canvas 0 23 450 300 gate~ 0; +#X obj 70 51 inlet~; +#X obj 139 51 inlet; +#X obj 70 132 *~; +#X obj 70 156 outlet~; +#X obj 139 80 expr 1 - $f1; +#X obj 140 132 *~; +#X obj 140 156 outlet~; +#X connect 0 0 2 0; +#X connect 0 0 5 0; +#X connect 1 0 4 0; +#X connect 1 0 2 1; +#X connect 2 0 3 0; +#X connect 4 0 5 1; +#X connect 5 0 6 0; +#X restore 46 118 pd gate~; +#X obj 99 91 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 +; +#N canvas 0 23 450 300 gate~ 0; +#X obj 70 51 inlet~; +#X obj 139 51 inlet; +#X obj 70 132 *~; +#X obj 70 156 outlet~; +#X obj 139 80 expr 1 - $f1; +#X obj 140 132 *~; +#X obj 140 156 outlet~; +#X connect 0 0 2 0; +#X connect 0 0 5 0; +#X connect 1 0 4 0; +#X connect 1 0 2 1; +#X connect 2 0 3 0; +#X connect 4 0 5 1; +#X connect 5 0 6 0; +#X restore 451 91 pd gate~; +#X obj 633 76 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#N canvas 0 23 450 300 gate~ 0; +#X obj 70 51 inlet~; +#X obj 139 51 inlet; +#X obj 70 132 *~; +#X obj 70 156 outlet~; +#X obj 139 80 expr 1 - $f1; +#X obj 140 132 *~; +#X obj 140 156 outlet~; +#X connect 0 0 2 0; +#X connect 0 0 5 0; +#X connect 1 0 4 0; +#X connect 1 0 2 1; +#X connect 2 0 3 0; +#X connect 4 0 5 1; +#X connect 5 0 6 0; +#X restore 540 91 pd gate~; +#X obj 540 59 osc~ 520; +#X obj 451 59 osc~ 420; +#X text 400 29 Send test signal to main outs; +#X connect 1 0 7 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 7 0 0 0; +#X connect 8 0 7 1; +#X connect 9 0 2 0; +#X connect 10 0 11 1; +#X connect 10 0 9 1; +#X connect 11 0 3 0; +#X connect 12 0 11 0; +#X connect 13 0 9 0; +#X restore 1786 38 pd tests; +#X obj 976 312 throw~ bartoa_audio_1; +#X obj 946 342 throw~ deegaj_audio_1; +#N canvas 363 307 898 556 karplus_strong 0; +#N canvas 707 129 520 633 strummer 0; +#X obj 110 36 inlet; +#X obj 247 15 inlet; +#X text 290 37 strum speed inlet and default value; +#X obj 72 582 outlet; +#X obj 124 585 outlet; +#X obj 172 591 outlet; +#X obj 217 591 outlet; +#X obj 263 591 outlet; +#X obj 310 591 outlet; +#X obj 110 62 metro 250; +#X obj 110 89 i 0; +#X obj 110 114 + 1; +#X obj 110 315 route 0 1 2 3 4 5 6 7; +#X obj 110 143 % 8; +#X obj 155 106 i; +#X obj 154 195 == 0; +#X obj 110 166 t f f; +#X obj 154 218 route 1; +#X obj 110 357 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 247 71 s \$0-strum_speed; +#X obj 272 353 r \$0-strum_speed; +#X obj 183 520 i 52; +#X obj 109 465 i 40; +#X obj 148 483 i 49; +#X obj 218 538 i 55; +#X obj 257 543 i 59; +#X obj 293 563 i 64; +#N canvas 101 96 589 438 chords 0; +#X obj 249 26 inlet; +#X obj 82 265 outlet; +#X obj 132 265 outlet; +#X obj 180 264 outlet; +#X obj 227 265 outlet; +#X obj 276 266 outlet; +#X obj 330 266 outlet; +#X obj 144 201 unpack f f f f f f; +#X msg 202 125 40 45 52 57 61 64; +#X msg 326 126 43 47 52 55 59 67; +#X msg 81 124 40 47 52 55 59 64; +#X obj 249 52 random 4; +#X obj 250 80 route 0 1 2 3; +#X msg 451 124 42 47 54 59 62 64; +#X text 348 50 randomly choose one of four chords \, and output the +midi pitches for each of the six strings.; +#X connect 0 0 11 0; +#X connect 7 0 1 0; +#X connect 7 1 2 0; +#X connect 7 2 3 0; +#X connect 7 3 4 0; +#X connect 7 4 5 0; +#X connect 7 5 6 0; +#X connect 8 0 7 0; +#X connect 9 0 7 0; +#X connect 10 0 7 0; +#X connect 11 0 12 0; +#X connect 12 0 10 0; +#X connect 12 1 8 0; +#X connect 12 2 9 0; +#X connect 12 3 13 0; +#X connect 13 0 7 0; +#X restore 28 320 pd chords; +#X text 152 162 Generate a simple 8 note strum pattern; +#X text 209 220 Every 8 notes \, randomly change chords; +#X obj 247 39 i 15; +#X obj 148 415 del 15; +#X obj 183 437 del 15; +#X obj 218 458 del 15; +#X obj 257 480 del 15; +#X obj 293 512 del 15; +#X connect 0 0 9 0; +#X connect 1 0 30 0; +#X connect 9 0 10 0; +#X connect 10 0 11 0; +#X connect 11 0 13 0; +#X connect 12 0 18 0; +#X connect 12 3 18 0; +#X connect 12 5 18 0; +#X connect 12 7 18 0; +#X connect 13 0 14 0; +#X connect 13 0 16 0; +#X connect 14 0 10 1; +#X connect 15 0 17 0; +#X connect 16 0 12 0; +#X connect 16 1 15 0; +#X connect 17 0 27 0; +#X connect 18 0 22 0; +#X connect 18 0 31 0; +#X connect 20 0 31 1; +#X connect 20 0 32 1; +#X connect 20 0 33 1; +#X connect 20 0 34 1; +#X connect 20 0 35 1; +#X connect 21 0 5 0; +#X connect 22 0 3 0; +#X connect 23 0 4 0; +#X connect 24 0 6 0; +#X connect 25 0 7 0; +#X connect 26 0 8 0; +#X connect 27 0 22 0; +#X connect 27 1 23 0; +#X connect 27 2 21 0; +#X connect 27 3 24 0; +#X connect 27 4 25 0; +#X connect 27 5 26 0; +#X connect 30 0 19 0; +#X connect 31 0 23 0; +#X connect 31 0 32 0; +#X connect 32 0 21 0; +#X connect 32 0 33 0; +#X connect 33 0 24 0; +#X connect 33 0 34 0; +#X connect 34 0 25 0; +#X connect 34 0 35 0; +#X connect 35 0 26 0; +#X restore 334 153 pd strummer; +#X obj 496 187 hsl 180 15 1 40 0 0 empty \$0-width_ctrl width -2 -8 +1 10 -262144 -1 -1 6100 1; +#X obj 495 218 hsl 180 15 0.9 0.999 0 0 empty \$0-decay_ctrl decay +-2 -8 1 10 -262144 -1 -1 13977 1; +#X obj 495 248 hsl 180 15 100 8000 0 0 empty \$0-cutoff_ctrl cutoff +-2 -8 1 10 -262144 -1 -1 12589 1; +#N canvas 287 351 847 508 plucked_instrument 0; +#X obj 22 63 inlet; +#X obj 92 60 inlet; +#X obj 175 60 inlet; +#X obj 241 59 inlet; +#X obj 311 60 inlet; +#X obj 374 63 inlet; +#X obj 473 65 inlet; +#X obj 515 65 inlet; +#X obj 557 65 inlet; +#X text 17 16 6 inlets representing the six strings of our instrument. +A midi note integer message to any inlet excites that particular string +at the specified pitch.; +#X text 469 46 Width \, decay \, and cutoff inlets; +#X obj 21 165 karpluck~; +#X obj 21 373 outlet~; +#X obj 21 349 *~ 0.25; +#X obj 473 128 s \$0-width; +#X obj 516 107 s \$0-decay; +#X obj 557 87 s \$0-cutoff; +#X obj 106 87 r \$0-width; +#X obj 188 89 r \$0-decay; +#X obj 264 90 r \$0-cutoff; +#X obj 92 181 karpluck~; +#X obj 175 203 karpluck~; +#X obj 241 224 karpluck~; +#X obj 309 233 karpluck~; +#X obj 374 264 karpluck~; +#X text 334 112 comment; +#X text 73 343 scale the output down by approx 12dB to avoid clipping +; +#X connect 0 0 11 0; +#X connect 1 0 20 0; +#X connect 2 0 21 0; +#X connect 3 0 22 0; +#X connect 4 0 23 0; +#X connect 5 0 24 0; +#X connect 6 0 14 0; +#X connect 7 0 15 0; +#X connect 8 0 16 0; +#X connect 11 0 13 0; +#X connect 13 0 12 0; +#X connect 17 0 11 1; +#X connect 17 0 20 1; +#X connect 17 0 21 1; +#X connect 17 0 22 1; +#X connect 17 0 23 1; +#X connect 17 0 24 1; +#X connect 18 0 11 2; +#X connect 18 0 20 2; +#X connect 18 0 21 2; +#X connect 18 0 22 2; +#X connect 18 0 23 2; +#X connect 18 0 24 2; +#X connect 19 0 11 3; +#X connect 19 0 20 3; +#X connect 19 0 22 3; +#X connect 19 0 21 3; +#X connect 19 0 23 3; +#X connect 19 0 24 3; +#X connect 20 0 13 0; +#X connect 21 0 13 0; +#X connect 22 0 13 0; +#X connect 23 0 13 0; +#X connect 24 0 13 0; +#X restore 329 281 pd plucked_instrument; +#X obj 411 118 hsl 180 15 1 250 0 0 empty \$0-strum_speed_ctrl strum_speed +-2 -8 1 10 -262144 -1 -1 6700 1; +#X obj 334 118 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 786 117 loadbang; +#X msg 781 147 0.995; +#X msg 824 147 5700; +#X obj 751 241 s \$0-width_ctrl; +#X obj 781 217 s \$0-decay_ctrl; +#X obj 824 196 s \$0-cutoff_ctrl; +#X text 83 112 Click here to start strummer -->; +#X msg 751 147 8; +#X obj 857 173 s \$0-strum_speed_ctrl; +#X msg 864 148 8; +#X obj 329 342 outlet~; +#X connect 0 0 4 0; +#X connect 0 1 4 1; +#X connect 0 2 4 2; +#X connect 0 3 4 3; +#X connect 0 4 4 4; +#X connect 0 5 4 5; +#X connect 1 0 4 6; +#X connect 2 0 4 7; +#X connect 3 0 4 8; +#X connect 4 0 17 0; +#X connect 5 0 0 1; +#X connect 6 0 0 0; +#X connect 7 0 14 0; +#X connect 7 0 8 0; +#X connect 7 0 9 0; +#X connect 7 0 16 0; +#X connect 8 0 11 0; +#X connect 9 0 12 0; +#X connect 14 0 10 0; +#X connect 16 0 15 0; +#X restore 516 291 pd karplus_strong; +#X text 494 270 "Guitar" String model; +#X obj 516 315 throw~ hamilr4_audio_1; +#X connect 7 0 9 0; +#X connect 8 0 12 0; +#X connect 10 0 11 0; +#X connect 12 0 10 0; +#X connect 17 0 19 0; +#X connect 17 1 20 0; +#X connect 18 0 19 0; +#X connect 18 1 20 0; +#X connect 21 0 17 0; +#X connect 22 0 23 1; +#X connect 22 0 21 1; +#X connect 23 0 18 0; +#X connect 24 0 21 0; +#X connect 25 0 23 0; +#X connect 31 0 33 0; diff --git a/karpluck~.pd b/karpluck~.pd new file mode 100755 index 0000000..f5f3c6c --- /dev/null +++ b/karpluck~.pd @@ -0,0 +1,79 @@ +#N canvas 541 348 726 517 10; +#X obj -38 11 inlet midi_note; +#X obj 44 99 inlet width; +#X obj 77 185 inlet decay; +#X obj 156 186 inlet cutoff; +#X obj -37 295 outlet~; +#N canvas 353 578 194 221 excitation~ 1; +#X obj 31 18 inlet midi_note; +#X obj 101 39 inlet width; +#X obj 30 120 vline~; +#X obj 100 123 noise~; +#X obj 30 154 *~; +#X obj 30 181 outlet~; +#X obj 30 44 bang; +#X obj 74 69 del 5; +#X msg 30 87 1 1; +#X msg 74 90 0 1; +#X connect 0 0 6 0; +#X connect 1 0 7 1; +#X connect 2 0 4 0; +#X connect 3 0 4 1; +#X connect 4 0 5 0; +#X connect 6 0 8 0; +#X connect 6 0 7 0; +#X connect 7 0 9 0; +#X connect 8 0 2 0; +#X connect 9 0 2 0; +#X restore -37 123 pd excitation~; +#N canvas 97 389 669 524 body~ 0; +#X obj 75 232 inlet~; +#X obj 221 274 outlet~; +#X obj 376 -12 block~ 1; +#X obj 75 270 delwrite~ \$0-dl 1000; +#X obj 99 131 delread~ \$0-dl 12; +#X obj 221 179 lop~ 4000; +#X obj 221 226 *~ 0.99; +#X obj 99 -22 mtof; +#X obj 99 8 t b f; +#X obj 99 69 /; +#X msg 92 43 1; +#X obj 99 99 * 1000; +#X obj 99 -55 inlet midi_note; +#X obj 260 202 inlet decay; +#X obj 272 154 inlet cutoff; +#X text 375 -55 Block size needs to be 1 sample for this subpatch to +ensure correct tuning and operation for delay line feedback; +#X text 151 70 Convert a midi note into the required delay line length +(in ms) to generate said pitch.; +#X connect 0 0 3 0; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 6 0 1 0; +#X connect 6 0 3 0; +#X connect 7 0 8 0; +#X connect 8 0 10 0; +#X connect 8 1 9 1; +#X connect 9 0 11 0; +#X connect 10 0 9 0; +#X connect 11 0 4 0; +#X connect 12 0 7 0; +#X connect 13 0 6 1; +#X connect 14 0 5 1; +#X restore -37 245 pd body~; +#X obj -38 35 s \$0-midi_note; +#X obj -37 80 r \$0-midi_note; +#X obj -22 171 r \$0-midi_note; +#X text 55 121 excitation generates a short noise burst the specied +width; +#X text 22 245 body filters the excitation noise in a pitch specific +delay line; +#X connect 0 0 7 0; +#X connect 1 0 5 1; +#X connect 2 0 6 2; +#X connect 3 0 6 3; +#X connect 5 0 6 0; +#X connect 6 0 4 0; +#X connect 8 0 5 0; +#X connect 9 0 6 1; +#X coords 0 0 1 1 200 100 0; diff --git a/list-abs/LICENSE.txt b/list-abs/LICENSE.txt new file mode 100755 index 0000000..222809e --- /dev/null +++ b/list-abs/LICENSE.txt @@ -0,0 +1,30 @@ +This software is copyrighted by Frank Barknecht and others. The following +terms (the "Standard Improved BSD License") apply to all files associated with +the software unless explicitly disclaimed in individual files: + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. +3. The name of the author may not be used to endorse or promote + products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. diff --git a/list-abs/Makefile b/list-abs/Makefile new file mode 100755 index 0000000..ce1a5f0 --- /dev/null +++ b/list-abs/Makefile @@ -0,0 +1,351 @@ +## Pd library template version 1.0.7 +# For instructions on how to use this template, see: +# http://puredata.info/docs/developer/MakefileTemplate +LIBRARY_NAME = list-abs + +# add your .c source files, one object per file, to the SOURCES +# variable, help files will be included automatically +SOURCES = + +# list all pd objects (i.e. myobject.pd) files here, and their helpfiles will +# be included automatically +PDOBJECTS = OSCprepend.pd compare-any.pd last-x.pd list-abs.pd list-accum.pd list-add.pd list-apply.pd list-centroid.pd list-clip.pd list-compare.pd list-delete.pd list-dotprod.pd list-drip.pd list-drip2.pd list-dripslow.pd list-emath.pd list-enumerate.pd list-equalize.pd list-extend.pd list-fifo-delim.pd list-fifo.pd list-filter.pd list-find.pd list-geometric-mean.pd list-group.pd list-harmonic-mean.pd list-idx.pd list-insert.pd list-inter.pd list-inter-many.pd list-iter.pd list-l2s.pd list-lastx.pd list-len.pd list-lifo.pd list-makefilename.pd list-map.pd list-map2.pd list-math.pd list-mean.pd list-minmax.pd list-moses.pd list-mult.pd list-normalize.pd list-nth.pd list-onearg.pd list-pad.pd list-random.pd list-rdrip.pd list-reduce.pd list-replace.pd list-rev.pd list-rot.pd list-round.pd list-sect.pd list-seek.pd list-shellsort.pd list-sieve.pd list-sort.pd list-splat.pd list-sub.pd list-swap.pd list-tabdump.pd list-unique.pd list-unitvec.pd list-wrandom.pd prepent.pd sroute.pd take-two.pd triple-scale.pd list-invint.pd list-makefilename-a.pd list-stddev.pd + +# example patches and related files, in the 'examples' subfolder +EXAMPLES = list-demux.pd list-inter-example.pd list-inter-gem-example.pd list-sieve-example-2.pd + +# manuals and related files, in the 'manual' subfolder +MANUAL = + +# if you want to include any other files in the source and binary tarballs, +# list them here. This can be anything from header files, test patches, +# documentation, etc. README.txt and LICENSE.txt are required and therefore +# automatically included +EXTRA_DIST = list-abs-intro.pd list-abs-intro.txt + + + +#------------------------------------------------------------------------------# +# +# things you might need to edit if you are using other C libraries +# +#------------------------------------------------------------------------------# + +# -I"$(PD_INCLUDE)/pd" supports the header location for 0.43 +CFLAGS = -I"$(PD_INCLUDE)/pd" -Wall -W -g +LDFLAGS = +LIBS = + +#------------------------------------------------------------------------------# +# +# you shouldn't need to edit anything below here, if we did it right :) +# +#------------------------------------------------------------------------------# + +# get library version from meta file +LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) + +CFLAGS += -DPD -DVERSION='"$(LIBRARY_VERSION)"' + +PD_INCLUDE = $(PD_PATH)/include +# where to install the library, overridden below depending on platform +prefix = /usr/local +libdir = $(prefix)/lib +pkglibdir = $(libdir)/pd-externals +objectsdir = $(pkglibdir) + +INSTALL = install +INSTALL_PROGRAM = $(INSTALL) -p -m 644 +INSTALL_DATA = $(INSTALL) -p -m 644 +INSTALL_DIR = $(INSTALL) -p -m 755 -d + +ALLSOURCES := $(SOURCES) $(SOURCES_android) $(SOURCES_cygwin) $(SOURCES_macosx) \ + $(SOURCES_iphoneos) $(SOURCES_linux) $(SOURCES_windows) + +DISTDIR=$(LIBRARY_NAME)-$(LIBRARY_VERSION) +ORIGDIR=pd-$(LIBRARY_NAME:~=)_$(LIBRARY_VERSION) + +UNAME := $(shell uname -s) +ifeq ($(UNAME),Darwin) + CPU := $(shell uname -p) + ifeq ($(CPU),arm) # iPhone/iPod Touch + SOURCES += $(SOURCES_iphoneos) + EXTENSION = pd_darwin + OS = iphoneos + PD_PATH = /Applications/Pd-extended.app/Contents/Resources + IPHONE_BASE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin + CC=$(IPHONE_BASE)/gcc + CPP=$(IPHONE_BASE)/cpp + CXX=$(IPHONE_BASE)/g++ + ISYSROOT = -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk + IPHONE_CFLAGS = -miphoneos-version-min=3.0 $(ISYSROOT) -arch armv6 + OPT_CFLAGS = -fast -funroll-loops -fomit-frame-pointer + CFLAGS := $(IPHONE_CFLAGS) $(OPT_CFLAGS) $(CFLAGS) + LDFLAGS += -arch armv6 -bundle -undefined dynamic_lookup $(ISYSROOT) + LIBS += -lc + STRIP = strip -x + DISTBINDIR=$(DISTDIR)-$(OS) + else # Mac OS X + SOURCES += $(SOURCES_macosx) + EXTENSION = pd_darwin + OS = macosx + PD_PATH = /Applications/Pd-extended.app/Contents/Resources + OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast +# build universal 32-bit on 10.4 and 32/64 on newer + ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) + FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 + else + FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 + SOURCES += $(SOURCES_iphoneos) + endif + CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include + LDFLAGS += $(FAT_FLAGS) -bundle -undefined dynamic_lookup -L/sw/lib + # if the 'pd' binary exists, check the linking against it to aid with stripping + LDFLAGS += $(shell test -e $(PD_PATH)/bin/pd && echo -bundle_loader $(PD_PATH)/bin/pd) + LIBS += -lc + STRIP = strip -x + DISTBINDIR=$(DISTDIR)-$(OS) +# install into ~/Library/Pd on Mac OS X since /usr/local isn't used much + pkglibdir=$(HOME)/Library/Pd + endif +endif +# Tho Android uses Linux, we use this fake uname to provide an easy way to +# setup all this things needed to cross-compile for Android using the NDK +ifeq ($(UNAME),ANDROID) + CPU := arm + SOURCES += $(SOURCES_android) + EXTENSION = pd_linux + OS = android + PD_PATH = /usr + NDK_BASE=/usr/local/android-ndk + NDK_SYSROOT=$(NDK_BASE)/platforms/android-5/arch-arm + NDK_TOOLCHAIN=$(NDK_BASE)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86 + CC=$(NDK_TOOLCHAIN)/bin/arm-linux-androideabi-gcc + OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer + CFLAGS += -fPIC -I$(NDK_SYSROOT)/usr/include + LDFLAGS += -Wl,--export-dynamic -L$(NDK_SYSROOT)/usr/lib -shared -fPIC + LIBS += -lc + STRIP = strip --strip-unneeded -R .note -R .comment + DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) +endif +ifeq ($(UNAME),Linux) + CPU := $(shell uname -m) + SOURCES += $(SOURCES_linux) + EXTENSION = pd_linux + OS = linux + PD_PATH = /usr + OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer + CFLAGS += -fPIC + LDFLAGS += -Wl,--export-dynamic -shared -fPIC + LIBS += -lc + STRIP = strip --strip-unneeded -R .note -R .comment + DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) +endif +ifeq ($(UNAME),GNU) + # GNU/Hurd, should work like GNU/Linux for basically all externals + CPU := $(shell uname -m) + SOURCES += $(SOURCES_linux) + EXTENSION = pd_linux + OS = linux + PD_PATH = /usr + OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer + CFLAGS += -fPIC + LDFLAGS += -Wl,--export-dynamic -shared -fPIC + LIBS += -lc + STRIP = strip --strip-unneeded -R .note -R .comment + DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) +endif +ifeq ($(UNAME),GNU/kFreeBSD) + # Debian GNU/kFreeBSD, should work like GNU/Linux for basically all externals + CPU := $(shell uname -m) + SOURCES += $(SOURCES_linux) + EXTENSION = pd_linux + OS = linux + PD_PATH = /usr + OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer + CFLAGS += -fPIC + LDFLAGS += -Wl,--export-dynamic -shared -fPIC + LIBS += -lc + STRIP = strip --strip-unneeded -R .note -R .comment + DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) +endif +ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME))) + CPU := $(shell uname -m) + SOURCES += $(SOURCES_cygwin) + EXTENSION = dll + OS = cygwin + PD_PATH = $(cygpath $(PROGRAMFILES))/pd + OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer + CFLAGS += + LDFLAGS += -Wl,--export-dynamic -shared -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" + LIBS += -lc -lpd + STRIP = strip --strip-unneeded -R .note -R .comment + DISTBINDIR=$(DISTDIR)-$(OS) +endif +ifeq (MINGW,$(findstring MINGW,$(UNAME))) + CPU := $(shell uname -m) + SOURCES += $(SOURCES_windows) + EXTENSION = dll + OS = windows + PD_PATH = $(shell cd "$(PROGRAMFILES)"/pd && pwd) + OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer + CFLAGS += -mms-bitfields + LDFLAGS += -s -shared -Wl,--enable-auto-import + LIBS += -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" -L"$(PD_PATH)/obj" -lpd -lwsock32 -lkernel32 -luser32 -lgdi32 + STRIP = strip --strip-unneeded -R .note -R .comment + DISTBINDIR=$(DISTDIR)-$(OS) +endif + +# in case somebody manually set the HELPPATCHES above +HELPPATCHES ?= $(SOURCES:.c=-help.pd) $(PDOBJECTS:.pd=-help.pd) + +CFLAGS += $(OPT_CFLAGS) + + +.PHONY = install libdir_install single_install install-doc install-exec install-examples install-manual clean dist etags $(LIBRARY_NAME) + +all: $(SOURCES:.c=.$(EXTENSION)) + +%.o: %.c + $(CC) $(CFLAGS) -o "$*.o" -c "$*.c" + +%.$(EXTENSION): %.o + $(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS) + chmod a-x "$*.$(EXTENSION)" + +# this links everything into a single binary file +$(LIBRARY_NAME): $(SOURCES:.c=.o) $(LIBRARY_NAME).o + $(CC) $(LDFLAGS) -o $(LIBRARY_NAME).$(EXTENSION) $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(LIBS) + chmod a-x $(LIBRARY_NAME).$(EXTENSION) + +install: libdir_install + +# The meta and help files are explicitly installed to make sure they are +# actually there. Those files are not optional, then need to be there. +libdir_install: $(SOURCES:.c=.$(EXTENSION)) install-doc install-examples install-manual + $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) + $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd \ + $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) + test -z "$(strip $(SOURCES))" || (\ + $(INSTALL_PROGRAM) $(SOURCES:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) && \ + $(STRIP) $(addprefix $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/,$(SOURCES:.c=.$(EXTENSION)))) + test -z "$(strip $(PDOBJECTS))" || \ + $(INSTALL_DATA) $(PDOBJECTS) \ + $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) + +# install library linked as single binary +single_install: $(LIBRARY_NAME) install-doc install-exec + $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) + $(INSTALL_PROGRAM) $(LIBRARY_NAME).$(EXTENSION) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) + $(STRIP) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/$(LIBRARY_NAME).$(EXTENSION) + +install-doc: + $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) + test -z "$(strip $(SOURCES) $(PDOBJECTS))" || \ + $(INSTALL_DATA) $(HELPPATCHES) \ + $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) + $(INSTALL_DATA) README.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/README.txt + $(INSTALL_DATA) LICENSE.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/LICENSE.txt + +install-examples: + test -z "$(strip $(EXAMPLES))" || \ + $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples && \ + for file in $(EXAMPLES); do \ + $(INSTALL_DATA) examples/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples; \ + done + +install-manual: + test -z "$(strip $(MANUAL))" || \ + $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual && \ + for file in $(MANUAL); do \ + $(INSTALL_DATA) manual/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual; \ + done + + +clean: + -rm -f -- $(SOURCES:.c=.o) $(SOURCES_LIB:.c=.o) + -rm -f -- $(SOURCES:.c=.$(EXTENSION)) + -rm -f -- $(LIBRARY_NAME).o + -rm -f -- $(LIBRARY_NAME).$(EXTENSION) + +distclean: clean + -rm -f -- $(DISTBINDIR).tar.gz + -rm -rf -- $(DISTBINDIR) + -rm -f -- $(DISTDIR).tar.gz + -rm -rf -- $(DISTDIR) + -rm -f -- $(ORIGDIR).tar.gz + -rm -rf -- $(ORIGDIR) + + +$(DISTBINDIR): + $(INSTALL_DIR) $(DISTBINDIR) + +libdir: all $(DISTBINDIR) + $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTBINDIR) + $(INSTALL_DATA) $(SOURCES) $(DISTBINDIR) + $(INSTALL_DATA) $(HELPPATCHES) $(DISTBINDIR) + test -z "$(strip $(EXTRA_DIST))" || \ + $(INSTALL_DATA) $(EXTRA_DIST) $(DISTBINDIR) +# tar --exclude-vcs -czpf $(DISTBINDIR).tar.gz $(DISTBINDIR) + +$(DISTDIR): + $(INSTALL_DIR) $(DISTDIR) + +$(ORIGDIR): + $(INSTALL_DIR) $(ORIGDIR) + +dist: $(DISTDIR) + $(INSTALL_DATA) Makefile $(DISTDIR) + $(INSTALL_DATA) README.txt $(DISTDIR) + $(INSTALL_DATA) LICENSE.txt $(DISTDIR) + $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTDIR) + test -z "$(strip $(ALLSOURCES))" || \ + $(INSTALL_DATA) $(ALLSOURCES) $(DISTDIR) + test -z "$(strip $(PDOBJECTS))" || \ + $(INSTALL_DATA) $(PDOBJECTS) $(DISTDIR) + test -z "$(strip $(HELPPATCHES))" || \ + $(INSTALL_DATA) $(HELPPATCHES) $(DISTDIR) + test -z "$(strip $(EXTRA_DIST))" || \ + $(INSTALL_DATA) $(EXTRA_DIST) $(DISTDIR) + test -z "$(strip $(EXAMPLES))" || \ + $(INSTALL_DIR) $(DISTDIR)/examples && \ + for file in $(EXAMPLES); do \ + $(INSTALL_DATA) examples/$$file $(DISTDIR)/examples; \ + done + test -z "$(strip $(MANUAL))" || \ + $(INSTALL_DIR) $(DISTDIR)/manual && \ + for file in $(MANUAL); do \ + $(INSTALL_DATA) manual/$$file $(DISTDIR)/manual; \ + done + tar --exclude-vcs -czpf $(DISTDIR).tar.gz $(DISTDIR) + +# make a Debian source package +dpkg-source: + debclean + make distclean dist + mv $(DISTDIR) $(ORIGDIR) + tar --exclude-vcs -czpf ../$(ORIGDIR).orig.tar.gz $(ORIGDIR) + rm -f -- $(DISTDIR).tar.gz + rm -rf -- $(DISTDIR) $(ORIGDIR) + cd .. && dpkg-source -b $(LIBRARY_NAME) + +etags: + etags *.h $(SOURCES) ../../pd/src/*.[ch] /usr/include/*.h /usr/include/*/*.h + +showsetup: + @echo "CFLAGS: $(CFLAGS)" + @echo "LDFLAGS: $(LDFLAGS)" + @echo "LIBS: $(LIBS)" + @echo "PD_INCLUDE: $(PD_INCLUDE)" + @echo "PD_PATH: $(PD_PATH)" + @echo "objectsdir: $(objectsdir)" + @echo "LIBRARY_NAME: $(LIBRARY_NAME)" + @echo "LIBRARY_VERSION: $(LIBRARY_VERSION)" + @echo "SOURCES: $(SOURCES)" + @echo "PDOBJECTS: $(PDOBJECTS)" + @echo "ALLSOURCES: $(ALLSOURCES)" + @echo "UNAME: $(UNAME)" + @echo "CPU: $(CPU)" + @echo "pkglibdir: $(pkglibdir)" + @echo "DISTDIR: $(DISTDIR)" + @echo "ORIGDIR: $(ORIGDIR)" diff --git a/list-abs/OSCprepend-help.pd b/list-abs/OSCprepend-help.pd new file mode 100755 index 0000000..939b6f9 --- /dev/null +++ b/list-abs/OSCprepend-help.pd @@ -0,0 +1,41 @@ +#N canvas 0 31 565 415 10; +#X msg 121 238 /a 1 c 3; +#X obj 121 350 print OSC; +#X text 52 262 ignored:; +#X text 72 238 okay:; +#X obj 121 323 OSCprepend /synth/ha; +#X msg 256 231 /osc; +#X text 304 230 change OSC-messages; +#X msg 256 257 /freq/1; +#X obj 104 31 cnv 15 220 30 empty empty OSCprepend 20 12 0 14 -233017 +-66577 0; +#X text 98 76 "Prepends" first argument to an OSC message list.; +#X text 106 140 Right inlet lets you change the prepended argument +; +#X msg 121 262 900 2 3 4 a b c; +#X text 104 103 Example: with ARG_1 being "/synth" the message "/set +x 1 2" will become "/synth/set x 1 2".; +#X text 107 166 Lists not starting with a symbol are filtered out. +; +#X msg 325 285 1; +#X text 359 287 oops...; +#X symbolatom 324 260 10 0 0 1 type-here - -; +#N canvas 462 89 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION "Prepends" first argument to an OSC message +list; +#X text 12 65 INLET_0 anything; +#X text 12 85 INLET_1 anything; +#X text 12 105 OUTLET_0 anything; +#X restore 504 381 pd META; +#X connect 0 0 4 0; +#X connect 4 0 1 0; +#X connect 5 0 4 1; +#X connect 7 0 4 1; +#X connect 11 0 4 0; +#X connect 14 0 4 1; +#X connect 16 0 4 1; diff --git a/list-abs/OSCprepend.pd b/list-abs/OSCprepend.pd new file mode 100755 index 0000000..efe01f9 --- /dev/null +++ b/list-abs/OSCprepend.pd @@ -0,0 +1,30 @@ +#N canvas 511 144 636 444 10; +#X obj 45 131 list split 1; +#X msg 94 90 /a 1 2 3; +#X obj 45 276 list append; +#X obj 45 299 list trim; +#X obj 45 239 makefilename \$1%s; +#X obj 45 188 route symbol; +#X obj 45 89 inlet; +#X obj 45 319 outlet; +#X text 215 99 "Prepends" first argument to an OSC message list.; +#X text 221 126 Example: with \$1 being "/synth" the message "/set +x 1 2" will become "/synth/set x 1 2".; +#X text 223 163 Right inlet lets you change the prepended argument +; +#X msg 146 209 set \$1%s; +#X obj 146 185 symbol; +#X obj 146 163 inlet; +#X text 224 189 Lists not starting with a symbol are filtered out! +; +#X connect 0 0 5 0; +#X connect 0 1 2 1; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 3 0 7 0; +#X connect 4 0 2 0; +#X connect 5 0 4 0; +#X connect 6 0 0 0; +#X connect 11 0 4 0; +#X connect 12 0 11 0; +#X connect 13 0 12 0; diff --git a/list-abs/README.txt b/list-abs/README.txt new file mode 100755 index 0000000..5fbf0ab --- /dev/null +++ b/list-abs/README.txt @@ -0,0 +1,10 @@ +list-abs +-------- + +A collection of list-processing abstractions for Pd. + +For a list of included objects open list-abs-intro.pd or list-abs-intro.txt + +Maintainer: Frank Barknecht + +-- diff --git a/list-abs/compare-any-help.pd b/list-abs/compare-any-help.pd new file mode 100755 index 0000000..0866166 --- /dev/null +++ b/list-abs/compare-any-help.pd @@ -0,0 +1,50 @@ +#N canvas 0 26 528 377 10; +#X msg 246 131 symbol x; +#X msg 255 154 symbol y; +#X msg 116 137 symbol x; +#X msg 125 160 symbol y; +#X obj 96 254 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X msg 236 109 2.3; +#X msg 106 114 2.3; +#X msg 131 180 i; +#X msg 140 201 j; +#X msg 258 175 i; +#X msg 264 196 j; +#X obj 96 278 print; +#X text 37 14 [compare-any]; +#X text 81 37 Test if two anythings are the same. Out: 1 if equal \, +0 if not equal.; +#X msg 96 92 1; +#X msg 226 87 1; +#X obj 96 231 compare-any; +#X msg 221 66 0; +#X msg 86 71 0; +#N canvas 520 35 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 135 AUTHOR Frank Barknecht; +#X text 12 155 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 75 INLET_0 anything; +#X text 12 95 INLET_1 anything; +#X text 12 115 OUTLET_0 float; +#X text 12 5 KEYWORDS control anything_op; +#X text 12 45 DESCRIPTION test if two anythings are the same. Out: +1 if equal \, 0 if not equal; +#X restore 474 347 pd META; +#X connect 0 0 16 1; +#X connect 1 0 16 1; +#X connect 2 0 16 0; +#X connect 3 0 16 0; +#X connect 4 0 11 0; +#X connect 5 0 16 1; +#X connect 6 0 16 0; +#X connect 7 0 16 0; +#X connect 8 0 16 0; +#X connect 9 0 16 1; +#X connect 10 0 16 1; +#X connect 14 0 16 0; +#X connect 15 0 16 1; +#X connect 16 0 4 0; +#X connect 17 0 16 1; +#X connect 18 0 16 0; diff --git a/list-abs/compare-any.pd b/list-abs/compare-any.pd new file mode 100755 index 0000000..8698da0 --- /dev/null +++ b/list-abs/compare-any.pd @@ -0,0 +1,54 @@ +#N canvas 460 148 653 646 10; +#X obj 118 28 inlet; +#X obj 118 451 outlet; +#X obj 118 336 ==; +#X obj 118 358 select 1; +#N canvas 272 259 450 300 demux 0; +#X obj 76 87 inlet; +#X obj 169 86 inlet; +#X obj 76 145 list prepend 0; +#X obj 76 186 route 0 1; +#X obj 76 242 outlet; +#X obj 105 213 outlet; +#X connect 0 0 2 0; +#X connect 1 0 2 1; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 3 1 5 0; +#X restore 118 230 pd demux; +#X msg 169 207 0; +#X msg 200 206 1; +#X obj 118 295 route float; +#X obj 219 293 route symbol; +#X obj 359 199 print HUH?; +#X obj 219 272 list; +#X obj 238 164 route float symbol; +#X obj 238 136 list; +#X msg 118 423 1; +#X msg 190 418 0; +#X obj 238 28 inlet; +#X obj 219 356 select [DUMMY-SYMBOL]; +#X connect 0 0 4 0; +#X connect 2 0 3 0; +#X connect 3 0 13 0; +#X connect 3 1 14 0; +#X connect 4 0 7 0; +#X connect 4 1 10 0; +#X connect 5 0 4 1; +#X connect 6 0 4 1; +#X connect 7 0 2 0; +#X connect 7 1 14 0; +#X connect 8 0 16 0; +#X connect 8 1 14 0; +#X connect 10 0 8 0; +#X connect 11 0 2 1; +#X connect 11 0 5 0; +#X connect 11 1 6 0; +#X connect 11 1 16 1; +#X connect 11 2 9 0; +#X connect 12 0 11 0; +#X connect 13 0 1 0; +#X connect 14 0 1 0; +#X connect 15 0 12 0; +#X connect 16 0 13 0; +#X connect 16 1 14 0; diff --git a/list-abs/examples/list-demux.pd b/list-abs/examples/list-demux.pd new file mode 100755 index 0000000..7c98565 --- /dev/null +++ b/list-abs/examples/list-demux.pd @@ -0,0 +1,18 @@ +#N canvas 0 0 450 300 10; +#X obj 131 118 list prepend 0; +#X obj 224 95 hradio 15 1 0 4 empty empty empty 0 -6 0 8 -262144 -1 +-1 3; +#X obj 131 146 route 0 1 2 3; +#X obj 131 251 print d1; +#X obj 195 177 print d4; +#X obj 174 202 print d3; +#X obj 152 224 print d2; +#X floatatom 131 81 5 0 0 0 - - -; +#X text 111 39 "demux" with lists; +#X connect 0 0 2 0; +#X connect 1 0 0 1; +#X connect 2 0 3 0; +#X connect 2 1 6 0; +#X connect 2 2 5 0; +#X connect 2 3 4 0; +#X connect 7 0 0 0; diff --git a/list-abs/examples/list-inter-example.pd b/list-abs/examples/list-inter-example.pd new file mode 100755 index 0000000..e1fd14d --- /dev/null +++ b/list-abs/examples/list-inter-example.pd @@ -0,0 +1,91 @@ +#N canvas 331 120 783 579 10; +#X obj 118 233 list-inter; +#X obj 118 166 list split 1; +#X obj 201 234 t l; +#X obj 118 193 expr 1-$f1; +#X obj 461 377 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 9377 1; +#X obj 118 303 vsl 15 128 0 10 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 6198 1; +#X obj 157 303 vsl 15 128 0 10 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 3953 1; +#X obj 197 303 vsl 15 128 0 10 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 4387 1; +#X floatatom 118 277 5 0 0 0 - - -; +#X floatatom 157 277 5 0 0 0 - - -; +#X floatatom 197 277 5 0 0 0 - - -; +#X obj 118 255 unpack 0 0 0; +#X obj 461 400 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 2363 1; +#X obj 461 423 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 960 1; +#X obj 447 143 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 12700 1; +#X obj 447 166 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 3200 1; +#X obj 447 189 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 1300 1; +#X msg 459 107 1; +#X msg 118 136 \$1 5 2 3 \, \$2 4 5 6 \, \$3 6 7 1; +#N canvas 0 0 753 456 normalize 0; +#X obj 369 105 pack 0 0 0; +#X obj 332 175 list-math /; +#X obj 438 76 t b f; +#X obj 391 78 t b f; +#X obj 403 154 list-accum; +#X obj 361 135 t a a; +#X obj 330 202 unpack 0 0 0; +#X msg 305 259 set \$1; +#X msg 365 260 set \$1; +#X msg 437 269 set \$1; +#X obj 360 47 inlet; +#X obj 403 48 inlet; +#X obj 450 49 inlet; +#X obj 328 327 outlet; +#X obj 380 328 outlet; +#X obj 438 324 outlet; +#X obj 190 246 outlet; +#X connect 0 0 5 0; +#X connect 1 0 6 0; +#X connect 1 0 16 0; +#X connect 2 0 0 0; +#X connect 2 1 0 2; +#X connect 3 0 0 0; +#X connect 3 1 0 1; +#X connect 4 0 1 1; +#X connect 5 0 1 0; +#X connect 5 1 4 0; +#X connect 6 0 7 0; +#X connect 6 1 8 0; +#X connect 6 2 9 0; +#X connect 7 0 13 0; +#X connect 8 0 14 0; +#X connect 9 0 15 0; +#X connect 10 0 0 0; +#X connect 11 0 3 0; +#X connect 12 0 2 0; +#X restore 342 339 pd normalize; +#X obj 342 369 s \$0-list; +#X obj 118 107 r \$0-list; +#X connect 0 0 11 0; +#X connect 0 0 2 0; +#X connect 1 0 3 0; +#X connect 1 1 0 1; +#X connect 2 0 0 2; +#X connect 3 0 0 0; +#X connect 8 0 5 0; +#X connect 9 0 6 0; +#X connect 10 0 7 0; +#X connect 11 0 8 0; +#X connect 11 1 9 0; +#X connect 11 2 10 0; +#X connect 14 0 19 0; +#X connect 15 0 19 1; +#X connect 16 0 19 2; +#X connect 17 0 14 0; +#X connect 18 0 1 0; +#X connect 19 0 20 0; +#X connect 19 1 4 0; +#X connect 19 2 12 0; +#X connect 19 3 13 0; +#X connect 21 0 18 0; diff --git a/list-abs/examples/list-inter-gem-example.pd b/list-abs/examples/list-inter-gem-example.pd new file mode 100755 index 0000000..209daa2 --- /dev/null +++ b/list-abs/examples/list-inter-gem-example.pd @@ -0,0 +1,100 @@ +#N canvas 402 9 678 693 10; +#X obj 459 490 gemwin; +#X msg 459 452 reset \, create \, 1; +#X msg 488 469 0 \, destroy; +#X obj 57 199 translateXYZ; +#X obj 58 161 gemhead; +#X obj 48 381 gemhead; +#X obj 249 202 translateXYZ; +#X obj 248 167 gemhead; +#X obj 426 203 translateXYZ; +#X obj 425 168 gemhead; +#X obj 151 313 t b a; +#X obj 152 338 f; +#X obj 90 99 hsl 128 15 0 1 0 0 empty empty factor_(0-1) -2 -6 0 10 +-262144 -1 -1 7100 1; +#X obj 377 105 hsl 128 15 0 1 0 0 empty empty factor_(0-1) -2 -6 0 +10 -262144 -1 -1 7000 1; +#X obj 253 114 t b b b; +#X msg 259 93 bang; +#X obj 97 290 list-inter; +#X obj 163 357 list-inter; +#X obj 62 234 color 1 0 0; +#X obj 248 242 color 0 1 0; +#X obj 422 246 color 0 0 1; +#X obj 54 491 color 1 1 1; +#X obj 483 170 unpack 0 0 0 0 0; +#X obj 306 169 unpack 0 0 0 0 0; +#X obj 116 163 unpack 0 0 0 0 0; +#X obj 154 195 pack 0 0 0; +#X msg 309 142 3 1 0 1 0; +#X obj 336 218 pack 0 0 0; +#X obj 519 205 pack 0 0 0; +#X obj 106 383 unpack 0 0 0 0 0; +#X obj 187 423 pack 0 0 0; +#X msg 487 147 -2 -3 1 0.3 0.5; +#X msg 119 135 -1 2 1 0 0; +#X obj 57 264 circle 0.1; +#X obj 251 277 circle 0.1; +#X obj 420 283 circle 0.1; +#X obj 35 421 translateXYZ 0 0 -0.1; +#X obj 252 72 loadbang; +#X obj 52 511 square 0.2; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 18 0; +#X connect 4 0 3 0; +#X connect 5 0 36 0; +#X connect 6 0 19 0; +#X connect 7 0 6 0; +#X connect 8 0 20 0; +#X connect 9 0 8 0; +#X connect 10 0 11 0; +#X connect 10 1 17 1; +#X connect 11 0 17 0; +#X connect 12 0 16 0; +#X connect 13 0 11 0; +#X connect 14 0 32 0; +#X connect 14 1 26 0; +#X connect 14 2 31 0; +#X connect 15 0 14 0; +#X connect 16 0 10 0; +#X connect 17 0 29 0; +#X connect 18 0 33 0; +#X connect 19 0 34 0; +#X connect 20 0 35 0; +#X connect 21 0 38 0; +#X connect 22 0 8 1; +#X connect 22 1 8 2; +#X connect 22 2 28 0; +#X connect 22 3 28 1; +#X connect 22 4 28 2; +#X connect 23 0 6 1; +#X connect 23 1 6 2; +#X connect 23 2 27 0; +#X connect 23 3 27 1; +#X connect 23 4 27 2; +#X connect 24 0 3 1; +#X connect 24 1 3 2; +#X connect 24 2 25 0; +#X connect 24 3 25 1; +#X connect 24 4 25 2; +#X connect 25 0 18 1; +#X connect 26 0 16 2; +#X connect 26 0 23 0; +#X connect 27 0 19 1; +#X connect 28 0 20 1; +#X connect 29 0 36 1; +#X connect 29 1 36 2; +#X connect 29 2 30 0; +#X connect 29 3 30 1; +#X connect 29 4 30 2; +#X connect 30 0 21 1; +#X connect 31 0 17 2; +#X connect 31 0 22 0; +#X connect 32 0 16 1; +#X connect 32 0 24 0; +#X connect 36 0 21 0; +#X connect 37 0 14 0; +#X connect 37 0 13 0; +#X connect 37 0 12 0; diff --git a/list-abs/examples/list-sieve-example-2.pd b/list-abs/examples/list-sieve-example-2.pd new file mode 100755 index 0000000..c0b762a --- /dev/null +++ b/list-abs/examples/list-sieve-example-2.pd @@ -0,0 +1,112 @@ +#N canvas 630 119 650 767 10; +#X obj 272 233 list-sieve; +#X msg 207 155 0 5 7; +#X msg 272 186 2 4 9; +#X msg 337 206 11; +#X obj 207 129 t b b b; +#X obj 142 111 mod 12; +#X floatatom 142 60 5 0 0 0 - - -; +#X obj 142 83 t f f; +#X obj 448 178 div 12; +#X obj 448 204 * 12; +#X msg 207 108 bang; +#X obj 205 78 loadbang; +#X obj 142 386 + 24; +#X obj 142 360 list-drip; +#X obj 448 270 t f; +#X obj 448 97 t f; +#X msg 193 300 0 4 7; +#X msg 264 301 0 3 7; +#X msg 332 302 0 3 6; +#X obj 241 272 b; +#X obj 140 484 rrad.fluid~ /fl; +#X obj 148 432 pack 0 0; +#X obj 144 457 list prepend 1; +#X obj 148 676 ezdac~; +#X obj 142 185 list-sieve; +#X obj 207 212 list-sieve; +#X obj 152 408 makenote 90 200; +#X floatatom 151 142 5 0 0 0 - - -; +#N canvas 0 0 450 300 add 0; +#X obj 116 150 list-math +; +#X obj 116 89 t b f; +#X obj 116 121 list; +#X obj 116 186 outlet; +#X obj 175 86 inlet; +#X obj 116 67 inlet; +#X connect 0 0 3 0; +#X connect 1 0 2 0; +#X connect 1 1 0 1; +#X connect 2 0 0 0; +#X connect 4 0 2 1; +#X connect 5 0 1 0; +#X restore 320 329 pd add; +#N canvas 0 0 450 300 add 0; +#X obj 116 150 list-math +; +#X obj 116 89 t b f; +#X obj 116 121 list; +#X obj 116 186 outlet; +#X obj 175 86 inlet; +#X obj 116 67 inlet; +#X connect 0 0 3 0; +#X connect 1 0 2 0; +#X connect 1 1 0 1; +#X connect 2 0 0 0; +#X connect 4 0 2 1; +#X connect 5 0 1 0; +#X restore 218 329 pd add; +#N canvas 0 0 450 300 add 0; +#X obj 116 150 list-math +; +#X obj 116 89 t b f; +#X obj 116 121 list; +#X obj 116 186 outlet; +#X obj 175 86 inlet; +#X obj 116 67 inlet; +#X connect 0 0 3 0; +#X connect 1 0 2 0; +#X connect 1 1 0 1; +#X connect 2 0 0 0; +#X connect 4 0 2 1; +#X connect 5 0 1 0; +#X restore 142 323 pd add; +#X connect 0 0 28 0; +#X connect 0 1 13 0; +#X connect 1 0 24 1; +#X connect 2 0 25 1; +#X connect 3 0 0 1; +#X connect 4 0 1 0; +#X connect 4 1 2 0; +#X connect 4 2 3 0; +#X connect 4 2 19 0; +#X connect 5 0 24 0; +#X connect 5 0 27 0; +#X connect 6 0 7 0; +#X connect 7 0 5 0; +#X connect 7 1 15 0; +#X connect 8 0 9 0; +#X connect 9 0 14 0; +#X connect 10 0 4 0; +#X connect 11 0 4 0; +#X connect 12 0 26 0; +#X connect 13 0 12 0; +#X connect 14 0 12 1; +#X connect 15 0 8 0; +#X connect 16 0 30 1; +#X connect 17 0 29 1; +#X connect 18 0 28 1; +#X connect 19 0 16 0; +#X connect 19 0 17 0; +#X connect 19 0 18 0; +#X connect 20 0 23 0; +#X connect 20 1 23 1; +#X connect 21 0 22 0; +#X connect 22 0 20 0; +#X connect 24 0 30 0; +#X connect 24 1 25 0; +#X connect 25 0 29 0; +#X connect 25 1 0 0; +#X connect 26 0 21 0; +#X connect 26 1 21 1; +#X connect 28 0 13 0; +#X connect 29 0 13 0; +#X connect 30 0 13 0; diff --git a/list-abs/last-x-help.pd b/list-abs/last-x-help.pd new file mode 100755 index 0000000..b3d0cb1 --- /dev/null +++ b/list-abs/last-x-help.pd @@ -0,0 +1,20 @@ +#N canvas 0 26 569 323 10; +#X obj 188 143 last-x 4; +#X floatatom 188 118 5 0 0 0 - - -; +#X obj 188 174 print last_x; +#X text 124 52 last-x: make a list of the last x floats.; +#X floatatom 239 119 5 0 0 2 change-size - -; +#N canvas 520 35 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION make a list of the last x floats; +#X text 12 65 INLET_0 float; +#X text 12 105 OUTLET_0 list; +#X text 12 85 INLET_1 float; +#X restore 511 292 pd META; +#X connect 0 0 2 0; +#X connect 1 0 0 0; +#X connect 4 0 0 1; diff --git a/list-abs/last-x.pd b/list-abs/last-x.pd new file mode 100755 index 0000000..a7cbc02 --- /dev/null +++ b/list-abs/last-x.pd @@ -0,0 +1,10 @@ +#N canvas 417 318 464 379 10; +#X obj 265 147 inlet; +#X obj 179 149 inlet; +#X obj 179 253 outlet; +#X text 54 77 This is just a backwards compatibility wrapper around +list-lastx; +#X obj 179 206 list-lastx \$1; +#X connect 0 0 4 1; +#X connect 1 0 4 0; +#X connect 4 0 2 0; diff --git a/list-abs/list-abs-help.pd b/list-abs/list-abs-help.pd new file mode 100755 index 0000000..107d876 --- /dev/null +++ b/list-abs/list-abs-help.pd @@ -0,0 +1,18 @@ +#N canvas 1 88 475 311 10; +#X obj 147 204 print; +#X msg 147 109 1 2 -3 -4 5 and -6; +#X text 55 66 list-abs: apply abs() on float elements of a list.; +#X obj 147 158 list-abs; +#N canvas 414 178 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 115 AUTHOR Frank Barknecht; +#X text 12 45 DESCRIPTION list-abs: apply abs() on float elements of +a list.; +#X text 12 75 INLET_0 list; +#X text 12 95 OUTLET_0 list; +#X text 12 135 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X restore 397 277 pd META; +#X connect 1 0 3 0; +#X connect 3 0 0 0; diff --git a/list-abs/list-abs-intro.pd b/list-abs/list-abs-intro.pd new file mode 100755 index 0000000..7aff176 --- /dev/null +++ b/list-abs/list-abs-intro.pd @@ -0,0 +1,78 @@ +#N canvas 802 145 296 279 10; +#N canvas 204 36 682 744 \$0-overview 0; +#X restore 79 115 pd \$0-overview; +#N canvas 337 123 805 747 dump 0; +#X obj 94 243 textfile; +#X obj 94 337 t a b; +#X obj 128 411 f; +#X obj 160 412 + 1; +#X obj 240 603 s pd-\$0-overview; +#X obj 94 461 list; +#X msg 172 247 1; +#X obj 94 211 until; +#X obj 74 41 inlet; +#X obj 74 76 list; +#X msg 258 199 print; +#X msg 115 184 read \$1 cr \, rewind; +#X msg 239 247 clear; +#X obj 239 42 inlet; +#X obj 128 434 * 45; +#X msg 74 113 symbol \$1.txt; +#X obj 74 152 t b b a b; +#X obj 94 362 list split 1; +#X obj 264 494 list prepend 0; +#X obj 264 536 list trim; +#X obj 197 414 route bang; +#X msg 74 537 vis 0 \, vis 1; +#X obj 94 269 route float; +#X obj 190 340 max; +#X obj 190 362 until; +#X text 258 348 lines that just contain a number are used to skip as +many lines as the number specifies. use this to make room for larger +GOP objects so they don't overlap with following objects.; +#X msg 94 483 obj 50 \$2 \$1; +#X obj 264 514 list prepend text 200; +#X connect 0 0 22 0; +#X connect 0 1 7 1; +#X connect 1 0 17 0; +#X connect 1 1 2 0; +#X connect 2 0 3 0; +#X connect 2 0 14 0; +#X connect 3 0 2 1; +#X connect 5 0 26 0; +#X connect 6 0 2 1; +#X connect 7 0 0 0; +#X connect 8 0 9 0; +#X connect 9 0 15 0; +#X connect 10 0 0 0; +#X connect 11 0 0 0; +#X connect 12 0 4 0; +#X connect 13 0 12 0; +#X connect 14 0 5 1; +#X connect 14 0 18 1; +#X connect 15 0 16 0; +#X connect 16 0 21 0; +#X connect 16 1 7 0; +#X connect 16 2 11 0; +#X connect 16 3 12 0; +#X connect 16 3 6 0; +#X connect 17 0 5 0; +#X connect 17 1 20 0; +#X connect 18 0 27 0; +#X connect 19 0 4 0; +#X connect 20 1 18 0; +#X connect 21 0 4 0; +#X connect 22 0 23 0; +#X connect 22 1 1 0; +#X connect 23 0 24 0; +#X connect 24 0 2 0; +#X connect 26 0 4 0; +#X connect 27 0 19 0; +#X restore 79 93 pd dump; +#X msg 138 93 clear; +#X text 80 150 Help-click any object to; +#X text 80 169 open the help file!; +#X msg 79 66 list-abs-intro; +#X text 77 42 click me:; +#X connect 2 0 1 1; +#X connect 5 0 1 0; diff --git a/list-abs/list-abs-intro.txt b/list-abs/list-abs-intro.txt new file mode 100755 index 0000000..2a1b9db --- /dev/null +++ b/list-abs/list-abs-intro.txt @@ -0,0 +1,72 @@ +OSCprepend - "Prepends" first argument to an OSC message list. +compare-any - Test if two anythings are the same. Out: 1 if equal +last-x - last-x: make a list of the last x floats (deprecated: use [list-lastx] instead +list-abs - apply abs() on float elements of a list. +list-accum - add all floats in a list +list-add - Add two lists element by element +list-apply - apply the object created by [arg1 arg2] on +list-centroid - Calculates the centroid or center of mass of a list of +list-clip - clip for lists +list-compare - Compare two lists element by element. +list-delete - delete element at position POS from list. +list-dotprod - dot-product of two lists: res = sum(Xi*Yi) +list-drip - list-drip: drips or serializes a list +list-drip2 - Drips two lists in sync as long as the first list +list-dripslow - Serialize a list on demand. +list-emath - Do math on lists element by element +list-enumerate - serialize a list and put numbers in front of every element +list-equalize - scale a list so that all float elements sum up to 1 +list-extend - Build a list from incoming lists or elements. +list-fifo-delim - This object is obsolete! Use [list-fifo] instead! +list-fifo - stores incoming (list-)messages +list-filter - filter out list elemnent by a condition +list-find - Find position(s) of a value in a list. +list-group - group items into lists of the same size +list-geometric-mean - Calculates the geometric mean of a list (of floats) +list-harmonic-mean - Calculates the harmonic mean of a list (of floats) +list-idx - Get element at position idx. +list-insert - insert LIST before element at position POS +list-inter - elementwise linear interpolation between +list-inter-many - Elementwise linear interpolation between several float lists +list-iter - group lists into sub-lists with size-limit +list-l2s - Concatenate a list into a single symbol using ARG1 as delimiter +list-lastx - make a list of the last x floats. +list-len - calculate length of a list (use [list length] if available) +list-lifo - stores incoming (list-)messages +list-makefilename - Change symbols in a list pass floats unchanged. +list-map - Calls a user-defined operation for each of the incoming list elements +list-map2 - Calls a user-defined operation for each pair of elements of two lists +list-math - simple mathematical operations on lists. +list-mean - Calculates the arithmetric mean of a list (of floats) +list-minmax - find minimum and maximum float in a list. +list-moses - [moses] for lists +list-mult - Substract two lists element by element +list-normalize - normalize a list +list-nth - look up the nth element in a list. n has to be positive +list-onearg - defaults for abstractions arguments +list-pad - pad a list with elements from a longer list +list-quicksort - Sort a list of floats into ascending order using a quicksort +list-random - generate lists of pseudorandom integers +list-rdrip - drips or serializes a list in reverse. +list-reduce - apply a function of two arguments cumulatively to the items of a list +list-replace - replace a list starting at position POS with another list +list-rev - reverse a list +list-rot - Rotate a list (move ROT# elements from front to back) +list-round - round all numbers in a list +list-sect - outputs the elements that are common to both input lists. +list-seek - walk through a list element by element - similar to [textfile] +list-shellsort - Sort a list of floats into ascending order using a Shell sort +list-sieve - Look up occurence of incoming floats in a list +list-sort - Sort an incoming list of values +list-splat - like [list split] which also accepts negative split locations +list-stddev - calculate the standard deviation of a float +list-sub - Substract two lists element by element +list-swap - swap two elements of a list at given indices. +list-tabdump - dump a [table] into a list +list-unique - remove duplicates from a list +list-unitvec - make a unit vector out of any list +list-wrandom - Use a list as a probability table for weighted random values +prepent - shortcut for [list prepend]--[list trim] +sroute - settable [route] +take-two - take a list as input and print all combinations of +triple-scale - interpolate linearily between two points (x y z) diff --git a/list-abs/list-abs-meta.pd b/list-abs/list-abs-meta.pd new file mode 100755 index 0000000..042f15f --- /dev/null +++ b/list-abs/list-abs-meta.pd @@ -0,0 +1,8 @@ +#N canvas 10 10 200 200 10; +#N canvas 20 20 420 300 META 0; +#X text 10 30 NAME list-abs; +#X text 10 50 AUTHOR Frank Barknecht; +#X text 10 70 LICENSE SIBSD; +#X text 10 90 DESCRIPTION a collection of objects for manipulating lists. Requires pd>=0.39; +#X text 10 110 VERSION 0.1; +#X restore 10 10 pd META; diff --git a/list-abs/list-abs.pd b/list-abs/list-abs.pd new file mode 100755 index 0000000..d032d3c --- /dev/null +++ b/list-abs/list-abs.pd @@ -0,0 +1,23 @@ +#N canvas 228 307 502 424 10; +#X obj 130 59 inlet; +#X obj 130 86 t b a b; +#X obj 152 145 list-drip; +#X obj 152 190 abs; +#X obj 152 168 route float; +#X obj 152 244 list prepend; +#X obj 245 244 t l; +#X obj 129 274 list; +#X obj 129 302 outlet; +#X text 92 30 list-abs: apply abs() on float elements of a list.; +#X connect 0 0 1 0; +#X connect 1 0 7 0; +#X connect 1 1 2 0; +#X connect 1 2 5 1; +#X connect 2 0 4 0; +#X connect 3 0 5 0; +#X connect 4 0 3 0; +#X connect 4 1 5 0; +#X connect 5 0 6 0; +#X connect 5 0 7 1; +#X connect 6 0 5 1; +#X connect 7 0 8 0; diff --git a/list-abs/list-accum-help.pd b/list-abs/list-accum-help.pd new file mode 100755 index 0000000..d679b85 --- /dev/null +++ b/list-abs/list-accum-help.pd @@ -0,0 +1,21 @@ +#N canvas 0 26 470 313 10; +#X obj 164 160 list-accum; +#X floatatom 164 199 5 0 0 0 - - -; +#X msg 164 119 1 2 3; +#X obj 120 197 print; +#X msg 217 120 1 2 3 and 4; +#X text 94 61 list-accum: add all floats in a list; +#N canvas 466 163 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 105 AUTHOR Frank Barknecht; +#X text 12 85 OUTLET_0 list; +#X text 12 125 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 65 INLET_0 anything; +#X text 12 45 DESCRIPTION add all floats in a list; +#X restore 397 277 pd META; +#X connect 0 0 1 0; +#X connect 0 0 3 0; +#X connect 2 0 0 0; +#X connect 4 0 0 0; diff --git a/list-abs/list-accum.pd b/list-abs/list-accum.pd new file mode 100755 index 0000000..77e6358 --- /dev/null +++ b/list-abs/list-accum.pd @@ -0,0 +1,22 @@ +#N canvas 0 0 450 300 10; +#X obj 212 193 f 0; +#X obj 182 192 + 1; +#X obj 182 114 list-drip; +#X obj 212 168 0; +#X obj 182 53 inlet; +#X obj 182 81 t a b; +#X obj 182 140 route float; +#X obj 166 245 outlet; +#X obj 166 220 f; +#X text 116 23 list-accum: add all floats in a list; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 1 0 8 1; +#X connect 2 0 6 0; +#X connect 2 1 8 0; +#X connect 3 0 0 0; +#X connect 4 0 5 0; +#X connect 5 0 2 0; +#X connect 5 1 3 0; +#X connect 6 0 1 0; +#X connect 8 0 7 0; diff --git a/list-abs/list-add-help.pd b/list-abs/list-add-help.pd new file mode 100755 index 0000000..f7fae74 --- /dev/null +++ b/list-abs/list-add-help.pd @@ -0,0 +1,20 @@ +#N canvas 0 26 450 300 10; +#X msg 145 116 5 5 5 NOPE 5; +#X obj 145 217 print; +#X msg 196 140 1 2 3 0 -1; +#X text 108 67 Substract two lists element by element; +#X obj 145 177 list-add; +#N canvas 460 150 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 105 OUTLET_0 list; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 65 INLET_0 anything; +#X text 12 85 INLET_1 anything; +#X text 12 45 DESCRIPTION substract two lists element by element; +#X restore 397 277 pd META; +#X connect 0 0 4 0; +#X connect 2 0 4 1; +#X connect 4 0 1 0; diff --git a/list-abs/list-add.pd b/list-abs/list-add.pd new file mode 100755 index 0000000..dcc2e94 --- /dev/null +++ b/list-abs/list-add.pd @@ -0,0 +1,8 @@ +#N canvas 256 135 500 518 10; +#X obj 59 31 inlet; +#X obj 138 34 inlet; +#X obj 59 117 outlet; +#X obj 59 85 list-emath +; +#X connect 0 0 3 0; +#X connect 1 0 3 1; +#X connect 3 0 2 0; diff --git a/list-abs/list-apply-help.pd b/list-abs/list-apply-help.pd new file mode 100755 index 0000000..0b2872c --- /dev/null +++ b/list-abs/list-apply-help.pd @@ -0,0 +1,80 @@ +#N canvas 0 26 802 590 10; +#X obj 78 317 list-apply + 1; +#X msg 78 285 1 2 3 4; +#X obj 78 344 print; +#X msg 233 285 1 2 3 4; +#X obj 233 347 print; +#X text 29 23 list-apply: apply the object created by [arg1 arg2] on +every list element and return the modified list.; +#X floatatom 171 287 5 0 0 2 add_x - -; +#X msg 360 264 set /synth%d/freq; +#X text 129 126 Inlets:; +#X text 165 168 2) inlet connected to the apply-operation's first inlet. +; +#X text 164 191 3) inlet connected to the apply-operation's second +inlet \, if possible. (Not connected if there is no second inlet as +is the case with for example makefilename.; +#X msg 360 285 set count_%d...; +#X msg 487 286 not used with makefilename; +#X msg 77 396 1 2 3 4; +#X obj 77 438 print; +#X msg 288 397 1 2 3 4; +#X obj 288 439 print; +#X obj 388 379 hradio 15 1 0 4 empty empty empty 0 -6 0 8 -262144 -1 +-1 0; +#X obj 388 396 + 1; +#X floatatom 198 398 5 0 0 2 moses-arg - -; +#X text 128 74 Arguments:; +#X text 163 92 Arg1 and arg2 are used to create the object whose operation +is applied to the list elements.; +#X text 164 148 1) the list to modify.; +#X text 24 248 EXAMPLES:; +#X obj 503 446 print; +#X msg 503 366 1 2 3 3 3 4; +#X msg 560 392 set 1; +#X obj 645 447 print; +#X msg 645 387 45 57 69; +#X obj 79 551 print; +#X msg 79 507 1 2 3 4; +#X text 286 530 prepent is part of list-abs; +#X obj 233 317 list-apply makefilename /synth%d/freq; +#X obj 77 417 list-apply moses 3; +#X obj 288 418 list-apply == 4; +#X obj 503 418 list-apply change; +#X obj 645 418 list-apply mtof; +#X obj 79 528 list-apply prepent whatever; +#N canvas 460 150 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 155 AUTHOR Frank Barknecht; +#X text 12 135 OUTLET_0 list; +#X text 12 175 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 95 INLET_1 anything; +#X text 12 75 INLET_0 anything; +#X text 12 45 DESCRIPTION apply the object created by [arg1 arg2] on +every list element and return the modified list.; +#X text 12 115 INLET_2 anything; +#X restore 737 557 pd META; +#X connect 0 0 2 0; +#X connect 1 0 0 0; +#X connect 3 0 32 0; +#X connect 6 0 0 2; +#X connect 7 0 32 1; +#X connect 11 0 32 1; +#X connect 12 0 32 2; +#X connect 13 0 33 0; +#X connect 15 0 34 0; +#X connect 17 0 18 0; +#X connect 18 0 34 2; +#X connect 19 0 33 2; +#X connect 25 0 35 0; +#X connect 26 0 35 1; +#X connect 28 0 36 0; +#X connect 30 0 37 0; +#X connect 32 0 4 0; +#X connect 33 0 14 0; +#X connect 34 0 16 0; +#X connect 35 0 24 0; +#X connect 36 0 27 0; +#X connect 37 0 29 0; diff --git a/list-abs/list-apply.pd b/list-abs/list-apply.pd new file mode 100755 index 0000000..06b5506 --- /dev/null +++ b/list-abs/list-apply.pd @@ -0,0 +1,29 @@ +#N canvas 0 0 554 590 10; +#X obj 77 499 list; +#X obj 100 385 list prepend; +#X obj 78 150 t b a b; +#X text 260 177 clear result list; +#X text 175 242 "Drip" (serialize) the list; +#X text 124 496 Final result is built here; +#X obj 78 81 inlet; +#X obj 210 271 inlet; +#X obj 77 530 outlet; +#X obj 100 307 \$1 \$2; +#X text 164 307 do \$1 \$2 with each element; +#X text 258 389 Repack the list; +#X obj 196 386 t a; +#X obj 163 270 inlet; +#X text 276 272 two inlets for the apply-operation; +#X obj 100 242 list-drip; +#X connect 0 0 8 0; +#X connect 1 0 0 1; +#X connect 1 0 12 0; +#X connect 2 0 0 0; +#X connect 2 1 15 0; +#X connect 2 2 1 1; +#X connect 6 0 2 0; +#X connect 7 0 9 1; +#X connect 9 0 1 0; +#X connect 12 0 1 1; +#X connect 13 0 9 0; +#X connect 15 0 9 0; diff --git a/list-abs/list-centroid-help.pd b/list-abs/list-centroid-help.pd new file mode 100755 index 0000000..c23138d --- /dev/null +++ b/list-abs/list-centroid-help.pd @@ -0,0 +1,201 @@ +#N struct 1031-centroid float x; +#N canvas 0 26 626 572 10; +#X floatatom 129 468 5 0 0 0 centroid - -; +#X msg 129 363 1 1 1 1; +#X msg 245 260 0 0 0 0; +#X msg 245 279 -1 1; +#X obj 215 469 bng 15 250 50 0 empty empty result_undefined 17 7 1 +10 -262144 -1 -1; +#X msg 129 245 0 1 0; +#X obj 129 439 list-centroid; +#X text 63 25 [list-centroid]; +#X text 93 90 centroid = sum(mi * i) / sum(mi); +#X text 71 49 Calculates the centroid or center of mass of a list of +floats according to:; +#X text 67 115 where the index i starts from 0; +#X msg 247 344 -1 3; +#X msg 129 287 1 2 3; +#X text 314 270 these two are undefined!; +#X msg 129 341 5 5 5; +#N canvas 0 0 450 300 randlist 0; +#X obj 134 129 until; +#X msg 246 151 set; +#X msg 134 193 add2 \$1; +#X obj 112 101 t b f b; +#X obj 135 249 outlet; +#X obj 112 31 inlet; +#X obj 112 73 + 1; +#X obj 112 53 random 10; +#X obj 134 151 random 10; +#X obj 134 171 - 5; +#X connect 0 0 8 0; +#X connect 1 0 4 0; +#X connect 2 0 4 0; +#X connect 3 0 4 0; +#X connect 3 1 0 0; +#X connect 3 2 1 0; +#X connect 5 0 7 0; +#X connect 6 0 3 0; +#X connect 7 0 6 0; +#X connect 8 0 9 0; +#X connect 9 0 2 0; +#X restore 295 337 pd randlist; +#X msg 295 363 4; +#X msg 295 315 bang; +#X msg 129 306 10 20 30; +#X msg 129 267 0 2 0 0 0 1; +#X msg 248 325 -1 2; +#X msg 248 407 -10 9; +#X text 305 406 Note: a centroid can be negative!; +#X text 75 520 2007 Frank Barknecht; +#X text 67 146 Negative values are possible.; +#X text 65 174 If all floats add up to 0 \, the result is undefined. +In this case \, no result will be sent to the first outlet \, instead +the second outlet will bang and a console warning will be issued.; +#N canvas 318 53 641 556 graphical-centroid 0; +#N canvas 0 0 450 300 randlist 0; +#X obj 134 129 until; +#X msg 246 151 set; +#X msg 134 193 add2 \$1; +#X obj 112 101 t b f b; +#X obj 135 249 outlet; +#X obj 112 31 inlet; +#X obj 134 151 random 100; +#X obj 134 171 / 100; +#X msg 112 59 10; +#X connect 0 0 6 0; +#X connect 1 0 4 0; +#X connect 2 0 4 0; +#X connect 3 0 4 0; +#X connect 3 1 0 0; +#X connect 3 2 1 0; +#X connect 5 0 8 0; +#X connect 6 0 7 0; +#X connect 7 0 2 0; +#X connect 8 0 3 0; +#X restore 79 388 pd randlist; +#X msg 79 366 bang; +#X obj 79 447 list prepend 0; +#X obj 79 470 s \$0-tab; +#N canvas 0 0 450 300 (subpatch) 0; +#X array \$0-tab 10 float 0; +#X coords 0 1 9 0 200 140 1; +#X restore 79 105 graph; +#N canvas 0 0 694 427 \$0-c 0; +#X scalar 1031-centroid 0 \;; +#X coords 0 0 18 140 200 140 1; +#X restore 79 105 pd \$0-c; +#X floatatom 339 346 5 0 0 0 - - -; +#X obj 339 313 list-centroid; +#N canvas 336 319 712 355 \$0-centroid 0; +#X obj 19 329 outlet; +#X obj 19 86 route change; +#X obj 19 62 struct \$0-centroid float x; +#X obj 228 62 drawpolygon 900 2 x 0 x 140; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X restore 453 315 pd \$0-centroid; +#X obj 339 367 set \$0-centroid x; +#N canvas 0 0 503 429 create 0; +#X msg 242 258 traverse pd-\$1 \, bang; +#X obj 242 238 symbol \$0-c; +#X msg 107 79 0; +#X obj 242 278 pointer; +#X msg 243 178 clear; +#X obj 243 205 s pd-\$0-c; +#X obj 107 302 append \$0-centroid x; +#X obj 107 114 t a b b; +#X obj 107 50 loadbang; +#X obj 107 326 outlet; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 2 0 7 0; +#X connect 3 0 6 1; +#X connect 4 0 5 0; +#X connect 6 0 9 0; +#X connect 7 0 6 0; +#X connect 7 1 1 0; +#X connect 7 2 4 0; +#X connect 8 0 2 0; +#X restore 468 339 pd create; +#X obj 339 127 metro 50; +#X obj 339 102 tgl 15 0 empty empty show-centroid 17 7 1 10 -258699 +-262144 -1 0 1; +#N canvas 473 338 450 300 countto 0; +#X obj 131 154 f 0; +#X obj 156 153 + 1; +#X msg 174 113 0; +#X obj 131 183 outlet; +#X obj 131 59 inlet; +#X obj 131 116 until; +#X obj 131 96 t a b; +#X connect 0 0 1 0; +#X connect 0 0 3 0; +#X connect 1 0 0 1; +#X connect 2 0 0 1; +#X connect 4 0 6 0; +#X connect 5 0 0 0; +#X connect 6 0 5 0; +#X connect 6 1 2 0; +#X restore 362 195 pd countto; +#X obj 362 219 tabread \$0-tab; +#X obj 362 249 list prepend; +#X obj 452 249 t a; +#X msg 362 175 10; +#X obj 339 148 t b b b; +#X obj 339 274 list; +#X text 77 30 Switch on the "show-centroid"-metro and play with the +values in the array.; +#X obj 79 344 loadbang; +#X msg 79 414 0.56 0.59 0.8 0.98 0.3 0.64 0.96 0.57 0.55 0.08; +#X connect 0 0 22 0; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 6 0 9 0; +#X connect 7 0 6 0; +#X connect 8 0 9 1; +#X connect 10 0 9 1; +#X connect 11 0 18 0; +#X connect 12 0 11 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 15 0 19 1; +#X connect 16 0 15 1; +#X connect 17 0 13 0; +#X connect 18 0 19 0; +#X connect 18 1 17 0; +#X connect 18 2 15 1; +#X connect 19 0 7 0; +#X connect 21 0 1 0; +#X connect 22 0 2 0; +#X restore 392 510 pd graphical-centroid; +#X text 321 510 Also see:; +#N canvas 520 35 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 135 AUTHOR Frank Barknecht; +#X text 12 155 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 75 INLET_0 list; +#X text 12 95 OUTLET_0 float; +#X text 12 115 OUTLET_1 bang; +#X text 12 45 DESCRIPTION calculate the centroid or center of mass +of a list of floats; +#X restore 544 540 pd META; +#X connect 1 0 6 0; +#X connect 2 0 6 0; +#X connect 3 0 6 0; +#X connect 5 0 6 0; +#X connect 6 0 0 0; +#X connect 6 1 4 0; +#X connect 11 0 6 0; +#X connect 12 0 6 0; +#X connect 14 0 6 0; +#X connect 15 0 16 0; +#X connect 16 0 6 0; +#X connect 17 0 15 0; +#X connect 18 0 6 0; +#X connect 19 0 6 0; +#X connect 20 0 6 0; +#X connect 21 0 6 0; diff --git a/list-abs/list-centroid.pd b/list-abs/list-centroid.pd new file mode 100755 index 0000000..30521e5 --- /dev/null +++ b/list-abs/list-centroid.pd @@ -0,0 +1,76 @@ +#N canvas 204 70 675 629 10; +#X obj 127 475 f; +#X obj 127 65 inlet; +#X obj 127 561 outlet; +#X obj 163 170 list-enumerate; +#X obj 163 197 t a a; +#X obj 261 406 /; +#X obj 261 376 swap; +#X obj 210 345 select 0; +#N canvas 286 344 401 287 sum(mi*i) 0; +#X obj 126 138 +; +#X obj 153 139 f; +#X msg 168 88 0; +#X obj 126 66 inlet; +#X obj 168 66 inlet; +#X obj 126 171 outlet; +#X obj 126 103 *; +#X connect 0 0 1 0; +#X connect 0 0 5 0; +#X connect 1 0 0 1; +#X connect 2 0 0 1; +#X connect 3 0 6 0; +#X connect 4 0 2 0; +#X connect 6 0 0 0; +#X restore 284 255 pd sum(mi*i); +#N canvas 573 330 450 328 sum(mi) 0; +#X obj 179 137 +; +#X obj 206 138 f; +#X msg 296 77 0; +#X obj 179 55 inlet; +#X obj 296 55 inlet; +#X obj 179 170 outlet; +#X text 143 34 in: (idx value); +#X text 40 89 swap to: (val idx); +#X text 67 172 sum of values; +#X obj 179 89 swap; +#X connect 0 0 1 0; +#X connect 0 0 5 0; +#X connect 1 0 0 1; +#X connect 2 0 0 1; +#X connect 3 0 9 0; +#X connect 4 0 2 0; +#X connect 9 0 0 0; +#X restore 163 253 pd sum(mi); +#X obj 210 559 outlet; +#X obj 127 399 spigot 1; +#X obj 145 285 f; +#X obj 240 528 print list-centroid; +#X obj 210 468 t b b; +#X msg 240 503 warning: sum of items equals 0: centroid is undefined! +; +#X obj 127 89 t b b a b b; +#X text 69 26 centroid (center of mass) = sum(mi * i) / sum(mi); +#X connect 0 0 2 0; +#X connect 1 0 16 0; +#X connect 3 0 4 0; +#X connect 4 0 9 0; +#X connect 4 1 8 0; +#X connect 5 0 0 1; +#X connect 6 0 5 0; +#X connect 6 1 5 1; +#X connect 7 0 14 0; +#X connect 7 1 6 0; +#X connect 8 0 6 1; +#X connect 9 0 12 1; +#X connect 11 0 0 0; +#X connect 12 0 7 0; +#X connect 12 0 11 1; +#X connect 14 0 10 0; +#X connect 14 1 15 0; +#X connect 15 0 13 0; +#X connect 16 0 11 0; +#X connect 16 1 12 0; +#X connect 16 2 3 0; +#X connect 16 3 9 1; +#X connect 16 4 8 1; diff --git a/list-abs/list-clip-help.pd b/list-abs/list-clip-help.pd new file mode 100755 index 0000000..80c962b --- /dev/null +++ b/list-abs/list-clip-help.pd @@ -0,0 +1,25 @@ +#N canvas 0 0 450 300 10; +#X obj 122 170 list-clip 2 8; +#X obj 122 204 print; +#X text 101 47 list-clip:; +#X obj 189 49 clip; +#X text 231 50 for lists; +#X msg 122 102 1 2 3 SYMBOL 4 5 6 7 8 9 10; +#X floatatom 165 144 5 0 0 0 - - -; +#X floatatom 208 145 5 0 0 0 - - -; +#N canvas 416 170 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 145 AUTHOR Frank Barknecht; +#X text 12 125 OUTLET_0 list; +#X text 12 165 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION clip for lists; +#X text 12 85 INLET_1 float; +#X text 12 105 INLET_2 float; +#X text 12 65 INLET_0 anything; +#X restore 387 267 pd META; +#X connect 0 0 1 0; +#X connect 5 0 0 0; +#X connect 6 0 0 1; +#X connect 7 0 0 2; diff --git a/list-abs/list-clip.pd b/list-abs/list-clip.pd new file mode 100755 index 0000000..afa43a0 --- /dev/null +++ b/list-abs/list-clip.pd @@ -0,0 +1,26 @@ +#N canvas 220 202 450 335 10; +#X obj 109 49 inlet; +#X obj 141 155 inlet; +#X obj 174 171 inlet; +#X obj 109 201 clip \$1 \$2; +#X obj 109 136 route float; +#X obj 109 100 list-drip; +#X obj 109 249 list prepend; +#X obj 200 249 t a; +#X obj 86 298 outlet; +#X obj 86 274 list; +#X obj 109 75 t a b; +#X connect 0 0 10 0; +#X connect 1 0 3 1; +#X connect 2 0 3 2; +#X connect 3 0 6 0; +#X connect 4 0 3 0; +#X connect 4 1 6 0; +#X connect 5 0 4 0; +#X connect 5 1 9 0; +#X connect 6 0 7 0; +#X connect 6 0 9 1; +#X connect 7 0 6 1; +#X connect 9 0 8 0; +#X connect 10 0 5 0; +#X connect 10 1 6 1; diff --git a/list-abs/list-compare-help.pd b/list-abs/list-compare-help.pd new file mode 100755 index 0000000..902f77e --- /dev/null +++ b/list-abs/list-compare-help.pd @@ -0,0 +1,42 @@ +#N canvas 0 26 529 463 10; +#X floatatom 149 244 5 0 0 0 - - -; +#X obj 213 244 loadbang; +#X msg 149 217 0; +#X msg 179 217 4; +#X msg 134 169 seven; +#X msg 134 196 symbol eight; +#X obj 134 316 list-compare; +#X obj 134 354 tgl 24 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 134 389 print EQUAL?; +#X text 69 21 [list-compare]; +#X text 108 42 Compare two lists element by element.; +#X floatatom 228 295 5 0 0 0 - - -; +#X text 134 90 Out: 1 if equal \, 0 if not equal.; +#X text 134 66 In: two lists to compare.; +#X msg 134 115 0 1 2 3 4 5 6 seven eight; +#X msg 134 142 0 1 2 3 4 5 6 seventy eight; +#X msg 213 271 0 1 2 3 4 5 6 seven eight; +#N canvas 416 170 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 105 OUTLET_0 float; +#X text 12 65 INLET_0 anything; +#X text 12 85 INLET_1 anything; +#X text 12 45 DESCRIPTION compare two lists element by element; +#X restore 456 427 pd META; +#X connect 0 0 6 0; +#X connect 1 0 16 0; +#X connect 2 0 0 0; +#X connect 3 0 0 0; +#X connect 4 0 6 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 11 0 6 1; +#X connect 14 0 6 0; +#X connect 15 0 6 0; +#X connect 16 0 6 1; diff --git a/list-abs/list-compare.pd b/list-abs/list-compare.pd new file mode 100755 index 0000000..8a78b0d --- /dev/null +++ b/list-abs/list-compare.pd @@ -0,0 +1,74 @@ +#N canvas 368 289 390 300 10; +#X obj 222 58 inlet; +#X obj 94 57 inlet; +#X obj 94 199 outlet; +#N canvas 380 394 492 461 compare-elements 0; +#X obj 83 135 list-dripslow; +#X obj 83 226 compare-any; +#X obj 83 157 t a b; +#X obj 264 48 inlet; +#X obj 65 36 inlet; +#X obj 241 111 list; +#X obj 83 112 until; +#X obj 83 256 select 0; +#X obj 83 288 t b b; +#X msg 83 317 0; +#X obj 65 379 outlet; +#X obj 65 356 f 1; +#X obj 65 59 t b b a b b; +#X msg 125 319 1; +#X obj 155 192 list-dripslow; +#X connect 0 0 2 0; +#X connect 0 1 6 1; +#X connect 1 0 7 0; +#X connect 2 0 1 0; +#X connect 2 1 14 0; +#X connect 3 0 5 1; +#X connect 4 0 12 0; +#X connect 5 0 14 1; +#X connect 6 0 0 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 8 1 6 1; +#X connect 9 0 11 1; +#X connect 11 0 10 0; +#X connect 12 0 11 0; +#X connect 12 1 6 0; +#X connect 12 2 0 1; +#X connect 12 3 5 0; +#X connect 12 4 13 0; +#X connect 13 0 11 1; +#X connect 14 0 1 1; +#X restore 94 136 pd compare-elements; +#X msg 216 167 0; +#N canvas 446 369 450 300 compare-lengths 0; +#X obj 45 102 ==; +#X obj 45 123 select 1 0; +#X obj 144 35 inlet; +#X obj 45 20 inlet; +#X obj 45 203 outlet; +#X obj 77 182 outlet; +#X obj 45 45 t a a; +#X obj 45 154 list; +#X text 39 237 if equal \, send list out to first outlet \, else bang +second outlet; +#X obj 144 68 list-len; +#X obj 45 67 list-len; +#X connect 0 0 1 0; +#X connect 1 0 7 0; +#X connect 1 1 5 0; +#X connect 2 0 9 0; +#X connect 3 0 6 0; +#X connect 6 0 10 0; +#X connect 6 1 7 1; +#X connect 7 0 4 0; +#X connect 9 0 0 1; +#X connect 10 0 0 0; +#X restore 94 93 pd compare-lengths; +#X connect 0 0 5 1; +#X connect 0 0 3 1; +#X connect 1 0 5 0; +#X connect 3 0 2 0; +#X connect 4 0 2 0; +#X connect 5 0 3 0; +#X connect 5 1 4 0; diff --git a/list-abs/list-delete-help.pd b/list-abs/list-delete-help.pd new file mode 100755 index 0000000..5d07163 --- /dev/null +++ b/list-abs/list-delete-help.pd @@ -0,0 +1,43 @@ +#N canvas 0 26 572 423 10; +#X obj 85 190 hradio 15 1 0 8 empty empty POS_(zero-based) 0 -6 0 8 +-262144 -1 -1 0; +#X floatatom 85 210 5 0 0 0 - - -; +#X msg 49 160 0 1 2 3 4; +#X obj 49 288 print; +#X text 36 55 Negative POS counts from the end of the list.; +#X text 35 26 list-delete: delete element at position POS from list. +; +#X floatatom 121 239 5 0 0 1 how_many - -; +#X msg 293 170 0 1 2 3 4; +#X obj 293 288 print; +#X text 322 211 arguments: ; +#X obj 49 258 list-delete; +#X text 38 79 Arguments; +#X text 51 102 1: Default POS to delete.; +#X text 51 123 2: How many items to delete (cannot be less than 1) +; +#X floatatom 343 239 5 0 0 0 - - -; +#X floatatom 393 240 5 0 0 0 - - -; +#X obj 293 259 list-delete 2 3; +#N canvas 520 35 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 145 AUTHOR Frank Barknecht; +#X text 12 165 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 65 INLET_0 list; +#X text 12 45 DESCRIPTION delete element at position POS from list +; +#X text 12 85 INLET_1 float; +#X text 12 105 INLET_2 float; +#X text 12 125 OUTLET_0 list; +#X restore 507 387 pd META; +#X connect 0 0 1 0; +#X connect 1 0 10 1; +#X connect 2 0 10 0; +#X connect 6 0 10 2; +#X connect 7 0 16 0; +#X connect 10 0 3 0; +#X connect 14 0 16 1; +#X connect 15 0 16 2; +#X connect 16 0 8 0; diff --git a/list-abs/list-delete.pd b/list-abs/list-delete.pd new file mode 100755 index 0000000..7243239 --- /dev/null +++ b/list-abs/list-delete.pd @@ -0,0 +1,28 @@ +#N canvas 18 49 525 309 10; +#X obj 151 149 list-splat \$1; +#X obj 237 50 inlet; +#X text 235 30 pos; +#X obj 151 51 inlet; +#X text 135 29 orig. list; +#X obj 194 217 list split 1; +#X obj 151 256 list; +#X obj 151 285 outlet; +#X obj 302 127 moses 1; +#X obj 302 50 inlet; +#X obj 327 78 loadbang; +#X text 299 30 how many items to delete; +#X obj 302 106 f \$2; +#X msg 302 149 1; +#X connect 0 0 6 0; +#X connect 0 1 5 0; +#X connect 0 2 7 0; +#X connect 1 0 0 1; +#X connect 3 0 0 0; +#X connect 5 1 6 1; +#X connect 6 0 7 0; +#X connect 8 0 13 0; +#X connect 8 1 5 1; +#X connect 9 0 12 0; +#X connect 10 0 12 0; +#X connect 12 0 8 0; +#X connect 13 0 5 1; diff --git a/list-abs/list-dotprod-help.pd b/list-abs/list-dotprod-help.pd new file mode 100755 index 0000000..9f98dc8 --- /dev/null +++ b/list-abs/list-dotprod-help.pd @@ -0,0 +1,33 @@ +#N canvas 0 26 483 343 10; +#X obj 59 150 list-dotprod; +#X msg 138 118 3 1; +#X text 40 32 list-dotprod; +#X text 60 53 dot-product of two lists: res = sum(Xi*Yi); +#X obj 290 188 list-mult; +#X obj 290 215 list-accum; +#X msg 348 160 3 1; +#X floatatom 59 179 5 0 0 0 - - -; +#X floatatom 290 240 5 0 0 0 - - -; +#X text 240 137 a bit faster \, but the same as; +#X msg 59 119 2 4; +#X msg 290 161 2 4; +#X text 57 209 2*3 + 4*1 = 10; +#N canvas 520 35 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 65 INLET_0 list; +#X text 12 85 INLET_1 list; +#X text 12 105 OUTLET_0 list; +#X text 12 45 DESCRIPTION dot-product of two lists : res = sum(Xi*Yi) +; +#X restore 421 312 pd META; +#X connect 0 0 7 0; +#X connect 1 0 0 1; +#X connect 4 0 5 0; +#X connect 5 0 8 0; +#X connect 6 0 4 1; +#X connect 10 0 0 0; +#X connect 11 0 4 0; diff --git a/list-abs/list-dotprod.pd b/list-abs/list-dotprod.pd new file mode 100755 index 0000000..3f4520f --- /dev/null +++ b/list-abs/list-dotprod.pd @@ -0,0 +1,40 @@ +#N canvas 0 0 750 558 10; +#X obj 59 31 inlet; +#X obj 280 39 inlet; +#X obj 59 469 outlet; +#X obj 78 138 list-drip; +#X obj 257 231 list; +#X obj 171 259 list-dripslow; +#X obj 78 258 route float; +#X obj 171 286 route float; +#X obj 137 87 s \$0-reset; +#X obj 108 359 r \$0-reset; +#X obj 59 58 t b a b b; +#X text 305 153 list-dotprod; +#X text 325 174 dot-product of two lists: res = sum(Xi*Yi); +#X obj 108 409 f 0; +#X obj 108 384 0; +#X obj 59 436 f; +#X obj 78 408 +; +#X obj 78 322 *; +#X obj 78 162 t a b; +#X connect 0 0 10 0; +#X connect 1 0 4 1; +#X connect 3 0 18 0; +#X connect 4 0 5 1; +#X connect 5 0 7 0; +#X connect 6 0 17 0; +#X connect 7 0 17 1; +#X connect 9 0 14 0; +#X connect 10 0 15 0; +#X connect 10 1 3 0; +#X connect 10 2 4 0; +#X connect 10 3 8 0; +#X connect 13 0 16 1; +#X connect 14 0 13 0; +#X connect 15 0 2 0; +#X connect 16 0 13 0; +#X connect 16 0 15 1; +#X connect 17 0 16 0; +#X connect 18 0 6 0; +#X connect 18 1 5 0; diff --git a/list-abs/list-drip-help.pd b/list-abs/list-drip-help.pd new file mode 100755 index 0000000..4f8bf23 --- /dev/null +++ b/list-abs/list-drip-help.pd @@ -0,0 +1,208 @@ +#N canvas 0 26 635 655 10; +#X obj 70 93 list-drip; +#X msg 70 66 1 2 3 a b c; +#X obj 70 124 print; +#X obj 151 120 bng 15 250 50 0 empty empty end 0 -6 0 8 -262144 -1 +-1; +#X msg 297 70 1 2 3 a b c; +#X obj 382 129 bng 15 250 50 0 empty empty end 0 -6 0 8 -262144 -1 +-1; +#X obj 297 178 print first; +#X obj 329 154 print second; +#X obj 212 390 bng 15 250 50 0 empty empty end 0 -6 0 8 -262144 -1 +-1; +#X text 71 217 Use list-drip2 to combine two lists into one \, for +example by addition:; +#X obj 219 550 list; +#X obj 123 549 list prepend; +#X obj 42 584 list; +#X obj 42 612 print RESULT; +#X obj 123 289 t b b; +#X msg 123 269 bang; +#X obj 123 346 t l b; +#X text 190 302 Add these lists by element. Be careful with their lengths +; +#X text 70 18 list-drip: drips or serializes a list \, that is \, it +sends all elements one after another.; +#X text 434 105 Drip two lists in sync.; +#X text 285 429 filter out floats; +#X obj 42 552 r \$0-end; +#X obj 212 409 s \$0-end; +#X text 200 508 reset first; +#X obj 123 478 +; +#N canvas 315 75 709 522 add-lots-of-lists 0; +#X obj 273 211 bng 15 250 50 0 empty empty end 0 -6 0 8 -262144 -1 +-1; +#X obj 184 167 t l b; +#X text 138 51 Add many lists by routing the result back to the second +inlet of list-drip2; +#X obj 154 142 t b a; +#X obj 103 433 print CURRENT-RESULT; +#X msg 68 145 bang; +#X text 65 125 Reset; +#X msg 232 103 0.1 0.2 0.3 0.4; +#X msg 354 103 0.01 0.02 0.03 0.04; +#X obj 184 370 list prepend; +#X obj 280 371 list; +#X obj 103 405 list; +#X obj 184 299 +; +#X msg 154 105 1 3 4 7; +#X msg 84 219 0; +#X obj 88 176 t b b b; +#N canvas 347 135 671 625 weighted 0; +#X obj 435 225 list split 1; +#X text 59 90 weighted sum of lists; +#X obj 435 294 list-math *; +#X obj 435 270 list; +#X obj 435 248 t b f; +#X msg 361 184 \$1 0 0 1; +#X msg 435 184 \$1 0 1 0; +#X obj 380 83 hsl 64 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 0 1; +#X obj 454 83 hsl 64 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 0 1; +#X obj 530 83 hsl 64 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 0 1; +#X obj 353 486 list; +#X obj 361 149 f; +#X obj 435 151 f; +#X obj 511 153 f; +#N canvas 0 0 516 490 list-accum 0; +#X obj 319 215 bng 15 250 50 0 empty empty end 0 -6 0 8 -262144 -1 +-1; +#X obj 230 171 t l b; +#X obj 200 146 t b a; +#X msg 399 128 bang; +#X text 396 108 Reset; +#X obj 230 374 list prepend; +#X obj 326 375 list; +#X obj 149 409 list; +#X obj 230 303 +; +#X msg 375 214 0; +#X obj 379 171 t b b b; +#X obj 149 437 outlet; +#X obj 199 104 inlet; +#X obj 343 106 inlet; +#X obj 230 213 list-drip2; +#X connect 1 0 14 0; +#X connect 1 1 5 1; +#X connect 2 0 7 0; +#X connect 2 1 1 0; +#X connect 3 0 10 0; +#X connect 5 0 6 0; +#X connect 5 0 7 1; +#X connect 6 0 5 1; +#X connect 7 0 11 0; +#X connect 7 0 14 1; +#X connect 8 0 5 0; +#X connect 9 0 8 1; +#X connect 10 0 9 0; +#X connect 10 1 14 0; +#X connect 10 2 14 1; +#X connect 12 0 2 0; +#X connect 13 0 10 0; +#X connect 14 0 8 0; +#X connect 14 1 8 1; +#X connect 14 2 0 0; +#X restore 376 444 pd list-accum; +#X obj 354 509 print W_SUM; +#X msg 266 81 bang; +#X obj 269 104 t b b b; +#X msg 511 183 \$1 1 1 0; +#X obj 376 38 hsl 64 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 0 1; +#X obj 375 59 t b f; +#X connect 0 0 4 0; +#X connect 0 1 3 1; +#X connect 2 0 14 0; +#X connect 3 0 2 0; +#X connect 4 0 3 0; +#X connect 4 1 2 1; +#X connect 5 0 0 0; +#X connect 6 0 0 0; +#X connect 7 0 11 1; +#X connect 8 0 12 1; +#X connect 9 0 13 1; +#X connect 10 0 15 0; +#X connect 11 0 5 0; +#X connect 12 0 6 0; +#X connect 13 0 18 0; +#X connect 14 0 10 1; +#X connect 16 0 17 0; +#X connect 17 0 10 0; +#X connect 17 1 11 0; +#X connect 17 1 12 0; +#X connect 17 1 13 0; +#X connect 17 2 14 1; +#X connect 18 0 0 0; +#X connect 19 0 20 0; +#X connect 20 0 17 0; +#X connect 20 1 11 1; +#X restore 434 245 pd weighted; +#X obj 184 209 list-drip2; +#X text 419 223 Add lists weighted:; +#X connect 1 0 17 0; +#X connect 1 1 9 1; +#X connect 3 0 11 0; +#X connect 3 1 1 0; +#X connect 5 0 15 0; +#X connect 7 0 3 0; +#X connect 8 0 3 0; +#X connect 9 0 10 0; +#X connect 9 0 11 1; +#X connect 10 0 9 1; +#X connect 11 0 4 0; +#X connect 11 0 17 1; +#X connect 12 0 9 0; +#X connect 13 0 3 0; +#X connect 14 0 12 1; +#X connect 15 0 14 0; +#X connect 15 1 17 0; +#X connect 15 2 17 1; +#X connect 17 0 12 0; +#X connect 17 1 12 1; +#X connect 17 2 0 0; +#X restore 415 583 pd add-lots-of-lists; +#X text 418 557 Another example:; +#X obj 297 97 list-drip2; +#X obj 123 388 list-drip2; +#X msg 124 326 1 2 3 4; +#X msg 196 326 5 6 7 8; +#X msg 396 70 4 5 6 d e f ignored; +#N canvas 431 110 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 155 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION drip or serialize a list \, that is \, send +all elements one after another.; +#X text 12 75 INLET_0 anything; +#X text 12 95 OUTLET_0 symbol float pointer; +#X text 12 115 OUTLET_1 bang; +#X text 12 135 AUTHOR Frank Barknecht \, Mathieu Bouchard; +#X restore 567 624 pd META; +#X connect 0 0 2 0; +#X connect 0 1 3 0; +#X connect 1 0 0 0; +#X connect 4 0 27 0; +#X connect 8 0 22 0; +#X connect 10 0 11 1; +#X connect 11 0 10 0; +#X connect 11 0 12 1; +#X connect 12 0 13 0; +#X connect 14 0 29 0; +#X connect 14 1 30 0; +#X connect 15 0 14 0; +#X connect 16 0 28 0; +#X connect 16 1 11 1; +#X connect 21 0 12 0; +#X connect 24 0 11 0; +#X connect 27 0 6 0; +#X connect 27 1 7 0; +#X connect 27 2 5 0; +#X connect 28 0 24 0; +#X connect 28 1 24 1; +#X connect 28 2 8 0; +#X connect 29 0 16 0; +#X connect 30 0 28 1; +#X connect 31 0 27 1; diff --git a/list-abs/list-drip.pd b/list-abs/list-drip.pd new file mode 100755 index 0000000..4f39a57 --- /dev/null +++ b/list-abs/list-drip.pd @@ -0,0 +1,47 @@ +#N canvas 218 94 842 634 10; +#X obj 63 84 t a a; +#X obj 63 241 spigot; +#X obj 102 149 bang; +#X obj 102 168 1; +#X obj 223 149 route bang; +#X obj 183 150 bang; +#X obj 183 169 0; +#X obj 102 114 list split 2; +#X obj 232 379 list split; +#X obj 299 328 list length; +#X obj 299 350 >> 1; +#X obj 63 260 t a a a a; +#X obj 63 446 list split; +#X obj 130 398 list length; +#X obj 130 423 >> 1; +#X obj 31 19 inlet; +#X obj 290 175 outlet; +#X text 73 19 Copyright 2009 by Mathieu Bouchard; +#X obj 31 53 t b a; +#X obj 465 119 outlet; +#X text 520 121 signal end of list; +#X text 381 23 made compatible with [list-drip]: fbar 2009; +#X connect 0 0 1 0; +#X connect 0 1 7 0; +#X connect 1 0 11 0; +#X connect 2 0 3 0; +#X connect 3 0 1 1; +#X connect 4 1 16 0; +#X connect 5 0 6 0; +#X connect 6 0 1 1; +#X connect 7 0 2 0; +#X connect 7 2 4 0; +#X connect 7 2 5 0; +#X connect 8 0 0 0; +#X connect 9 0 10 0; +#X connect 10 0 8 1; +#X connect 11 0 12 0; +#X connect 11 1 13 0; +#X connect 11 2 8 0; +#X connect 11 3 9 0; +#X connect 12 1 0 0; +#X connect 13 0 14 0; +#X connect 14 0 12 1; +#X connect 15 0 18 0; +#X connect 18 0 19 0; +#X connect 18 1 0 0; diff --git a/list-abs/list-drip2-help.pd b/list-abs/list-drip2-help.pd new file mode 100755 index 0000000..b0915c4 --- /dev/null +++ b/list-abs/list-drip2-help.pd @@ -0,0 +1,37 @@ +#N canvas 0 26 588 432 10; +#X obj 146 235 list-drip2; +#X text 72 58 Drips two lists in sync \, as long as the first list +lasts.; +#X text 42 25 list-drip2; +#X msg 213 208 a b c d; +#X obj 213 258 bng 15 250 50 0 empty empty End_of_1st_list 17 7 1 10 +-262144 -1 -1; +#X obj 179 306 print 2nd; +#X obj 146 334 print 1st; +#X msg 146 122 1 2 3 4; +#X msg 146 100 1 2 3; +#X msg 146 145 1 2 3 4 5; +#X obj 146 199 t a b; +#N canvas 436 26 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 175 AUTHOR Frank Barknecht; +#X text 12 195 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION drip two lists in sync \, as long as the +first list lasts; +#X text 12 95 INLET_1 anything; +#X text 12 75 INLET_0 anything; +#X text 12 135 OUTLET_1 float symbol; +#X text 12 115 OUTLET_0 float symbol; +#X text 12 155 OUTLET_2 bang; +#X restore 517 397 pd META; +#X connect 0 0 6 0; +#X connect 0 1 5 0; +#X connect 0 2 4 0; +#X connect 3 0 0 1; +#X connect 7 0 10 0; +#X connect 8 0 10 0; +#X connect 9 0 10 0; +#X connect 10 0 0 0; +#X connect 10 1 3 0; diff --git a/list-abs/list-drip2.pd b/list-abs/list-drip2.pd new file mode 100755 index 0000000..55ae94f --- /dev/null +++ b/list-abs/list-drip2.pd @@ -0,0 +1,19 @@ +#N canvas 161 215 536 406 10; +#X text 81 50 Drips two lists in sync \, as long as the first list +lasts.; +#X obj 96 273 outlet; +#X obj 96 87 inlet; +#X obj 189 270 outlet; +#X obj 257 272 outlet; +#X obj 353 125 inlet; +#X text 304 270 End; +#X obj 96 163 list-drip; +#X obj 96 186 t a b; +#X obj 189 222 list-dripslow; +#X connect 2 0 7 0; +#X connect 5 0 9 1; +#X connect 7 0 8 0; +#X connect 7 1 4 0; +#X connect 8 0 1 0; +#X connect 8 1 9 0; +#X connect 9 0 3 0; diff --git a/list-abs/list-dripslow-help.pd b/list-abs/list-dripslow-help.pd new file mode 100755 index 0000000..2b31feb --- /dev/null +++ b/list-abs/list-dripslow-help.pd @@ -0,0 +1,70 @@ +#N canvas 0 26 488 309 10; +#X msg 208 152 1 2 3 4; +#X obj 122 229 print element; +#X obj 208 202 print EOL; +#X msg 122 146 bang; +#X text 60 30 list-dripslow: Serialize a list on demand.; +#X text 56 69 First set list through right inlet \, then on each bang +into left inlet \, one element will be output through left outlet. +Right outlet bangs at list's end.; +#N canvas 401 196 593 450 drip-many-example 0; +#X obj 122 171 list-drip; +#X obj 122 194 t a b; +#X obj 122 323 print L1; +#X obj 207 324 print L2; +#X obj 297 326 print L3; +#X obj 207 249 t a b; +#X obj 122 121 t b b b; +#X text 160 39 Drip many lists in sync; +#X msg 122 92 bang; +#X msg 383 187 A B C; +#X msg 293 187 1 2 3; +#X msg 122 149 x y z; +#X obj 207 225 list-dripslow; +#X obj 297 283 list-dripslow; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 12 0; +#X connect 5 0 3 0; +#X connect 5 1 13 0; +#X connect 6 0 11 0; +#X connect 6 1 10 0; +#X connect 6 2 9 0; +#X connect 8 0 6 0; +#X connect 9 0 13 1; +#X connect 10 0 12 1; +#X connect 11 0 0 0; +#X connect 12 0 5 0; +#X connect 13 0 4 0; +#X restore 332 185 pd drip-many-example; +#N canvas 606 157 450 300 drip-emulation 0; +#X obj 140 194 list-dripslow; +#X obj 140 117 t b l; +#X obj 140 167 until; +#X obj 140 224 print; +#X msg 140 82 1 2 3 4 5 6 7 achtung; +#X text 135 49 drip fast with dripslow; +#X connect 0 0 3 0; +#X connect 0 1 2 1; +#X connect 1 0 2 0; +#X connect 1 1 0 1; +#X connect 2 0 0 0; +#X connect 4 0 1 0; +#X restore 332 219 pd drip-emulation; +#X obj 122 180 list-dripslow; +#N canvas 416 170 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 145 AUTHOR Frank Barknecht; +#X text 12 165 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION serialize a list on demand; +#X text 12 65 INLET_0 bang; +#X text 12 85 INLET_1 anything; +#X text 12 105 INLET_2 float symbol pointer; +#X text 12 125 OUTLET_0 bang; +#X restore 437 287 pd META; +#X connect 0 0 8 1; +#X connect 3 0 8 0; +#X connect 8 0 1 0; +#X connect 8 1 2 0; diff --git a/list-abs/list-dripslow.pd b/list-abs/list-dripslow.pd new file mode 100755 index 0000000..ca9dae9 --- /dev/null +++ b/list-abs/list-dripslow.pd @@ -0,0 +1,21 @@ +#N canvas 592 504 407 292 10; +#X obj 148 186 list split 1; +#X obj 148 161 list append; +#X obj 148 237 outlet; +#X obj 148 37 inlet; +#X obj 229 237 outlet; +#X obj 222 35 inlet; +#X obj 148 72 b; +#X text 265 36 list; +#X text 103 37 bang; +#X text 273 237 EOL; +#X text 89 236 element; +#X obj 229 207 b; +#X connect 0 0 2 0; +#X connect 0 1 1 1; +#X connect 0 2 11 0; +#X connect 1 0 0 0; +#X connect 3 0 6 0; +#X connect 5 0 1 1; +#X connect 6 0 1 0; +#X connect 11 0 4 0; diff --git a/list-abs/list-emath-help.pd b/list-abs/list-emath-help.pd new file mode 100755 index 0000000..3105136 --- /dev/null +++ b/list-abs/list-emath-help.pd @@ -0,0 +1,49 @@ +#N canvas 0 26 538 413 10; +#X obj 87 209 print add; +#X msg 87 138 5 5 5 5 x; +#X text 79 22 list-emath: Do math on lists element by element; +#X msg 350 141 0 1 2 3 4; +#X msg 271 140 5 5 5 5 x; +#X msg 88 256 5 5 5 5 x; +#X msg 269 262 5 5 5 5 x; +#X obj 271 211 print mult; +#X obj 88 327 print sub; +#X obj 269 333 print div; +#X obj 269 294 list-emath /; +#X obj 87 171 list-emath +; +#X obj 271 173 list-emath *; +#X obj 88 289 list-emath -; +#X msg 348 263 0 1 x 3 4; +#X msg 167 257 0 1 2 x 4; +#X msg 166 139 0 1 2 x 4; +#X text 80 55 Non-floats in second list will be replaced by 0 for + +and - \, and by 1 for * and /.; +#X msg 430 262 0 0 0 0 0; +#X text 428 243 Just say no!; +#X text 80 91 Symbols in first list will pass unchanged.; +#X text 83 376 Also see list-add \, list-mult \, list-sub for shortcuts. +; +#N canvas 416 170 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION do math on lists element by element; +#X text 12 65 INLET_0 list; +#X text 12 85 INLET_1 list; +#X text 12 105 OUTLET_0 list; +#X restore 483 386 pd META; +#X connect 1 0 11 0; +#X connect 3 0 12 1; +#X connect 4 0 12 0; +#X connect 5 0 13 0; +#X connect 6 0 10 0; +#X connect 10 0 9 0; +#X connect 11 0 0 0; +#X connect 12 0 7 0; +#X connect 13 0 8 0; +#X connect 14 0 10 1; +#X connect 15 0 13 1; +#X connect 16 0 11 1; +#X connect 18 0 10 1; diff --git a/list-abs/list-emath.pd b/list-abs/list-emath.pd new file mode 100755 index 0000000..27bebac --- /dev/null +++ b/list-abs/list-emath.pd @@ -0,0 +1,53 @@ +#N canvas 256 135 500 518 10; +#X obj 59 31 inlet; +#X obj 287 28 inlet; +#X obj 59 437 outlet; +#X obj 78 138 list-drip; +#X obj 264 131 list; +#X obj 178 234 list-dripslow; +#X obj 78 287 route float; +#X obj 178 261 route float; +#X obj 78 162 t a b b; +#X obj 78 379 list prepend; +#X obj 176 379 t a; +#X obj 59 404 list; +#X obj 136 57 s \$0-reset; +#X obj 157 343 r \$0-reset; +#X obj 59 58 t b a b b; +#X obj 341 49 loadbang; +#X obj 341 99 select + - * /; +#X msg 341 129 0; +#X msg 387 128 1; +#X obj 341 76 symbol \$1; +#X obj 325 232 f; +#X obj 78 322 \$1; +#X connect 0 0 14 0; +#X connect 1 0 4 1; +#X connect 3 0 8 0; +#X connect 4 0 5 1; +#X connect 5 0 7 0; +#X connect 6 0 21 0; +#X connect 6 1 9 0; +#X connect 7 0 21 1; +#X connect 8 0 6 0; +#X connect 8 1 5 0; +#X connect 8 2 20 0; +#X connect 9 0 10 0; +#X connect 9 0 11 1; +#X connect 10 0 9 1; +#X connect 11 0 2 0; +#X connect 13 0 9 1; +#X connect 14 0 11 0; +#X connect 14 1 3 0; +#X connect 14 2 4 0; +#X connect 14 3 12 0; +#X connect 15 0 19 0; +#X connect 16 0 17 0; +#X connect 16 1 17 0; +#X connect 16 2 18 0; +#X connect 16 3 18 0; +#X connect 17 0 20 1; +#X connect 18 0 20 1; +#X connect 19 0 16 0; +#X connect 20 0 21 1; +#X connect 21 0 9 0; diff --git a/list-abs/list-enumerate-help.pd b/list-abs/list-enumerate-help.pd new file mode 100755 index 0000000..f6622a2 --- /dev/null +++ b/list-abs/list-enumerate-help.pd @@ -0,0 +1,33 @@ +#N canvas 0 26 540 454 10; +#X obj 152 196 list-enumerate; +#X obj 152 274 list trim; +#X obj 152 254 list prepend add; +#X text 41 39 [list-enumerate]; +#X text 57 73 serialize a list and put numbers in front of every element +; +#X msg 225 275 set; +#X obj 152 158 t a b; +#X msg 152 137 a b c d 0 1 2 3; +#X obj 243 216 bng 15 250 50 0 empty empty EOL 17 7 1 10 -262144 -1 +-1; +#N canvas 416 170 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 135 AUTHOR Frank Barknecht; +#X text 12 95 OUTLET_0 list; +#X text 12 155 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION serialize a list and put numbers in front +of every element; +#X text 12 75 INLET_0 anything; +#X text 12 115 OUTLET_1 bang; +#X restore 477 417 pd META; +#X msg 152 303; +#X connect 0 0 2 0; +#X connect 0 1 8 0; +#X connect 1 0 10 0; +#X connect 2 0 1 0; +#X connect 5 0 10 0; +#X connect 6 0 0 0; +#X connect 6 1 5 0; +#X connect 7 0 6 0; diff --git a/list-abs/list-enumerate.pd b/list-abs/list-enumerate.pd new file mode 100755 index 0000000..e9c3c60 --- /dev/null +++ b/list-abs/list-enumerate.pd @@ -0,0 +1,35 @@ +#N canvas 596 471 450 300 10; +#X obj 152 100 list-drip; +#X obj 152 78 t a b; +#N canvas 473 338 450 300 count 0; +#X obj 131 154 f 0; +#X obj 156 153 + 1; +#X msg 147 133 0; +#X obj 131 183 outlet; +#X obj 131 59 inlet; +#X obj 131 96 b; +#X obj 178 61 inlet; +#X obj 178 98 b; +#X connect 0 0 1 0; +#X connect 0 0 3 0; +#X connect 1 0 0 1; +#X connect 2 0 0 1; +#X connect 4 0 5 0; +#X connect 5 0 0 0; +#X connect 6 0 7 0; +#X connect 7 0 2 0; +#X restore 231 170 pd count; +#X obj 152 128 t a b; +#X obj 152 48 inlet; +#X obj 152 196 list prepend; +#X obj 152 224 outlet; +#X obj 210 224 outlet; +#X connect 0 0 3 0; +#X connect 0 1 7 0; +#X connect 1 0 0 0; +#X connect 1 1 2 1; +#X connect 2 0 5 1; +#X connect 3 0 5 0; +#X connect 3 1 2 0; +#X connect 4 0 1 0; +#X connect 5 0 6 0; diff --git a/list-abs/list-equalize-help.pd b/list-abs/list-equalize-help.pd new file mode 100755 index 0000000..b68567b --- /dev/null +++ b/list-abs/list-equalize-help.pd @@ -0,0 +1,59 @@ +#N canvas 0 26 562 531 10; +#X obj 93 283 list-equalize; +#X obj 93 71 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 93 248 pack 0 0 0; +#X obj 115 209 t b f; +#X obj 161 212 t b f; +#X obj 93 310 unpack 0 0 0; +#X obj 128 71 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 161 71 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X floatatom 93 341 5 0 0 0 - - -; +#X floatatom 132 341 5 0 0 0 - - -; +#X floatatom 172 341 5 0 0 0 - - -; +#X obj 93 367 vsl 15 128 0 1 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 132 367 vsl 15 128 0 1 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 172 367 vsl 15 128 0 1 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X text 207 34 list-equalize:; +#X text 227 53 scale a list so that all float elements sum up to 1 +; +#X text 227 77 L_result = L_input / sum(L_input); +#X obj 306 253 list-equalize; +#X obj 306 280 print; +#X text 258 177 Also handles non-float elements gracefully.; +#X msg 306 226 90 plus 10 is 100; +#X text 40 138 0-127; +#X text 42 427 0-1; +#N canvas 416 170 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 115 AUTHOR Frank Barknecht; +#X text 12 95 OUTLET_0 list; +#X text 12 135 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION scale a list so that all float elements sum +up to 1; +#X text 12 5 KEYWORDS control list_op; +#X text 12 75 INLET_0 anything; +#X restore 500 502 pd META; +#X connect 0 0 5 0; +#X connect 1 0 2 0; +#X connect 2 0 0 0; +#X connect 3 0 2 0; +#X connect 3 1 2 1; +#X connect 4 0 2 0; +#X connect 4 1 2 2; +#X connect 5 0 8 0; +#X connect 5 1 9 0; +#X connect 5 2 10 0; +#X connect 6 0 3 0; +#X connect 7 0 4 0; +#X connect 8 0 11 0; +#X connect 9 0 12 0; +#X connect 10 0 13 0; +#X connect 17 0 18 0; +#X connect 20 0 17 0; diff --git a/list-abs/list-equalize.pd b/list-abs/list-equalize.pd new file mode 100755 index 0000000..2ba29a0 --- /dev/null +++ b/list-abs/list-equalize.pd @@ -0,0 +1,11 @@ +#N canvas 0 0 450 300 10; +#X obj 139 43 inlet; +#X obj 139 65 t a a; +#X obj 139 166 list-math /; +#X obj 211 93 list-accum; +#X obj 139 227 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 3 0; +#X connect 2 0 4 0; +#X connect 3 0 2 1; diff --git a/list-abs/list-extend-help.pd b/list-abs/list-extend-help.pd new file mode 100755 index 0000000..d91ca22 --- /dev/null +++ b/list-abs/list-extend-help.pd @@ -0,0 +1,36 @@ +#N canvas 0 26 481 399 10; +#X msg 102 183 1 2 3; +#X msg 156 290 bang; +#X msg 101 215 bang; +#X msg 102 161 a b c; +#X msg 102 139 x y z; +#X msg 154 259 A B C; +#X obj 68 323 list-extend; +#X obj 68 363 print LIST-EXTEND; +#X text 44 27 list-extend; +#X text 60 52 Build a list from incoming lists or elements.; +#X floatatom 101 119 5 0 0 0 - - -; +#X text 97 97 Add elements or lists and output stored list.; +#X text 146 219 output stored list; +#X text 201 261 set complete stored list; +#X text 201 292 set stored list to empty list (==reset); +#N canvas 491 26 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 105 OUTLET_0 list; +#X text 12 45 DESCRIPTION build a list from incoming lists or elements +; +#X text 12 65 INLET_0 anything; +#X text 12 85 INLET_1 anything; +#X restore 426 372 pd META; +#X connect 0 0 6 0; +#X connect 1 0 6 1; +#X connect 2 0 6 0; +#X connect 3 0 6 0; +#X connect 4 0 6 0; +#X connect 5 0 6 1; +#X connect 6 0 7 0; +#X connect 10 0 6 0; diff --git a/list-abs/list-extend.pd b/list-abs/list-extend.pd new file mode 100755 index 0000000..afa47df --- /dev/null +++ b/list-abs/list-extend.pd @@ -0,0 +1,13 @@ +#N canvas 354 269 450 300 10; +#X obj 77 41 inlet; +#X obj 156 66 inlet; +#X obj 77 257 outlet; +#X text 72 21 add new elements to stored list and output it; +#X text 156 47 set stored list \, no output; +#X obj 77 153 list prepend; +#X obj 172 153 t a; +#X connect 0 0 5 0; +#X connect 1 0 5 1; +#X connect 5 0 6 0; +#X connect 5 0 2 0; +#X connect 6 0 5 1; diff --git a/list-abs/list-fifo-delim-help.pd b/list-abs/list-fifo-delim-help.pd new file mode 100755 index 0000000..768bca3 --- /dev/null +++ b/list-abs/list-fifo-delim-help.pd @@ -0,0 +1,55 @@ +#N canvas 0 26 697 652 10; +#X obj 193 561 print; +#X obj 193 357 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X msg 300 383 1 2 3 4 5; +#X symbolatom 313 404 10 0 0 0 - - -; +#X floatatom 326 421 5 0 0 0 - - -; +#X symbolatom 420 450 10 0 0 0 - - -; +#X msg 110 438 clear; +#X obj 293 535 bng 15 250 50 0 empty empty EOL 17 7 1 10 -262144 -1 +-1; +#X text 118 201 CAUTION:; +#X text 119 219 When a message contains the delimiter symbol \, it +is falsely split into two parts.; +#X text 119 254 Default delimiter between messages is the empty symbol. +You can customize this with the first argument:; +#X text 62 423 clear stored list; +#X text 164 340 trigger output; +#X text 289 341 store lists or elements; +#X text 417 433 manually change delimiter symbol; +#X text 105 606 Based on a patch and idea by Roman Haefli 2006; +#X msg 291 363 eins due trois four; +#X text 82 55 [list-fifo-delim]; +#X text 120 81 [list-fifo-delim] stores incoming (list-)messages and +outputs them one by one on incoming bangs in the order they arrive +like a FIFO: first in \, first out.; +#X text 118 136 [list-fifo-delim] can be used to limit the number of +messages passing during a certain time (might be usefull to limit the +used network bandwidth). It also can be used as a sequencer.; +#X obj 122 297 list-fifo-delim MY_DELIMITER; +#X obj 193 502 list-fifo-delim; +#X text 58 16 This object is obsolete! Use [list-fifo] instead!; +#N canvas 491 26 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 195 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 135 OUTLET_0 list; +#X text 12 45 DESCRIPTION This object is obsolete! Use [list-fifo] +instead!; +#X text 12 5 KEYWORDS control list_op deprecated; +#X text 12 75 INLET_0 bang clear; +#X text 12 115 INLET_2 symbol; +#X text 12 95 INLET_1 anything; +#X text 12 155 OUTLET_1 bang; +#X text 12 174 AUTHOR Frank Barknecht \, Roman Haefli; +#X restore 578 600 pd META; +#X connect 1 0 21 0; +#X connect 2 0 21 1; +#X connect 3 0 21 1; +#X connect 4 0 21 1; +#X connect 5 0 21 2; +#X connect 6 0 21 0; +#X connect 16 0 21 1; +#X connect 21 0 0 0; +#X connect 21 1 7 0; diff --git a/list-abs/list-fifo-delim.pd b/list-abs/list-fifo-delim.pd new file mode 100755 index 0000000..3edff37 --- /dev/null +++ b/list-abs/list-fifo-delim.pd @@ -0,0 +1,56 @@ +#N canvas 252 152 752 488 10; +#X obj 22 272 list split 1; +#X obj 22 224 until; +#X obj 259 67 list append [delim]; +#X obj 22 395 list; +#X obj 22 321 t b b; +#X obj 22 26 inlet trigger; +#X obj 259 25 inlet list; +#X obj 423 26 inlet delimiter; +#X obj 22 419 outlet; +#X obj 101 420 outlet; +#X obj 52 198 b; +#X obj 423 78 symbol \$1; +#X obj 441 48 loadbang; +#X obj 423 124 route symbol; +#X obj 22 75 route bang clear; +#X obj 22 250 list; +#X obj 259 155 list-extend; +#X obj 115 365 list-extend; +#X obj 301 131 t b b; +#X obj 157 338 t b b; +#X obj 22 296 select [delim]; +#X text 108 439 EOL; +#X text 20 440 list; +#X text 334 310 Based on a patch and idea by Roman Haefli 2006; +#X connect 0 0 20 0; +#X connect 0 1 15 1; +#X connect 0 1 16 1; +#X connect 0 2 9 0; +#X connect 0 2 10 0; +#X connect 1 0 15 0; +#X connect 2 0 16 0; +#X connect 3 0 8 0; +#X connect 4 0 3 0; +#X connect 4 1 1 1; +#X connect 4 1 17 1; +#X connect 5 0 14 0; +#X connect 6 0 2 0; +#X connect 7 0 11 0; +#X connect 10 0 1 1; +#X connect 11 0 13 0; +#X connect 12 0 11 0; +#X connect 13 0 2 1; +#X connect 13 0 20 1; +#X connect 14 0 1 0; +#X connect 14 1 18 0; +#X connect 14 1 19 0; +#X connect 15 0 0 0; +#X connect 16 0 15 1; +#X connect 17 0 3 1; +#X connect 18 0 16 0; +#X connect 18 1 16 1; +#X connect 19 0 17 0; +#X connect 19 1 17 1; +#X connect 20 0 4 0; +#X connect 20 1 17 0; diff --git a/list-abs/list-fifo-help.pd b/list-abs/list-fifo-help.pd new file mode 100755 index 0000000..726b2ab --- /dev/null +++ b/list-abs/list-fifo-help.pd @@ -0,0 +1,53 @@ +#N canvas 0 26 587 530 10; +#X msg 247 186 1 2 3 4 5; +#X symbolatom 260 207 10 0 0 0 - - -; +#X floatatom 273 224 5 0 0 0 - - -; +#X obj 198 339 bng 15 250 50 0 empty empty EOL 17 7 1 10 -262144 -1 +-1; +#X text 59 38 [list-fifo]; +#X text 97 64 [list-fifo] stores incoming (list-)messages and outputs +them one by one on incoming bangs in the order they arrive like a FIFO: +first in \, first out.; +#X msg 295 274 bang; +#X obj 140 305 list-fifo; +#X text 82 439 2007 Frank Barknecht; +#X msg 238 166 a b c; +#X msg 140 149 bang; +#X text 230 147 store lists or elements ("push"); +#X text 111 125 trigger output ("pop"); +#X text 277 255 clear stored list ("reset"); +#N canvas 0 0 450 300 show 0; +#X obj 60 48 inlet; +#X obj 60 72 list prepend set; +#X obj 60 97 list trim; +#X obj 60 126 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X restore 140 364 pd show; +#X msg 74 262 clear; +#X msg 140 390 1 2 3 4 5; +#N canvas 491 26 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 175 AUTHOR Frank Barknecht; +#X text 12 195 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 135 OUTLET_0 list; +#X text 12 95 INLET_1 anything; +#X text 12 155 OUTLET_1 bang; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION store incoming (list-)messages and output +them one by one on incoming bangs in the order they arrive; +#X text 12 75 INLET_0 bang; +#X text 12 115 INLET_2 bang; +#X restore 528 500 pd META; +#X connect 0 0 7 1; +#X connect 1 0 7 1; +#X connect 2 0 7 1; +#X connect 6 0 7 2; +#X connect 7 0 14 0; +#X connect 7 1 3 0; +#X connect 9 0 7 1; +#X connect 10 0 7 0; +#X connect 14 0 16 0; +#X connect 15 0 7 0; diff --git a/list-abs/list-fifo.pd b/list-abs/list-fifo.pd new file mode 100755 index 0000000..df41d6c --- /dev/null +++ b/list-abs/list-fifo.pd @@ -0,0 +1,53 @@ +#N canvas 300 195 729 624 10; +#X obj 268 56 inlet; +#X obj 268 184 t a a; +#X obj 268 250 list prepend; +#X obj 366 302 t b a; +#X obj 366 325 list; +#X obj 143 379 list; +#X obj 143 407 list split 1; +#X obj 143 492 list split; +#X obj 143 527 outlet; +#X obj 71 56 inlet; +#X text 380 252 prepend size of list; +#X obj 222 528 outlet; +#X obj 347 217 list-len; +#X obj 366 55 inlet; +#X text 419 304 store lists; +#X text 256 445 get length of next stored list and split it off.; +#X text 270 34 push; +#X text 365 35 reset stack; +#X obj 366 79 b; +#X obj 71 138 route clear; +#X obj 143 164 b; +#X text 69 34 pop (or clear); +#X obj 143 441 t b a; +#X obj 143 467 list append; +#X obj 71 164 b; +#X obj 268 301 list prepend; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 12 0; +#X connect 2 0 25 0; +#X connect 3 0 4 0; +#X connect 3 1 4 1; +#X connect 4 0 5 1; +#X connect 4 0 25 1; +#X connect 5 0 6 0; +#X connect 6 0 22 0; +#X connect 6 1 23 1; +#X connect 6 2 11 0; +#X connect 7 0 8 0; +#X connect 7 1 3 0; +#X connect 9 0 19 0; +#X connect 12 0 2 1; +#X connect 13 0 18 0; +#X connect 18 0 3 0; +#X connect 19 0 24 0; +#X connect 19 1 20 0; +#X connect 20 0 5 0; +#X connect 22 0 23 0; +#X connect 22 1 7 1; +#X connect 23 0 7 0; +#X connect 24 0 3 0; +#X connect 25 0 3 0; diff --git a/list-abs/list-filter-help.pd b/list-abs/list-filter-help.pd new file mode 100755 index 0000000..0463084 --- /dev/null +++ b/list-abs/list-filter-help.pd @@ -0,0 +1,81 @@ +#N canvas 0 26 583 620 10; +#X obj 226 453 mod 2; +#X obj 226 483 != 0; +#X obj 274 454 mod 3; +#X obj 274 483 != 0; +#X obj 226 517 &&; +#X obj 226 426 t a a; +#N canvas 0 0 450 300 show 0; +#X obj 129 107 list prepend set; +#X obj 129 129 list trim; +#X obj 129 79 inlet; +#X obj 129 154 outlet; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 2 0 0 0; +#X restore 70 548 pd show; +#X msg 70 574; +#X text 62 27 [list-filter]; +#X text 66 58 [list-filter] returns a sequence consisting of those +items from the sequence for which the user-defined operation cross-connected +to the rightmost in- and outlet is true.; +#X text 66 112 Everything that is not 0 is considered a TRUE value. +Internally [select 0] is used.; +#X msg 70 213 0 1 2 3 4 5; +#N canvas 0 0 450 300 show 0; +#X obj 129 107 list prepend set; +#X obj 129 129 list trim; +#X obj 129 79 inlet; +#X obj 129 154 outlet; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 2 0 0 0; +#X restore 70 306 pd show; +#X msg 70 332; +#X obj 167 266 >= 3; +#X text 67 163 Examples:; +#X text 217 266 remove values smaller than 3 from list; +#X obj 160 212 t b a; +#X floatatom 160 193 5 0 0 0 - - -; +#X text 200 212 "bang" to [list-filter] will resend the last list; +#X obj 70 265 list-filter; +#X text 70 362 Calculate some small primes:; +#X msg 70 387 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 +23 24; +#X obj 70 471 list-filter; +#X msg 82 526 bang; +#X msg 79 285 bang; +#N canvas 491 26 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 155 AUTHOR Frank Barknecht; +#X text 12 175 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 115 OUTLET_0 list; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION return a list of items for which the operation +cross-connected to the rightmost in- and outlet is true.; +#X text 12 75 INLET_0 list; +#X text 12 95 INLET_1 float; +#X text 12 135 OUTLET_1 float; +#X restore 508 580 pd META; +#X connect 0 0 1 0; +#X connect 1 0 4 0; +#X connect 2 0 3 0; +#X connect 3 0 4 1; +#X connect 4 0 23 1; +#X connect 5 0 0 0; +#X connect 5 1 2 0; +#X connect 6 0 7 0; +#X connect 11 0 20 0; +#X connect 12 0 13 0; +#X connect 14 0 20 1; +#X connect 17 0 20 0; +#X connect 17 1 14 1; +#X connect 18 0 17 0; +#X connect 20 0 12 0; +#X connect 20 1 14 0; +#X connect 22 0 23 0; +#X connect 23 0 6 0; +#X connect 23 1 5 0; +#X connect 24 0 6 0; +#X connect 25 0 12 0; diff --git a/list-abs/list-filter.pd b/list-abs/list-filter.pd new file mode 100755 index 0000000..d466f14 --- /dev/null +++ b/list-abs/list-filter.pd @@ -0,0 +1,42 @@ +#N canvas 723 173 519 432 10; +#X obj 86 33 inlet; +#X obj 275 52 inlet; +#X obj 151 352 outlet; +#X obj 169 268 outlet; +#X obj 169 215 list-drip; +#X obj 326 250 list prepend; +#X obj 405 220 t a; +#X obj 86 58 route bang; +#X obj 151 84 t b a; +#X obj 151 124 list; +#X obj 275 111 select 0; +#X obj 326 133 b; +#X obj 326 209 list; +#X obj 169 244 t a a; +#X obj 151 317 list; +#X obj 151 155 t b a b b b; +#X obj 86 83 t b b; +#X connect 0 0 7 0; +#X connect 1 0 10 0; +#X connect 4 0 13 0; +#X connect 5 0 6 0; +#X connect 5 0 14 1; +#X connect 6 0 5 1; +#X connect 7 0 16 0; +#X connect 7 1 8 0; +#X connect 8 0 9 0; +#X connect 8 1 9 1; +#X connect 9 0 15 0; +#X connect 10 1 11 0; +#X connect 11 0 12 0; +#X connect 12 0 5 0; +#X connect 13 0 3 0; +#X connect 13 1 12 1; +#X connect 14 0 2 0; +#X connect 15 0 14 0; +#X connect 15 1 4 0; +#X connect 15 2 14 1; +#X connect 15 3 5 1; +#X connect 15 4 12 1; +#X connect 16 0 9 0; +#X connect 16 1 9 1; diff --git a/list-abs/list-find-help.pd b/list-abs/list-find-help.pd new file mode 100755 index 0000000..e11ddc8 --- /dev/null +++ b/list-abs/list-find-help.pd @@ -0,0 +1,62 @@ +#N canvas 0 26 552 533 10; +#X floatatom 159 259 5 0 0 0 - - -; +#X obj 144 331 list-find; +#X obj 202 293 loadbang; +#X obj 101 449 print FOUND_AT; +#X text 59 21 [list-find]; +#N canvas 516 236 450 300 collect 0; +#X obj 195 37 inlet; +#X obj 41 37 inlet; +#X obj 41 144 outlet; +#X msg 195 74 set; +#X text 143 140 1993-2004 by Karlheinz Essl; +#X text 143 160 vs. 1.1; +#X obj 41 99 list trim; +#X obj 41 74 list prepend add2; +#X connect 0 0 3 0; +#X connect 1 0 7 0; +#X connect 3 0 2 0; +#X connect 6 0 2 0; +#X connect 7 0 6 0; +#X restore 144 395 pd collect; +#X obj 144 309 t a b; +#X msg 159 237 0; +#X msg 189 237 4; +#X text 120 53 Find position(s) of a value in a list.; +#X text 120 72 Inlet0: value to search; +#X text 120 91 Inlet1: list to search in.; +#X msg 144 184 seven; +#X msg 202 315 0 1 2 3 4 5 6 seven eight 0 0; +#X msg 144 206 symbol eight; +#X msg 144 417; +#X text 120 110 Outlet0: stream of found positions; +#X floatatom 202 354 5 0 0 1 hits - -; +#X msg 219 237 100; +#X text 120 129 Outlet1: after list was completely scanned \, report +number of elements found.; +#N canvas 491 26 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 145 AUTHOR Frank Barknecht; +#X text 12 165 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 125 OUTLET_1 float; +#X text 12 45 DESCRIPTION find position(s) of a value in a list; +#X text 12 65 INLET_0 float; +#X text 12 85 INLET_1 list; +#X text 12 105 OUTLET_0 float; +#X restore 483 503 pd META; +#X connect 0 0 6 0; +#X connect 1 0 3 0; +#X connect 1 0 5 0; +#X connect 1 1 17 0; +#X connect 2 0 13 0; +#X connect 5 0 15 0; +#X connect 6 0 1 0; +#X connect 6 1 5 1; +#X connect 7 0 0 0; +#X connect 8 0 0 0; +#X connect 12 0 6 0; +#X connect 13 0 1 1; +#X connect 14 0 6 0; +#X connect 18 0 0 0; diff --git a/list-abs/list-find.pd b/list-abs/list-find.pd new file mode 100755 index 0000000..0d48eef --- /dev/null +++ b/list-abs/list-find.pd @@ -0,0 +1,60 @@ +#N canvas 372 65 643 444 10; +#X obj 91 359 f; +#X obj 91 51 inlet; +#X obj 183 47 inlet; +#X obj 91 396 outlet; +#X text 60 27 value to find; +#X obj 91 180 list-drip; +#X obj 91 210 t a b; +#X obj 91 158 list; +#X text 180 27 list to search in; +#X text 208 103 [list-find] Find positions of a value (symbol or float) +in a list.; +#X obj 91 293 compare-any; +#X obj 91 317 select 1; +#N canvas 0 0 450 300 count 0; +#X obj 120 148 f 0; +#X obj 148 149 + 1; +#X obj 163 100 0; +#X obj 117 24 inlet; +#X obj 119 176 outlet; +#X obj 181 25 inlet; +#X obj 114 47 b; +#X connect 0 0 1 0; +#X connect 0 0 4 0; +#X connect 1 0 0 1; +#X connect 2 0 0 1; +#X connect 3 0 6 0; +#X connect 5 0 2 0; +#X connect 6 0 0 0; +#X restore 121 245 pd count; +#X obj 91 80 t b a b b; +#X obj 176 395 outlet; +#X obj 248 351 + 1; +#X obj 176 375 f; +#X obj 219 350 f 1; +#X msg 235 317 1; +#X msg 199 318 0; +#X connect 0 0 3 0; +#X connect 1 0 13 0; +#X connect 2 0 7 1; +#X connect 5 0 6 0; +#X connect 5 1 16 0; +#X connect 6 0 10 0; +#X connect 6 1 12 0; +#X connect 7 0 5 0; +#X connect 10 0 11 0; +#X connect 11 0 0 0; +#X connect 11 0 17 0; +#X connect 12 0 0 1; +#X connect 13 0 7 0; +#X connect 13 1 10 1; +#X connect 13 2 12 1; +#X connect 13 3 18 0; +#X connect 13 3 19 0; +#X connect 15 0 17 1; +#X connect 16 0 14 0; +#X connect 17 0 16 1; +#X connect 17 0 15 0; +#X connect 18 0 17 1; +#X connect 19 0 16 1; diff --git a/list-abs/list-geometric-mean-help.pd b/list-abs/list-geometric-mean-help.pd new file mode 100755 index 0000000..0790a93 --- /dev/null +++ b/list-abs/list-geometric-mean-help.pd @@ -0,0 +1,201 @@ +#N struct 1106-dial float y; +#N canvas 0 31 540 547 10; +#N canvas 0 0 450 300 randlist 0; +#X obj 134 129 until; +#X msg 246 151 set; +#X msg 134 193 add2 \$1; +#X obj 112 101 t b f b; +#X obj 135 249 outlet; +#X obj 112 31 inlet; +#X obj 112 73 + 1; +#X obj 112 53 random 10; +#X obj 134 151 random 10; +#X obj 134 171 + 1; +#X connect 0 0 8 0; +#X connect 1 0 4 0; +#X connect 2 0 4 0; +#X connect 3 0 4 0; +#X connect 3 1 0 0; +#X connect 3 2 1 0; +#X connect 5 0 7 0; +#X connect 6 0 3 0; +#X connect 7 0 6 0; +#X connect 8 0 9 0; +#X connect 9 0 2 0; +#X restore 153 266 pd randlist; +#X msg 153 244 bang; +#X floatatom 98 400 5 0 0 1 geometric_mean - -; +#X msg 153 292 8 6 7 3 8 3 1 7; +#X msg 98 189 1 2 3 4; +#X msg 98 215 any symbols 1 2 3 4 are ignored; +#X text 96 146 Non-floats in a list are silently dropped.; +#X obj 98 366 list-geometric-mean; +#X text 86 22 [list-geometric-mean]; +#X text 96 51 Calculates the geometric mean of a list (of floats) according +to:; +#X text 96 119 where n is the total number of floats in a list.; +#X text 232 329 0 destroys everything!; +#X msg 154 328 1 2 0 3 4; +#X text 114 91 geometric mean = pow(f0 * f1 * f2 * ... * fn \, 1/n) +; +#N canvas 318 53 648 574 graphical-mean 0; +#N canvas 0 0 450 300 randlist 0; +#X obj 134 129 until; +#X msg 246 151 set; +#X msg 134 213 add2 \$1; +#X obj 112 101 t b f b; +#X obj 135 249 outlet; +#X obj 112 31 inlet; +#X obj 134 151 random 100; +#X msg 112 59 10; +#X obj 134 191 / 10; +#X obj 134 170 + 1; +#X connect 0 0 6 0; +#X connect 1 0 4 0; +#X connect 2 0 4 0; +#X connect 3 0 4 0; +#X connect 3 1 0 0; +#X connect 3 2 1 0; +#X connect 5 0 7 0; +#X connect 6 0 9 0; +#X connect 7 0 3 0; +#X connect 8 0 2 0; +#X connect 9 0 8 0; +#X restore 79 388 pd randlist; +#X msg 79 366 bang; +#X obj 79 447 list prepend 0; +#X obj 79 500 s \$0-tab; +#N canvas 0 0 450 300 (subpatch) 0; +#X array \$0-tab 10 float 0; +#X coords 0 10 9 0 200 140 1; +#X restore 75 152 graph; +#N canvas 0 0 916 918 \$0-c 0; +#X scalar 1106-dial 0 \;; +#X coords 0 0 200 140 200 140 1; +#X restore 75 152 pd \$0-c; +#N canvas 0 0 503 429 create 0; +#X msg 242 258 traverse pd-\$1 \, bang; +#X obj 242 238 symbol \$0-c; +#X msg 107 79 0; +#X obj 242 278 pointer; +#X msg 243 178 clear; +#X obj 243 205 s pd-\$0-c; +#X obj 107 114 t a b b; +#X obj 107 50 loadbang; +#X obj 107 326 outlet; +#X obj 107 302 append \$0-dial y; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 2 0 6 0; +#X connect 3 0 9 1; +#X connect 4 0 5 0; +#X connect 6 0 9 0; +#X connect 6 1 1 0; +#X connect 6 2 4 0; +#X connect 7 0 2 0; +#X connect 9 0 8 0; +#X restore 468 339 pd create; +#X obj 339 127 metro 50; +#X obj 339 102 tgl 15 0 empty empty show-mean 17 7 1 10 -258699 -262144 +-1 0 1; +#N canvas 473 338 450 300 countto 0; +#X obj 131 154 f 0; +#X obj 156 153 + 1; +#X msg 174 113 0; +#X obj 131 183 outlet; +#X obj 131 59 inlet; +#X obj 131 116 until; +#X obj 131 96 t a b; +#X connect 0 0 1 0; +#X connect 0 0 3 0; +#X connect 1 0 0 1; +#X connect 2 0 0 1; +#X connect 4 0 6 0; +#X connect 5 0 0 0; +#X connect 6 0 5 0; +#X connect 6 1 2 0; +#X restore 362 195 pd countto; +#X obj 362 219 tabread \$0-tab; +#X obj 362 249 list prepend; +#X obj 452 249 t a; +#X msg 362 175 10; +#X obj 339 148 t b b b; +#X obj 339 274 list; +#X obj 79 344 loadbang; +#X msg 79 414 0.6 6.9 3.6 5.6 0.7 3.8 3.9 5.3 9.2 9.2; +#X text 77 30 Switch on the "show"-metro and play with the values in +the array.; +#N canvas 336 319 712 355 \$0-dial 0; +#X obj 19 119 outlet; +#X obj 19 86 route change; +#X obj 19 62 struct \$0-dial float y; +#X obj 229 62 drawpolygon 900 2 0 y 200 y; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X restore 453 315 pd \$0-dial; +#X msg 213 469 bounds 0 10 9 0; +#X obj 213 449 loadbang; +#X obj 339 388 set \$0-dial y; +#X floatatom 339 339 5 0 0 0 - - -; +#X msg 92 469 const 5; +#N canvas 0 0 299 354 scale 0; +#X msg 74 83 10 \$1; +#X obj 74 107 -; +#X obj 74 158 * 140; +#X obj 74 134 / 20; +#X obj 74 49 inlet; +#X obj 74 182 outlet; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 2 0 5 0; +#X connect 3 0 2 0; +#X connect 4 0 0 0; +#X restore 339 363 pd scale; +#X obj 339 313 list-geometric-mean; +#X connect 0 0 17 0; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 6 0 22 1; +#X connect 7 0 14 0; +#X connect 8 0 7 0; +#X connect 9 0 10 0; +#X connect 10 0 11 0; +#X connect 11 0 12 0; +#X connect 11 0 15 1; +#X connect 12 0 11 1; +#X connect 13 0 9 0; +#X connect 14 0 15 0; +#X connect 14 1 13 0; +#X connect 14 2 11 1; +#X connect 15 0 26 0; +#X connect 16 0 1 0; +#X connect 17 0 2 0; +#X connect 19 0 22 1; +#X connect 20 0 3 0; +#X connect 21 0 20 0; +#X connect 23 0 25 0; +#X connect 24 0 3 0; +#X connect 25 0 22 0; +#X connect 26 0 23 0; +#X restore 98 420 pd graphical-mean; +#X obj 185 453 list-harmonic-mean; +#X obj 184 474 list-mean; +#X text 97 450 More means:; +#N canvas 491 26 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 105 AUTHOR Frank Barknecht; +#X text 12 125 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION calculate the geometric mean of a list of +floats; +#X text 12 65 INLET_0 list; +#X text 12 85 OUTLET_0 float; +#X restore 478 520 pd META; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 3 0 7 0; +#X connect 4 0 7 0; +#X connect 5 0 7 0; +#X connect 7 0 2 0; +#X connect 12 0 7 0; diff --git a/list-abs/list-geometric-mean.pd b/list-abs/list-geometric-mean.pd new file mode 100755 index 0000000..ca48459 --- /dev/null +++ b/list-abs/list-geometric-mean.pd @@ -0,0 +1,54 @@ +#N canvas 355 173 457 428 10; +#X obj 127 69 inlet; +#X obj 127 337 outlet; +#X obj 146 138 list-drip; +#X obj 146 164 route float; +#X obj 127 274 f; +#N canvas 425 298 450 300 count 0; +#X obj 133 59 b; +#X obj 133 35 inlet; +#X obj 183 35 inlet; +#X obj 164 111 + 1; +#X obj 133 133 outlet; +#X msg 183 71 1; +#X obj 133 110 f 1; +#X connect 0 0 6 0; +#X connect 1 0 0 0; +#X connect 2 0 5 0; +#X connect 3 0 6 1; +#X connect 5 0 6 1; +#X connect 6 0 3 0; +#X connect 6 0 4 0; +#X restore 222 226 pd count; +#X obj 146 189 t a b; +#X obj 127 105 t b a b b; +#X obj 222 253 pow -1; +#X obj 127 302 pow; +#N canvas 370 313 450 300 product 0; +#X obj 135 79 inlet; +#X obj 182 79 inlet; +#X obj 135 169 outlet; +#X obj 168 138 f; +#X obj 135 137 *; +#X obj 182 102 1; +#X connect 0 0 4 0; +#X connect 1 0 5 0; +#X connect 3 0 4 1; +#X connect 4 0 2 0; +#X connect 4 0 3 0; +#X connect 5 0 4 1; +#X restore 146 225 pd product; +#X connect 0 0 7 0; +#X connect 2 0 3 0; +#X connect 3 0 6 0; +#X connect 4 0 9 0; +#X connect 5 0 8 0; +#X connect 6 0 10 0; +#X connect 6 1 5 0; +#X connect 7 0 4 0; +#X connect 7 1 2 0; +#X connect 7 2 10 1; +#X connect 7 3 5 1; +#X connect 8 0 9 1; +#X connect 9 0 1 0; +#X connect 10 0 4 1; diff --git a/list-abs/list-group-help.pd b/list-abs/list-group-help.pd new file mode 100755 index 0000000..f8f3dcd --- /dev/null +++ b/list-abs/list-group-help.pd @@ -0,0 +1,40 @@ +#N canvas 0 26 706 457 10; +#X msg 118 97 list a b; +#X msg 132 122 list c d e f; +#X msg 199 225 3; +#X msg 152 175 list a b c d e; +#X msg 152 196 list f g; +#X text 55 45 list-group - group items into lists of the same size +; +#X text 150 151 remaining items are stored and used for the next group: +; +#X floatatom 209 245 5 0 0 0 - - -; +#X floatatom 73 230 5 0 0 0 - - -; +#X text 63 353 It's a clone of [zl group]; +#X obj 118 296 print list-group; +#X text 233 267 argument sets number of elements to group (default: +1); +#X text 257 220 change group size (at least 1) - changing will also +empty the internal buffer; +#X obj 118 268 list-group 2; +#X text 94 382 Also see; +#X obj 161 382 list-iter; +#N canvas 460 46 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 105 OUTLET_0 list; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 85 INLET_1 float; +#X text 12 45 DESCRIPTION group items into lists of the same size; +#X text 12 65 INLET_0 list; +#X restore 577 387 pd META; +#X connect 0 0 13 0; +#X connect 1 0 13 0; +#X connect 2 0 13 1; +#X connect 3 0 13 0; +#X connect 4 0 13 0; +#X connect 7 0 13 1; +#X connect 8 0 13 0; +#X connect 13 0 10 0; diff --git a/list-abs/list-group.pd b/list-abs/list-group.pd new file mode 100755 index 0000000..d48a567 --- /dev/null +++ b/list-abs/list-group.pd @@ -0,0 +1,38 @@ +#N canvas 172 34 832 393 10; +#X floatatom 385 85 5 0 0 2 change-size - -; +#X obj 341 40 inlet; +#X obj 180 60 inlet; +#X obj 180 302 outlet; +#X obj 341 84 f \$1; +#X obj 180 183 list prepend; +#X obj 180 111 t b a; +#X obj 180 138 until; +#X obj 261 270 t b a; +#X obj 261 153 list prepend; +#X obj 341 118 t b b f; +#X text 393 116 reset (b) and set new length (f).; +#X text 369 225 Lists shorter than group size are stored for next list. +Lists longer get split at group size \, shorter part is put out \, +longer part is re-evaluated.; +#X obj 395 40 loadbang; +#X obj 180 228 list split 1; +#X obj 387 154 max 1; +#X connect 0 0 10 0; +#X connect 1 0 4 0; +#X connect 2 0 6 0; +#X connect 4 0 10 0; +#X connect 5 0 14 0; +#X connect 6 0 7 0; +#X connect 6 1 9 0; +#X connect 7 0 5 0; +#X connect 8 0 7 1; +#X connect 8 1 9 1; +#X connect 9 0 5 1; +#X connect 10 0 5 1; +#X connect 10 1 9 1; +#X connect 10 2 15 0; +#X connect 13 0 4 0; +#X connect 14 0 3 0; +#X connect 14 1 5 1; +#X connect 14 2 8 0; +#X connect 15 0 14 1; diff --git a/list-abs/list-harmonic-mean-help.pd b/list-abs/list-harmonic-mean-help.pd new file mode 100755 index 0000000..ec1cc45 --- /dev/null +++ b/list-abs/list-harmonic-mean-help.pd @@ -0,0 +1,204 @@ +#N struct 1033-dial float y; +#N canvas 0 31 566 571 10; +#N canvas 0 0 450 300 randlist 0; +#X obj 134 129 until; +#X msg 246 151 set; +#X msg 134 193 add2 \$1; +#X obj 112 101 t b f b; +#X obj 135 249 outlet; +#X obj 112 31 inlet; +#X obj 112 73 + 1; +#X obj 112 53 random 10; +#X obj 134 151 random 10; +#X obj 134 171 + 1; +#X connect 0 0 8 0; +#X connect 1 0 4 0; +#X connect 2 0 4 0; +#X connect 3 0 4 0; +#X connect 3 1 0 0; +#X connect 3 2 1 0; +#X connect 5 0 7 0; +#X connect 6 0 3 0; +#X connect 7 0 6 0; +#X connect 8 0 9 0; +#X connect 9 0 2 0; +#X restore 153 305 pd randlist; +#X msg 153 283 bang; +#X floatatom 98 439 5 0 0 1 harmonic_mean - -; +#X msg 153 331 3 5 3 3 8; +#X msg 98 228 1 2 3 4; +#X msg 98 254 any symbols 1 2 3 4 are ignored; +#X text 96 146 Non-floats in a list are silently dropped.; +#X text 96 119 where n is the total number of floats in a list.; +#N canvas 318 53 648 574 graphical-mean 0; +#N canvas 0 0 450 300 randlist 0; +#X obj 134 129 until; +#X msg 246 151 set; +#X msg 134 213 add2 \$1; +#X obj 112 101 t b f b; +#X obj 135 249 outlet; +#X obj 112 31 inlet; +#X obj 134 151 random 100; +#X msg 112 59 10; +#X obj 134 191 / 10; +#X obj 134 170 + 1; +#X connect 0 0 6 0; +#X connect 1 0 4 0; +#X connect 2 0 4 0; +#X connect 3 0 4 0; +#X connect 3 1 0 0; +#X connect 3 2 1 0; +#X connect 5 0 7 0; +#X connect 6 0 9 0; +#X connect 7 0 3 0; +#X connect 8 0 2 0; +#X connect 9 0 8 0; +#X restore 79 388 pd randlist; +#X msg 79 366 bang; +#X obj 79 447 list prepend 0; +#X obj 79 500 s \$0-tab; +#N canvas 0 0 450 300 (subpatch) 0; +#X array \$0-tab 10 float 0; +#X coords 0 10 9 0 200 140 1; +#X restore 75 152 graph; +#N canvas 0 0 916 918 \$0-c 0; +#X scalar 1033-dial 0 \;; +#X coords 0 0 200 140 200 140 1; +#X restore 75 152 pd \$0-c; +#N canvas 0 0 503 429 create 0; +#X msg 242 258 traverse pd-\$1 \, bang; +#X obj 242 238 symbol \$0-c; +#X msg 107 79 0; +#X obj 242 278 pointer; +#X msg 243 178 clear; +#X obj 243 205 s pd-\$0-c; +#X obj 107 114 t a b b; +#X obj 107 50 loadbang; +#X obj 107 326 outlet; +#X obj 107 302 append \$0-dial y; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 2 0 6 0; +#X connect 3 0 9 1; +#X connect 4 0 5 0; +#X connect 6 0 9 0; +#X connect 6 1 1 0; +#X connect 6 2 4 0; +#X connect 7 0 2 0; +#X connect 9 0 8 0; +#X restore 440 364 pd create; +#X obj 339 127 metro 50; +#X obj 339 102 tgl 15 0 empty empty show-mean 17 7 1 10 -258699 -262144 +-1 0 1; +#N canvas 473 338 450 300 countto 0; +#X obj 131 154 f 0; +#X obj 156 153 + 1; +#X msg 174 113 0; +#X obj 131 183 outlet; +#X obj 131 59 inlet; +#X obj 131 116 until; +#X obj 131 96 t a b; +#X connect 0 0 1 0; +#X connect 0 0 3 0; +#X connect 1 0 0 1; +#X connect 2 0 0 1; +#X connect 4 0 6 0; +#X connect 5 0 0 0; +#X connect 6 0 5 0; +#X connect 6 1 2 0; +#X restore 362 195 pd countto; +#X obj 362 219 tabread \$0-tab; +#X obj 362 249 list prepend; +#X obj 452 249 t a; +#X msg 362 175 10; +#X obj 339 148 t b b b; +#X obj 339 274 list; +#X obj 79 344 loadbang; +#X text 77 30 Switch on the "show"-metro and play with the values in +the array.; +#N canvas 336 319 712 355 \$0-dial 0; +#X obj 19 119 outlet; +#X obj 19 86 route change; +#X obj 19 62 struct \$0-dial float y; +#X obj 229 62 drawpolygon 900 2 0 y 200 y; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X restore 425 340 pd \$0-dial; +#X msg 213 469 bounds 0 10 9 0; +#X obj 213 449 loadbang; +#X obj 339 388 set \$0-dial y; +#X floatatom 339 339 5 0 0 0 - - -; +#X msg 92 469 const 5; +#N canvas 0 0 299 354 scale 0; +#X msg 74 83 10 \$1; +#X obj 74 107 -; +#X obj 74 158 * 140; +#X obj 74 134 / 20; +#X obj 74 49 inlet; +#X obj 74 182 outlet; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 2 0 5 0; +#X connect 3 0 2 0; +#X connect 4 0 0 0; +#X restore 339 363 pd scale; +#X obj 339 313 list-harmonic-mean; +#X msg 79 414 5.7 6 8.1 9.9 3.1 6.5 9.7 5.8 5.6 0.9; +#X connect 0 0 26 0; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 6 0 21 1; +#X connect 7 0 14 0; +#X connect 8 0 7 0; +#X connect 9 0 10 0; +#X connect 10 0 11 0; +#X connect 11 0 12 0; +#X connect 11 0 15 1; +#X connect 12 0 11 1; +#X connect 13 0 9 0; +#X connect 14 0 15 0; +#X connect 14 1 13 0; +#X connect 14 2 11 1; +#X connect 15 0 25 0; +#X connect 16 0 1 0; +#X connect 18 0 21 1; +#X connect 19 0 3 0; +#X connect 20 0 19 0; +#X connect 22 0 24 0; +#X connect 23 0 3 0; +#X connect 24 0 21 0; +#X connect 25 0 22 0; +#X connect 26 0 2 0; +#X restore 98 459 pd graphical-mean; +#X obj 98 405 list-harmonic-mean; +#X text 86 22 [list-harmonic-mean]; +#X text 96 51 Calculates the harmonic mean of a list (of floats) according +to:; +#X msg 154 357 0 1 2 3 4; +#X text 234 357 0 makes the harmonic mean limit to 0; +#X text 95 171 If a 0 occurs \, the harmonic mean is set to 0 \, because +if one value approaches zero \, the harmonic mean limits to zero as +well.; +#X obj 185 493 list-geometric-mean; +#X obj 184 515 list-mean; +#X text 97 494 More means:; +#X text 114 91 harmonic mean = n / (1/f0 + 1/f1 + 1/f2 + ... + 1/fn) +; +#N canvas 491 26 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 105 AUTHOR Frank Barknecht; +#X text 12 125 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 65 INLET_0 list; +#X text 12 85 OUTLET_0 float; +#X text 12 45 DESCRIPTION Calculates the harmonic mean of a list of +floats; +#X restore 498 530 pd META; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 3 0 9 0; +#X connect 4 0 9 0; +#X connect 5 0 9 0; +#X connect 9 0 2 0; +#X connect 12 0 9 0; diff --git a/list-abs/list-harmonic-mean.pd b/list-abs/list-harmonic-mean.pd new file mode 100755 index 0000000..4152143 --- /dev/null +++ b/list-abs/list-harmonic-mean.pd @@ -0,0 +1,71 @@ +#N canvas 355 173 457 428 10; +#X obj 127 69 inlet; +#X obj 127 377 outlet; +#X obj 146 138 list-drip; +#X obj 146 164 route float; +#X obj 127 314 f; +#N canvas 425 298 450 300 count 0; +#X obj 133 59 b; +#X obj 133 35 inlet; +#X obj 183 35 inlet; +#X obj 164 111 + 1; +#X obj 133 133 outlet; +#X msg 183 71 1; +#X obj 133 110 f 1; +#X connect 0 0 6 0; +#X connect 1 0 0 0; +#X connect 2 0 5 0; +#X connect 3 0 6 1; +#X connect 5 0 6 1; +#X connect 6 0 3 0; +#X connect 6 0 4 0; +#X restore 238 225 pd count; +#X obj 146 189 t a b; +#X obj 127 105 t b a b b; +#X obj 146 250 pow -1; +#X obj 127 342 *; +#N canvas 370 313 660 345 sum-reci 0; +#X obj 84 40 inlet; +#X obj 183 40 inlet; +#X obj 135 249 outlet; +#X obj 168 218 f; +#X obj 135 217 +; +#X obj 183 183 0; +#X obj 135 184 pow -1; +#X obj 84 149 select 0; +#X obj 219 249 outlet; +#X obj 84 122 spigot 1; +#X msg 135 90 1; +#X msg 84 176 0; +#X text 270 253 if a 0 occurs \, the harmonic mean always is 0 \, too! +; +#X connect 0 0 9 0; +#X connect 1 0 5 0; +#X connect 1 0 10 0; +#X connect 3 0 4 1; +#X connect 4 0 2 0; +#X connect 4 0 3 0; +#X connect 5 0 4 1; +#X connect 6 0 4 0; +#X connect 7 0 11 0; +#X connect 7 1 6 0; +#X connect 9 0 7 0; +#X connect 10 0 9 1; +#X connect 11 0 9 1; +#X connect 11 0 8 0; +#X restore 146 225 pd sum-reci; +#X connect 0 0 7 0; +#X connect 2 0 3 0; +#X connect 3 0 6 0; +#X connect 4 0 9 0; +#X connect 5 0 9 1; +#X connect 6 0 10 0; +#X connect 6 1 5 0; +#X connect 7 0 4 0; +#X connect 7 1 2 0; +#X connect 7 2 10 1; +#X connect 7 3 5 1; +#X connect 8 0 4 1; +#X connect 9 0 1 0; +#X connect 10 0 8 0; +#X connect 10 1 4 1; diff --git a/list-abs/list-idx-help.pd b/list-abs/list-idx-help.pd new file mode 100755 index 0000000..d2d9792 --- /dev/null +++ b/list-abs/list-idx-help.pd @@ -0,0 +1,28 @@ +#N canvas 0 31 434 313 10; +#X obj 136 121 t b f; +#X symbolatom 136 222 10 0 0 0 - - -; +#X obj 136 78 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1 +-1 0; +#X msg 136 166 a b c d e f g h; +#X obj 136 193 list-idx 2; +#X text 86 52 list-idx: Get element at position idx.; +#X floatatom 136 102 5 0 0 0 - - -; +#X obj 136 245 print; +#N canvas 444 31 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 65 INLET_0 anything; +#X text 12 85 INLET_1 float; +#X text 12 105 OUTLET_0 symbol float pointer; +#X text 12 45 DESCRIPTION get element at position idx; +#X restore 377 287 pd META; +#X connect 0 0 3 0; +#X connect 0 1 4 1; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 1 0; +#X connect 6 0 0 0; diff --git a/list-abs/list-idx.pd b/list-abs/list-idx.pd new file mode 100755 index 0000000..6fc68bc --- /dev/null +++ b/list-abs/list-idx.pd @@ -0,0 +1,14 @@ +#N canvas 0 0 450 300 10; +#X obj 122 108 inlet; +#X obj 197 69 loadbang; +#X obj 187 95 f \$1; +#X obj 154 210 outlet; +#X obj 187 47 inlet; +#X obj 154 176 list split 1; +#X obj 122 139 list-splat; +#X connect 0 0 6 0; +#X connect 1 0 2 0; +#X connect 2 0 6 1; +#X connect 4 0 2 0; +#X connect 5 0 3 0; +#X connect 6 1 5 0; diff --git a/list-abs/list-insert-help.pd b/list-abs/list-insert-help.pd new file mode 100755 index 0000000..2b39903 --- /dev/null +++ b/list-abs/list-insert-help.pd @@ -0,0 +1,37 @@ +#N canvas 0 31 451 383 10; +#X obj 125 251 list-insert 2; +#X obj 168 172 hradio 15 1 0 8 empty empty POS_(zero-based) 0 -6 0 +8 -262144 -1 -1 0; +#X msg 233 222 0 1 2 3 4 5 6; +#X text 231 203 original list; +#X floatatom 168 197 5 0 0 0 - - -; +#X text 68 69 Argument: default POS; +#X text 67 49 POS is zerobased. Negative POS will count from the end. +; +#X msg 125 132 list SOME ELEMENTS; +#X msg 125 162 INS; +#X text 65 12 list-insert: insert LIST before element at position POS +in original list.; +#X obj 125 280 print NEW_LIST; +#X floatatom 125 190 5 0 0 0 - - -; +#X text 125 113 LIST or element to insert; +#N canvas 461 31 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 155 AUTHOR Frank Barknecht; +#X text 12 175 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 75 INLET_0 anything; +#X text 12 95 INLET_1 float; +#X text 12 45 DESCRIPTION insert LIST before element at position POS +in original list; +#X text 12 115 INLET_2 anything; +#X text 12 135 OUTLET_0 list; +#X restore 397 357 pd META; +#X connect 0 0 10 0; +#X connect 1 0 4 0; +#X connect 2 0 0 2; +#X connect 4 0 0 1; +#X connect 7 0 0 0; +#X connect 8 0 0 0; +#X connect 11 0 0 0; diff --git a/list-abs/list-insert.pd b/list-abs/list-insert.pd new file mode 100755 index 0000000..0953826 --- /dev/null +++ b/list-abs/list-insert.pd @@ -0,0 +1,63 @@ +#N canvas 313 86 599 614 10; +#X obj 94 50 inlet; +#X obj 259 133 inlet; +#X obj 308 134 inlet; +#X text 257 112 pos; +#X text 306 113 list; +#X obj 173 180 list; +#X obj 94 528 outlet; +#X obj 94 308 list; +#X obj 94 250 list prepend; +#X text 91 29 list to insert; +#X obj 173 206 list-splat \$1; +#X obj 371 246 > 0; +#X obj 292 337 route 0 1; +#X obj 292 316 list prepend; +#X obj 292 371 list prepend; +#X obj 393 370 list; +#X obj 94 75 t a b b a; +#X obj 152 100 s \$0-insert; +#X obj 416 338 r \$0-insert; +#X obj 149 122 s \$0-init; +#X obj 190 250 r \$0-init; +#X obj 322 290 s \$0-out-of-range; +#X obj 145 350 r \$0-out-of-range; +#X obj 292 243 t a b; +#X obj 94 374 spigot 1; +#X obj 397 157 s \$0-out-of-range; +#X obj 397 108 r \$0-init; +#X obj 397 130 1; +#X obj 322 266 0; +#X obj 130 307 r \$0-init; +#X text 231 524 This is more complicated than I thought!; +#X connect 0 0 16 0; +#X connect 1 0 10 1; +#X connect 1 0 11 0; +#X connect 2 0 5 1; +#X connect 5 0 10 0; +#X connect 7 0 24 0; +#X connect 8 0 7 0; +#X connect 10 0 8 1; +#X connect 10 1 7 1; +#X connect 10 2 23 0; +#X connect 11 0 13 1; +#X connect 12 0 14 0; +#X connect 12 1 15 0; +#X connect 13 0 12 0; +#X connect 14 0 6 0; +#X connect 15 0 6 0; +#X connect 16 0 8 0; +#X connect 16 1 5 0; +#X connect 16 2 19 0; +#X connect 16 3 17 0; +#X connect 18 0 15 1; +#X connect 18 0 14 1; +#X connect 20 0 8 1; +#X connect 22 0 24 1; +#X connect 23 0 13 0; +#X connect 23 1 28 0; +#X connect 24 0 6 0; +#X connect 26 0 27 0; +#X connect 27 0 25 0; +#X connect 28 0 21 0; +#X connect 29 0 7 1; diff --git a/list-abs/list-inter-help.pd b/list-abs/list-inter-help.pd new file mode 100755 index 0000000..c166b90 --- /dev/null +++ b/list-abs/list-inter-help.pd @@ -0,0 +1,58 @@ +#N canvas 0 31 555 606 10; +#X text 101 83 inlets:; +#X text 115 101 1) float 0-1: distance between lists; +#X text 117 122 2) list 1; +#X text 117 141 2) list 2; +#X text 95 30 list-inter: elementwise linear interpolation between +two (float) lists.; +#X obj 228 153 hsl 128 15 0 1 0 0 empty empty factor_(0-1) -2 -6 0 +10 -262144 -1 -1 0 0; +#X obj 225 359 vsl 15 128 0 10 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 264 359 vsl 15 128 0 10 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 304 359 vsl 15 128 0 10 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X floatatom 225 333 5 0 0 0 - - -; +#X floatatom 264 333 5 0 0 0 - - -; +#X floatatom 304 333 5 0 0 0 - - -; +#X obj 225 282 list-inter; +#X text 87 519 Also see [triple-scale] \, but [list-inter] works for +float lists of arbitrary length.; +#X obj 225 311 unpack 0 0 0 0; +#X obj 343 360 vsl 15 128 0 10 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X floatatom 343 334 5 0 0 0 - - -; +#X obj 164 307 print; +#X text 96 63 Non-float elements in first list will be kept.; +#X msg 257 181 5 2 9 3; +#X msg 267 207 5 x 9 3; +#X text 326 207 careful!; +#X msg 290 255 8 7 1 10; +#N canvas 432 135 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 155 AUTHOR Frank Barknecht; +#X text 12 175 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 135 OUTLET_0 list; +#X text 12 45 DESCRIPTION elementwise linear interpolation between +two (float) lists; +#X text 12 75 INLET_0 float; +#X text 12 95 INLET_1 list; +#X text 12 115 INLET_2 list; +#X restore 497 577 pd META; +#X connect 5 0 12 0; +#X connect 9 0 6 0; +#X connect 10 0 7 0; +#X connect 11 0 8 0; +#X connect 12 0 14 0; +#X connect 12 0 17 0; +#X connect 14 0 9 0; +#X connect 14 1 10 0; +#X connect 14 2 11 0; +#X connect 14 3 16 0; +#X connect 16 0 15 0; +#X connect 19 0 12 1; +#X connect 20 0 12 1; +#X connect 22 0 12 2; diff --git a/list-abs/list-inter-many-help.pd b/list-abs/list-inter-many-help.pd new file mode 100755 index 0000000..dd957c8 --- /dev/null +++ b/list-abs/list-inter-many-help.pd @@ -0,0 +1,103 @@ +#N canvas 0 31 579 616 10; +#X obj 195 419 vsl 15 128 0 10 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 234 419 vsl 15 128 0 10 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 274 419 vsl 15 128 0 10 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X floatatom 195 393 5 0 0 0 - - -; +#X floatatom 234 393 5 0 0 0 - - -; +#X floatatom 274 393 5 0 0 0 - - -; +#X obj 195 371 unpack 0 0 0 0; +#X obj 313 420 vsl 15 128 0 10 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X floatatom 313 394 5 0 0 0 - - -; +#X obj 195 342 list-inter-many; +#N canvas 239 261 368 386 randlist 0; +#X msg 141 73 4; +#X obj 141 103 until; +#X obj 141 130 random 100; +#X obj 141 157 / 10; +#X obj 141 199 list prepend; +#X obj 232 200 t a; +#X obj 118 242 list; +#X obj 118 47 t b b b; +#X obj 118 24 inlet; +#X obj 118 318 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 5 0; +#X connect 4 0 6 1; +#X connect 5 0 4 1; +#X connect 6 0 9 0; +#X connect 7 0 6 0; +#X connect 7 1 0 0; +#X connect 7 2 4 1; +#X connect 8 0 7 0; +#X restore 385 252 pd randlist; +#X msg 295 307 clear; +#X msg 295 285 print; +#X msg 385 230 add random list; +#X obj 195 261 / 100; +#X floatatom 195 238 5 0 0 0 - - -; +#X obj 385 207 until; +#X msg 385 184 4; +#X obj 244 262 line; +#X floatatom 244 291 5 0 0 0 - - -; +#X msg 244 239 0 \, 3 2000; +#X msg 385 404; +#X text 390 382 textfile contents:; +#X msg 339 346 set; +#X text 117 581 Also see:; +#X obj 193 582 list-inter; +#X text 97 16 [list-inter-many]; +#X obj 385 274 list prepend add; +#X obj 385 297 list trim; +#X text 94 73 Inlets:; +#X text 94 41 Elementwise linear interpolation between several float +lists stored in a [textfile] object internally.; +#X text 98 188 Outlet: interpolated list.; +#X text 108 151 1) [textfile] inlet. Use the selector "add" to add +lists to the interpolation space; +#X text 108 96 0) float: distance between lists. Values between 0 and +1 will interpolate the first two lists \, values between 1 and 2 interpolate +the second with the third list and so on.; +#N canvas 510 66 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 135 AUTHOR Frank Barknecht; +#X text 12 155 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 115 OUTLET_0 list; +#X text 12 75 INLET_0 float; +#X text 12 95 INLET_1 print add clear; +#X text 12 45 DESCRIPTION elementwise linear interpolation between +several float lists; +#X restore 517 587 pd META; +#X connect 3 0 0 0; +#X connect 4 0 1 0; +#X connect 5 0 2 0; +#X connect 6 0 3 0; +#X connect 6 1 4 0; +#X connect 6 2 5 0; +#X connect 6 3 8 0; +#X connect 8 0 7 0; +#X connect 9 0 6 0; +#X connect 10 0 27 0; +#X connect 11 0 9 1; +#X connect 11 0 23 0; +#X connect 12 0 9 1; +#X connect 13 0 10 0; +#X connect 14 0 9 0; +#X connect 15 0 14 0; +#X connect 16 0 13 0; +#X connect 17 0 16 0; +#X connect 18 0 9 0; +#X connect 18 0 19 0; +#X connect 20 0 18 0; +#X connect 23 0 21 0; +#X connect 27 0 28 0; +#X connect 28 0 9 1; +#X connect 28 0 21 0; diff --git a/list-abs/list-inter-many.pd b/list-abs/list-inter-many.pd new file mode 100755 index 0000000..7687e89 --- /dev/null +++ b/list-abs/list-inter-many.pd @@ -0,0 +1,83 @@ +#N canvas 452 377 578 375 10; +#X obj 85 312 list-inter; +#X obj 263 227 textfile; +#N canvas 490 388 450 300 get-list 0; +#X obj 61 48 inlet; +#X msg 105 133 rewind; +#X obj 83 158 until; +#X obj 61 74 f; +#X obj 61 97 t b a b; +#X obj 61 221 outlet; +#X obj 83 202 outlet; +#X connect 0 0 3 0; +#X connect 1 0 6 0; +#X connect 2 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 5 0; +#X connect 4 1 2 0; +#X connect 4 2 1 0; +#X restore 191 193 pd get-list; +#X obj 191 263 list; +#X obj 337 27 inlet; +#X obj 191 97 int; +#X obj 191 161 + 1; +#X obj 191 139 t a a; +#X obj 221 161 + 2; +#N canvas 490 388 450 300 get-list 0; +#X obj 61 48 inlet; +#X msg 105 133 rewind; +#X obj 83 158 until; +#X obj 61 74 f; +#X obj 61 97 t b a b; +#X obj 61 221 outlet; +#X obj 83 198 outlet; +#X connect 0 0 3 0; +#X connect 1 0 6 0; +#X connect 2 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 5 0; +#X connect 4 1 2 0; +#X connect 4 2 1 0; +#X restore 358 192 pd get-list; +#X obj 358 262 list; +#X obj 191 119 change; +#X obj 85 22 inlet; +#X obj 85 47 t a a; +#X obj 85 335 outlet; +#X obj 337 84 t b a; +#X obj 147 77 moses 0; +#N canvas 0 0 450 300 wrap 0; +#X obj 139 160 -; +#X obj 169 137 int; +#X obj 139 116 t a a; +#X obj 139 91 inlet; +#X obj 139 185 outlet; +#X connect 0 0 4 0; +#X connect 1 0 0 1; +#X connect 2 0 0 0; +#X connect 2 1 1 0; +#X connect 3 0 2 0; +#X restore 85 128 pd wrap; +#X connect 0 0 14 0; +#X connect 1 0 3 1; +#X connect 1 0 10 1; +#X connect 2 0 3 0; +#X connect 2 1 1 0; +#X connect 3 0 0 1; +#X connect 4 0 15 0; +#X connect 5 0 11 0; +#X connect 6 0 2 0; +#X connect 7 0 6 0; +#X connect 7 1 8 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 9 1 1 0; +#X connect 10 0 0 2; +#X connect 11 0 7 0; +#X connect 12 0 13 0; +#X connect 13 0 17 0; +#X connect 13 1 16 0; +#X connect 15 0 11 0; +#X connect 15 1 1 0; +#X connect 16 1 5 0; +#X connect 17 0 0 0; diff --git a/list-abs/list-inter.pd b/list-abs/list-inter.pd new file mode 100755 index 0000000..2ee96c1 --- /dev/null +++ b/list-abs/list-inter.pd @@ -0,0 +1,48 @@ +#N canvas 364 37 760 649 10; +#X obj 345 204 list-drip; +#X obj 426 327 list-dripslow; +#X obj 345 264 t a b; +#X obj 439 434 t l; +#X obj 322 477 list; +#X obj 322 502 outlet; +#X obj 345 176 list; +#X obj 368 145 inlet; +#X obj 535 282 inlet; +#X obj 345 64 inlet; +#X obj 345 434 list prepend; +#X obj 345 369 expr $f3*($f2-$f1) + $f1; +#X text 23 67 inlets:; +#X text 37 85 1) float 0-1: distance between lists; +#X text 39 106 2) list 1; +#X text 39 125 2) list 2; +#X text 20 25 list-inter: elementwise linear interpolation between +two (float) lists.; +#X obj 345 93 t b f b; +#X obj 512 303 list; +#X obj 512 259 r \$0-start; +#X obj 389 117 s \$0-start; +#X obj 424 411 r \$0-start; +#X obj 345 226 route float; +#X text 14 197 Non-float elements in first list will be kept.; +#X connect 0 0 22 0; +#X connect 0 1 4 0; +#X connect 1 0 11 1; +#X connect 2 0 11 0; +#X connect 2 1 1 0; +#X connect 3 0 10 1; +#X connect 4 0 5 0; +#X connect 6 0 0 0; +#X connect 7 0 6 1; +#X connect 8 0 18 1; +#X connect 9 0 17 0; +#X connect 10 0 3 0; +#X connect 10 0 4 1; +#X connect 11 0 10 0; +#X connect 17 0 6 0; +#X connect 17 1 11 2; +#X connect 17 2 20 0; +#X connect 18 0 1 1; +#X connect 19 0 18 0; +#X connect 21 0 10 1; +#X connect 22 0 2 0; +#X connect 22 1 10 0; diff --git a/list-abs/list-invint-help.pd b/list-abs/list-invint-help.pd new file mode 100755 index 0000000..c080d0a --- /dev/null +++ b/list-abs/list-invint-help.pd @@ -0,0 +1,18 @@ +#N canvas 121 115 518 278 10; +#N canvas 510 66 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 105 AUTHOR Frank Barknecht; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION Inverse (musical) intervals of a float list +; +#X text 12 65 INLET_0 list; +#X text 12 85 OUTLET_0 list; +#X text 12 125 HELP_PATCH_AUTHORS Frank Barknecht; +#X restore 443 251 pd META; +#X obj 52 127 list-invint; +#X msg 52 81 10 11 13 20; +#X obj 52 164 print; +#X text 38 26 list-invint: Inverse (musical) intervals of a float list +; +#X connect 1 0 3 0; +#X connect 2 0 1 0; diff --git a/list-abs/list-invint.pd b/list-abs/list-invint.pd new file mode 100755 index 0000000..8109421 --- /dev/null +++ b/list-abs/list-invint.pd @@ -0,0 +1,22 @@ +#N canvas 229 30 753 746 10; +#X obj 133 132 inlet; +#X text 211 80 list-invint: Inverse intervals of a float list; +#X msg 76 82 10 11 13 20; +#X obj 133 351 outlet; +#X obj 133 302 list-map; +#X obj 217 319 -; +#X obj 242 256 * 2; +#X obj 217 289 swap; +#X obj 133 166 t a a; +#X obj 242 230 list split 1; +#X connect 0 0 8 0; +#X connect 2 0 8 0; +#X connect 4 0 3 0; +#X connect 4 1 7 0; +#X connect 5 0 4 1; +#X connect 6 0 7 1; +#X connect 7 0 5 0; +#X connect 7 1 5 1; +#X connect 8 0 4 0; +#X connect 8 1 9 0; +#X connect 9 0 6 0; diff --git a/list-abs/list-iter-help.pd b/list-abs/list-iter-help.pd new file mode 100755 index 0000000..be97e84 --- /dev/null +++ b/list-abs/list-iter-help.pd @@ -0,0 +1,37 @@ +#N canvas 0 32 584 444 10; +#X msg 118 97 list a b; +#X msg 132 122 list c d e f; +#X msg 192 225 3; +#X msg 152 155 list a b c d e; +#X msg 152 176 list f g; +#X floatatom 202 245 5 0 0 0 - - -; +#X floatatom 73 230 5 0 0 0 - - -; +#X text 55 45 list-iter - group lists into sub-lists with size-limit +; +#X text 63 353 It's a clone of [zl iter]; +#X text 94 382 Also see; +#X obj 161 382 list-group; +#X obj 118 296 print list-iter; +#X obj 118 268 list-iter 2; +#X text 241 224 change size limit (must be at least 1); +#X text 233 267 argument sets size limit. Default: 1; +#N canvas 510 66 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 105 OUTLET_0 list; +#X text 12 45 DESCRIPTION group lists into sub-lists with size-limit +; +#X text 12 65 INLET_0 anything; +#X text 12 85 INLET_1 float; +#X restore 527 417 pd META; +#X connect 0 0 12 0; +#X connect 1 0 12 0; +#X connect 2 0 12 1; +#X connect 3 0 12 0; +#X connect 4 0 12 0; +#X connect 5 0 12 1; +#X connect 6 0 12 0; +#X connect 12 0 11 0; diff --git a/list-abs/list-iter.pd b/list-abs/list-iter.pd new file mode 100755 index 0000000..9fd901c --- /dev/null +++ b/list-abs/list-iter.pd @@ -0,0 +1,37 @@ +#N canvas 172 34 839 437 10; +#X floatatom 343 76 5 0 0 2 change-size - -; +#X obj 299 41 inlet; +#X obj 138 51 inlet; +#X obj 138 343 outlet; +#X obj 299 75 f \$1; +#X obj 138 174 list prepend; +#X obj 138 102 t b a; +#X obj 138 129 until; +#X obj 219 261 t b a; +#X text 351 107 reset (b) and set new length (f).; +#X text 327 216 Lists shorter than group size are stored for next list. +Lists longer get split at group size \, shorter part is put out \, +longer part is re-evaluated.; +#X obj 251 283 route bang; +#X obj 138 219 list split 1; +#X obj 331 186 max 1; +#X obj 299 109 t b f; +#X obj 343 41 loadbang; +#X connect 0 0 14 0; +#X connect 1 0 4 0; +#X connect 2 0 6 0; +#X connect 4 0 14 0; +#X connect 5 0 12 0; +#X connect 6 0 7 0; +#X connect 6 1 5 1; +#X connect 7 0 5 0; +#X connect 8 0 7 1; +#X connect 8 1 11 0; +#X connect 11 1 3 0; +#X connect 12 0 3 0; +#X connect 12 1 5 1; +#X connect 12 2 8 0; +#X connect 13 0 12 1; +#X connect 14 0 5 1; +#X connect 14 1 13 0; +#X connect 15 0 4 0; diff --git a/list-abs/list-l2s-help.pd b/list-abs/list-l2s-help.pd new file mode 100755 index 0000000..2daf4e1 --- /dev/null +++ b/list-abs/list-l2s-help.pd @@ -0,0 +1,33 @@ +#N canvas 0 31 518 278 10; +#X msg 52 90 a b c d 1 2; +#X msg 165 90 a b c d 1 2; +#X msg 288 91 a b c d 1 2; +#X symbolatom 165 154 15 0 0 0 - - -; +#X symbolatom 52 155 10 0 0 0 - - -; +#X symbolatom 288 154 25 0 0 0 - - -; +#X obj 52 127 list-l2s; +#X obj 165 126 list-l2s -; +#X obj 288 124 list-l2s _|_; +#X msg 395 90 symbol PD; +#X text 54 42 Concatenate a list into a single symbol using ARG1 as +delimiter. Delimiter can be set through second inlet.; +#X text 55 20 list-l2s; +#N canvas 510 66 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 135 AUTHOR Frank Barknecht; +#X text 12 155 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op symbol_op; +#X text 12 45 DESCRIPTION concatenate a list into a single symbol using +ARG1 as delimiter; +#X text 12 75 INLET_0 anything; +#X text 12 95 INLET_1 symbol; +#X text 12 115 OUTLET_0 symbol; +#X restore 443 251 pd META; +#X connect 0 0 6 0; +#X connect 1 0 7 0; +#X connect 2 0 8 0; +#X connect 6 0 4 0; +#X connect 7 0 3 0; +#X connect 8 0 5 0; +#X connect 9 0 8 1; diff --git a/list-abs/list-l2s.pd b/list-abs/list-l2s.pd new file mode 100755 index 0000000..2de5130 --- /dev/null +++ b/list-abs/list-l2s.pd @@ -0,0 +1,42 @@ +#N canvas 424 382 729 381 10; +#X msg 327 196 set %s; +#X obj 235 244 t a; +#X obj 118 252 makefilename %s; +#X obj 96 62 t b a b; +#X obj 96 283 symbol; +#X msg 142 22 a b c d 1 2; +#X obj 118 158 route symbol float; +#X obj 118 186 symbol; +#X obj 96 21 inlet; +#X obj 96 313 outlet; +#X obj 395 192 makefilename 1%s%%s; +#X obj 395 165 symbol \$1; +#X msg 405 123 bang; +#X obj 395 89 loadbang; +#X msg 395 228 set set \, adddollsym \$1; +#X msg 235 265 set \$1%s; +#X obj 447 124 inlet; +#X obj 178 190 makefilename %g; +#X obj 118 123 list-drip; +#X connect 0 0 2 0; +#X connect 1 0 15 0; +#X connect 2 0 1 0; +#X connect 2 0 4 1; +#X connect 3 0 4 0; +#X connect 3 1 18 0; +#X connect 3 2 0 0; +#X connect 4 0 9 0; +#X connect 5 0 3 0; +#X connect 6 0 7 0; +#X connect 6 1 17 0; +#X connect 7 0 2 0; +#X connect 8 0 3 0; +#X connect 10 0 14 0; +#X connect 11 0 10 0; +#X connect 12 0 11 0; +#X connect 13 0 11 0; +#X connect 14 0 15 0; +#X connect 15 0 2 0; +#X connect 16 0 11 0; +#X connect 17 0 2 0; +#X connect 18 0 6 0; diff --git a/list-abs/list-lastx-help.pd b/list-abs/list-lastx-help.pd new file mode 100755 index 0000000..f60af8e --- /dev/null +++ b/list-abs/list-lastx-help.pd @@ -0,0 +1,23 @@ +#N canvas 0 31 498 331 10; +#X floatatom 168 128 5 0 0 0 - - -; +#X obj 168 184 print last_x; +#X floatatom 247 129 5 0 0 2 change-size - -; +#X text 104 62 list-lastx: make a list of the last x floats.; +#X obj 168 153 list-lastx 4; +#X msg 266 153 bang; +#X text 308 152 reset stored list; +#N canvas 460 31 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION make a list of the last x floats; +#X text 12 65 INLET_0 float; +#X text 12 85 INLET_1 float bang; +#X text 12 105 OUTLET_0 list; +#X restore 425 291 pd META; +#X connect 0 0 4 0; +#X connect 2 0 4 1; +#X connect 4 0 1 0; +#X connect 5 0 4 1; diff --git a/list-abs/list-lastx.pd b/list-abs/list-lastx.pd new file mode 100755 index 0000000..50401a2 --- /dev/null +++ b/list-abs/list-lastx.pd @@ -0,0 +1,25 @@ +#N canvas 119 92 810 481 10; +#X obj 153 175 cnv 15 150 80 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X floatatom 370 79 5 0 0 2 change-size - -; +#X obj 326 112 t f b; +#X text 378 110 first reset (b) \, then set new length (f).; +#X text 311 195 Right outlet is responsible to first fill the list +; +#X text 312 211 Left outlet then only lets the smaller list pass.; +#X obj 180 183 list; +#X obj 326 54 inlet; +#X obj 180 149 inlet; +#X obj 180 302 outlet; +#X obj 180 228 list split \$1; +#X obj 326 78 f \$1; +#X connect 1 0 2 0; +#X connect 2 0 10 1; +#X connect 2 1 6 1; +#X connect 6 0 10 0; +#X connect 7 0 11 0; +#X connect 8 0 6 0; +#X connect 10 0 6 1; +#X connect 10 0 9 0; +#X connect 10 2 6 1; +#X connect 11 0 2 0; diff --git a/list-abs/list-len-help.pd b/list-abs/list-len-help.pd new file mode 100755 index 0000000..5292e45 --- /dev/null +++ b/list-abs/list-len-help.pd @@ -0,0 +1,28 @@ +#N canvas 0 31 450 300 10; +#X obj 123 162 list-len; +#X msg 160 132 1 2 3 4 5 6; +#X obj 123 232 print Length; +#X floatatom 141 197 5 0 0 0 - - -; +#X msg 123 77 bang; +#X text 47 20 list-len: calculate length of a list.; +#X msg 136 101 1; +#X text 182 74 empty list; +#X text 218 102 convert atom to 1-elem list; +#X text 262 133 "real" lists; +#X msg 167 101 dog; +#N canvas 460 31 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 105 AUTHOR Frank Barknecht; +#X text 12 125 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 65 INLET_0 anything; +#X text 12 45 DESCRIPTION calculate length of a list; +#X text 12 85 OUTLET_0 float; +#X restore 386 261 pd META; +#X connect 0 0 2 0; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 10 0 0 0; diff --git a/list-abs/list-len.pd b/list-abs/list-len.pd new file mode 100755 index 0000000..86e5ca1 --- /dev/null +++ b/list-abs/list-len.pd @@ -0,0 +1,9 @@ +#N canvas 0 0 534 321 10; +#X obj 126 70 inlet; +#X obj 126 271 outlet; +#X text 37 37 list-len: calculate length of a list.; +#X obj 126 149 list length; +#X obj 126 125 list; +#X connect 0 0 4 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; diff --git a/list-abs/list-lifo-help.pd b/list-abs/list-lifo-help.pd new file mode 100755 index 0000000..2403faa --- /dev/null +++ b/list-abs/list-lifo-help.pd @@ -0,0 +1,53 @@ +#N canvas 0 31 546 480 10; +#X msg 247 186 1 2 3 4 5; +#X symbolatom 260 207 10 0 0 0 - - -; +#X floatatom 273 224 5 0 0 0 - - -; +#X obj 198 339 bng 15 250 50 0 empty empty EOL 17 7 1 10 -262144 -1 +-1; +#X msg 295 274 bang; +#X msg 238 166 a b c; +#X msg 140 149 bang; +#X text 230 147 store lists or elements ("push"); +#X text 111 125 trigger output ("pop"); +#X text 277 255 clear stored list ("reset"); +#X obj 140 305 list-lifo; +#X text 60 38 [list-lifo]; +#X text 97 64 [list-lifo] stores incoming (list-)messages and outputs +them one by one on incoming bangs in the opposite order of arrival +like a LIFO: Last in \, first out.; +#N canvas 0 0 450 300 show 0; +#X obj 60 48 inlet; +#X obj 60 72 list prepend set; +#X obj 60 97 list trim; +#X obj 60 126 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X restore 140 364 pd show; +#X msg 140 390; +#X msg 74 262 clear; +#X text 82 439 2007 Frank Barknecht; +#N canvas 510 66 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 175 AUTHOR Frank Barknecht; +#X text 12 195 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 75 INLET_0 bang clear; +#X text 12 95 INLET_1 anything; +#X text 12 115 INLET_2 bang; +#X text 12 135 OUTLET_0 list; +#X text 12 155 OUTLET_1 bang; +#X text 12 45 DESCRIPTION stores incoming list messages and outputs +them one by one in opposite order or arrival when banged; +#X restore 487 447 pd META; +#X connect 0 0 10 1; +#X connect 1 0 10 1; +#X connect 2 0 10 1; +#X connect 4 0 10 2; +#X connect 5 0 10 1; +#X connect 6 0 10 0; +#X connect 10 0 13 0; +#X connect 10 1 3 0; +#X connect 13 0 14 0; +#X connect 15 0 10 0; diff --git a/list-abs/list-lifo.pd b/list-abs/list-lifo.pd new file mode 100755 index 0000000..b70e418 --- /dev/null +++ b/list-abs/list-lifo.pd @@ -0,0 +1,53 @@ +#N canvas 300 195 729 624 10; +#X obj 268 56 inlet; +#X obj 268 184 t a a; +#X obj 268 250 list prepend; +#X obj 366 302 t b a; +#X obj 366 325 list; +#X obj 143 379 list; +#X obj 143 407 list split 1; +#X obj 143 492 list split; +#X obj 143 527 outlet; +#X obj 71 56 inlet; +#X text 380 252 prepend size of list; +#X obj 222 528 outlet; +#X obj 347 217 list-len; +#X obj 366 55 inlet; +#X text 419 304 store lists; +#X text 256 445 get length of next stored list and split it off.; +#X text 270 34 push; +#X text 365 35 reset stack; +#X obj 366 79 b; +#X obj 71 138 route clear; +#X obj 143 164 b; +#X text 69 34 pop (or clear); +#X obj 143 441 t b a; +#X obj 143 467 list append; +#X obj 268 301 list append; +#X obj 71 164 b; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 12 0; +#X connect 2 0 24 0; +#X connect 3 0 4 0; +#X connect 3 1 4 1; +#X connect 4 0 5 1; +#X connect 4 0 24 1; +#X connect 5 0 6 0; +#X connect 6 0 22 0; +#X connect 6 1 23 1; +#X connect 6 2 11 0; +#X connect 7 0 8 0; +#X connect 7 1 3 0; +#X connect 9 0 19 0; +#X connect 12 0 2 1; +#X connect 13 0 18 0; +#X connect 18 0 3 0; +#X connect 19 0 25 0; +#X connect 19 1 20 0; +#X connect 20 0 5 0; +#X connect 22 0 23 0; +#X connect 22 1 7 1; +#X connect 23 0 7 0; +#X connect 24 0 3 0; +#X connect 25 0 3 0; diff --git a/list-abs/list-makefilename-a-help.pd b/list-abs/list-makefilename-a-help.pd new file mode 100755 index 0000000..b2f2dab --- /dev/null +++ b/list-abs/list-makefilename-a-help.pd @@ -0,0 +1,41 @@ +#N canvas 0 31 605 472 10; +#X obj 83 371 print M; +#X obj 82 33 cnv 15 220 30 empty empty list-makefilename-a 20 12 0 +14 -233017 -66577 0; +#X msg 283 219 xyz-%s-abc; +#X msg 283 199 /help/%s; +#X msg 83 200 1 2 3 4 SYMBOL; +#X msg 83 222 list FREQ 440 AMP 1; +#X msg 283 286 const; +#X msg 330 285 You-probably-%don't-want-this; +#X text 317 249 pass unchanged; +#X msg 283 248 %s; +#N canvas 460 31 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 105 OUTLET_0 list; +#X text 12 65 INLET_0 anything; +#X text 12 85 INLET_1 anything; +#X text 12 45 DESCRIPTION apply makefilename on list items.; +#X restore 476 411 pd META; +#X obj 83 334 list-makefilename-a %s-blabla; +#X text 80 76 Apply makefilename on list items.; +#X text 78 111 Use as "list-makefilename-a makefilename-arg". Right +inlet can be used to change the arg to makefilename. You can use any +makefilename format placeholders \, but have to take care on your own +\, if your incoming lists have the correct item types.; +#X msg 100 249 1 2 3 4; +#X msg 104 274 a b c; +#X connect 2 0 11 1; +#X connect 3 0 11 1; +#X connect 4 0 11 0; +#X connect 5 0 11 0; +#X connect 6 0 11 1; +#X connect 7 0 11 1; +#X connect 9 0 11 1; +#X connect 11 0 0 0; +#X connect 14 0 11 0; +#X connect 15 0 11 0; diff --git a/list-abs/list-makefilename-a.pd b/list-abs/list-makefilename-a.pd new file mode 100755 index 0000000..c019c23 --- /dev/null +++ b/list-abs/list-makefilename-a.pd @@ -0,0 +1,37 @@ +#N canvas 674 83 624 640 10; +#X msg 119 113 1 2 3 4 a b c; +#X text 251 117 <- click to test; +#X obj 196 386 list; +#X obj 77 499 list; +#X obj 100 385 list prepend; +#X obj 78 150 t b a b; +#X obj 122 178 s \$0-reset-result; +#X obj 179 357 r \$0-reset-result; +#X text 260 177 clear result list; +#X text 181 204 "Drip" (serialize) the list; +#X text 258 389 Repack the list (think of the counter); +#X text 124 496 Final result is built here; +#X obj 78 81 inlet; +#X obj 223 248 inlet; +#X obj 77 530 outlet; +#X obj 100 334 makefilename \$1; +#X obj 223 272 symbol; +#X msg 223 293 set \$1; +#X text 148 27 Use as "list-makefilename makefilename-arg". Right inlet +can be used to change the arg to makefilename.; +#X obj 100 202 list-drip; +#X connect 0 0 5 0; +#X connect 2 0 4 1; +#X connect 3 0 14 0; +#X connect 4 0 2 0; +#X connect 4 0 3 1; +#X connect 5 0 3 0; +#X connect 5 1 19 0; +#X connect 5 2 6 0; +#X connect 7 0 4 1; +#X connect 12 0 5 0; +#X connect 13 0 16 0; +#X connect 15 0 4 0; +#X connect 16 0 17 0; +#X connect 17 0 15 0; +#X connect 19 0 15 0; diff --git a/list-abs/list-makefilename-help.pd b/list-abs/list-makefilename-help.pd new file mode 100755 index 0000000..517c6ab --- /dev/null +++ b/list-abs/list-makefilename-help.pd @@ -0,0 +1,37 @@ +#N canvas 0 31 605 472 10; +#X obj 83 371 print M; +#X obj 83 334 list-makefilename %s-blabla; +#X obj 82 33 cnv 15 220 30 empty empty list-makefilename 20 12 0 14 +-233017 -66577 0; +#X msg 267 220 xyz-%s-abc; +#X msg 267 200 /help/%s; +#X text 80 76 Change symbols in a list \, pass floats unchanged.; +#X msg 83 200 1 2 3 4 SYMBOL; +#X msg 83 222 list FREQ 440 AMP 1; +#X msg 267 287 const; +#X msg 314 286 You-probably-%don't-want-this; +#X text 301 250 pass unchanged; +#X msg 267 249 %s; +#X text 78 111 Use as "list-makefilename makefilename-arg". Right inlet +can be used to change the arg to makefilename. Please only use symbol +placeholders (== "%s"); +#N canvas 460 31 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 105 OUTLET_0 list; +#X text 12 65 INLET_0 anything; +#X text 12 85 INLET_1 anything; +#X text 12 45 DESCRIPTION change symbols in a list \, pass floats unchanged +; +#X restore 476 411 pd META; +#X connect 1 0 0 0; +#X connect 3 0 1 1; +#X connect 4 0 1 1; +#X connect 6 0 1 0; +#X connect 7 0 1 0; +#X connect 8 0 1 1; +#X connect 9 0 1 1; +#X connect 11 0 1 1; diff --git a/list-abs/list-makefilename.pd b/list-abs/list-makefilename.pd new file mode 100755 index 0000000..9e55e04 --- /dev/null +++ b/list-abs/list-makefilename.pd @@ -0,0 +1,42 @@ +#N canvas 424 89 624 640 10; +#X msg 119 113 1 2 3 4 a b c; +#X text 251 117 <- click to test; +#X obj 196 386 list; +#X obj 77 499 list; +#X obj 100 385 list prepend; +#X obj 78 150 t b a b; +#X obj 122 178 s \$0-reset-result; +#X obj 179 357 r \$0-reset-result; +#X text 260 177 clear result list; +#X text 181 204 "Drip" (serialize) the list; +#X text 258 389 Repack the list (think of the counter); +#X text 124 496 Final result is built here; +#X obj 78 81 inlet; +#X obj 223 248 inlet; +#X obj 77 530 outlet; +#X obj 100 231 route symbol; +#X obj 100 334 makefilename \$1; +#X text 202 228 only work on symbols; +#X obj 223 272 symbol; +#X msg 223 293 set \$1; +#X text 148 27 Use as "list-makefilename makefilename-arg". Right inlet +can be used to change the arg to makefilename. Please only use symbol +placeholders (== "%s"); +#X obj 100 202 list-drip; +#X connect 0 0 5 0; +#X connect 2 0 4 1; +#X connect 3 0 14 0; +#X connect 4 0 2 0; +#X connect 4 0 3 1; +#X connect 5 0 3 0; +#X connect 5 1 21 0; +#X connect 5 2 6 0; +#X connect 7 0 4 1; +#X connect 12 0 5 0; +#X connect 13 0 18 0; +#X connect 15 0 16 0; +#X connect 15 1 4 0; +#X connect 16 0 4 0; +#X connect 18 0 19 0; +#X connect 19 0 16 0; +#X connect 21 0 15 0; diff --git a/list-abs/list-map-help.pd b/list-abs/list-map-help.pd new file mode 100755 index 0000000..fc5d4f3 --- /dev/null +++ b/list-abs/list-map-help.pd @@ -0,0 +1,277 @@ +#N canvas 0 31 612 654 10; +#X obj 67 280 list-map; +#X text 65 22 [list-map] - the swiss army knife of list-operations +; +#X obj 135 280 spigot; +#X obj 171 263 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X msg 67 236 0 1 2 3; +#X obj 118 317 print SERIALIZED; +#X obj 67 346 print MAIN; +#X msg 313 238 0 1 2 3; +#X obj 364 319 print SERIALIZED; +#X obj 313 348 print MAIN; +#X floatatom 404 262 5 0 0 0 - - -; +#X msg 67 215 bang; +#X msg 145 235 a b c; +#X msg 145 215 bang; +#X obj 381 282 * 10; +#X msg 313 214 bang; +#X msg 72 417 0 1 2 3; +#X obj 72 506 list trim; +#X obj 72 486 list prepend set; +#X msg 72 528; +#X obj 138 441 list append -|-; +#X msg 227 511 set; +#X text 304 534 A more complex example:; +#N canvas 164 99 846 438 filters 0; +#N canvas 0 0 450 300 (subpatch) 0; +#X array \$0-in 64 float 0; +#X coords 0 1 63 -1 128 60 1; +#X restore 503 222 graph; +#N canvas 0 0 450 300 (subpatch) 0; +#X array \$0-out 64 float 0; +#X coords 0 1 63 -1 128 60 1; +#X restore 645 222 graph; +#X obj 110 316 s \$0-out; +#N canvas 414 307 437 371 tabdump-in 0; +#X obj 147 152 tabread \$0-in; +#X obj 147 205 list prepend; +#X obj 238 205 t a; +#X obj 125 254 list; +#X obj 125 23 inlet; +#X obj 125 279 outlet; +#X obj 125 46 t b b b; +#X msg 147 104 64; +#N canvas 0 0 450 300 countto 0; +#X obj 163 151 f 0; +#X obj 190 151 + 1; +#X obj 163 109 until; +#X msg 205 111 0; +#X obj 163 180 outlet; +#X obj 163 39 inlet; +#X obj 163 87 t a b; +#X connect 0 0 1 0; +#X connect 0 0 4 0; +#X connect 1 0 0 1; +#X connect 2 0 0 0; +#X connect 3 0 0 1; +#X connect 5 0 6 0; +#X connect 6 0 2 0; +#X connect 6 1 3 0; +#X restore 147 126 pd countto; +#X connect 0 0 1 0; +#X connect 1 0 3 1; +#X connect 1 0 2 0; +#X connect 2 0 1 1; +#X connect 3 0 5 0; +#X connect 4 0 6 0; +#X connect 6 0 3 0; +#X connect 6 1 7 0; +#X connect 6 2 1 1; +#X connect 7 0 8 0; +#X connect 8 0 0 0; +#X restore 110 206 pd tabdump-in; +#X msg 110 155 bang; +#X obj 110 294 list prepend 0; +#N canvas 0 0 297 272 pole 0; +#X obj 71 140 +; +#X obj 71 172 t a a; +#X obj 117 173 * 0.9; +#X obj 71 54 inlet; +#X obj 147 51 inlet; +#X obj 71 230 outlet; +#X text 72 17 one-pole filter; +#X obj 147 74 t b a; +#X msg 87 118 0; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 2 0; +#X connect 2 0 0 1; +#X connect 3 0 0 0; +#X connect 4 0 7 0; +#X connect 7 0 8 0; +#X connect 7 1 2 1; +#X connect 8 0 0 1; +#X restore 297 269 pd pole; +#X obj 269 117 hsl 64 15 0 0.99 0 0 empty empty filter-coeff -2 -8 +1 10 -262144 -1 -1 0 1; +#N canvas 0 0 297 272 zero 0; +#X obj 71 142 t a a; +#X obj 71 44 inlet; +#X obj 124 41 inlet; +#X obj 71 230 outlet; +#X text 71 20 one-zero filter; +#X obj 71 204 +; +#X obj 154 112 * -1; +#X obj 71 168 * -0.5; +#X obj 124 66 t b a; +#X msg 87 113 0; +#X connect 0 0 7 0; +#X connect 0 1 5 0; +#X connect 1 0 0 0; +#X connect 2 0 8 0; +#X connect 5 0 3 0; +#X connect 6 0 7 1; +#X connect 7 0 5 1; +#X connect 8 0 9 0; +#X connect 8 1 6 0; +#X connect 9 0 5 1; +#X restore 244 269 pd zero; +#N canvas 0 0 341 267 split 0; +#X obj 11 193 outlet; +#X obj 68 194 outlet; +#X obj 11 143 list prepend 0; +#X obj 11 169 route 0 1; +#X obj 104 110 hradio 12 1 0 2 empty empty zero 28 3 1 10 -262144 -1 +-1 0; +#X obj 11 68 inlet; +#X obj 180 33 select 0 1; +#X msg 180 62 label zero; +#X msg 211 87 label pole; +#X obj 104 38 loadbang; +#X msg 104 64 0; +#X connect 2 0 3 0; +#X connect 3 0 0 0; +#X connect 3 1 1 0; +#X connect 4 0 2 1; +#X connect 4 0 6 0; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 6 1 8 0; +#X connect 7 0 4 0; +#X connect 8 0 4 0; +#X connect 9 0 10 0; +#X connect 10 0 4 0; +#X coords 0 -1 1 1 60 30 2 100 100; +#X restore 244 217 pd split; +#X floatatom 266 139 5 0 0 0 - - -; +#N canvas 0 0 297 280 noise 0; +#X obj 33 115 random 1000; +#X obj 33 88 t b a; +#X obj 33 194 tabwrite \$0-in; +#X obj 33 143 / 500; +#X obj 33 163 - 1; +#X msg 33 44 64; +#N canvas 0 0 450 300 countto 0; +#X obj 163 151 f 0; +#X obj 190 151 + 1; +#X obj 163 109 until; +#X msg 205 111 0; +#X obj 163 180 outlet; +#X obj 163 39 inlet; +#X obj 163 87 t a b; +#X connect 0 0 1 0; +#X connect 0 0 4 0; +#X connect 1 0 0 1; +#X connect 2 0 0 0; +#X connect 3 0 0 1; +#X connect 5 0 6 0; +#X connect 6 0 2 0; +#X connect 6 1 3 0; +#X restore 33 66 pd countto; +#X obj 33 21 inlet; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 1 1 2 1; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 5 0 6 0; +#X connect 6 0 1 0; +#X connect 7 0 5 0; +#X restore 504 184 pd noise; +#X msg 504 160 make noise; +#X obj 266 158 t b a a; +#X msg 439 324 const 0; +#X obj 439 365 s \$0-in; +#X obj 440 390 s \$0-out; +#X msg 500 324 const 0 \, 16 1; +#X text 498 308 impulse; +#X text 112 34 This is a more complex example showing how to apply +a set of elementary filters on a list of floats. Try playing with the +coeff-slider and switch between pole and zero operation.; +#X obj 110 236 list-map; +#X connect 3 0 20 0; +#X connect 4 0 3 0; +#X connect 5 0 2 0; +#X connect 6 0 20 1; +#X connect 7 0 10 0; +#X connect 8 0 20 1; +#X connect 9 0 8 0; +#X connect 9 1 6 0; +#X connect 10 0 13 0; +#X connect 12 0 11 0; +#X connect 13 0 3 0; +#X connect 13 1 8 1; +#X connect 13 2 6 1; +#X connect 14 0 15 0; +#X connect 14 0 16 0; +#X connect 17 0 15 0; +#X connect 20 0 5 0; +#X connect 20 1 9 0; +#X restore 330 556 pd filters; +#X text 67 596 2007 Frank Barknecht \, original idea by IOhannes m +zmoelnig and Thomas Musil.; +#X obj 313 282 list-map; +#X obj 72 441 list-map; +#X msg 71 391 bang; +#X text 64 52 Calls a user-defined operation for each of the incoming +list's items and returns a list of the return values.; +#X text 64 90 [list-map] is a helper abstraction to make element-wise +operations on lists easy to patch. The basic idea is to bundle a list-serializer +and a list-repacker into one object. Then you connect whatever operation +should be applied on every list item to the right outlet and send the +modified items back to the right inlet. Here the modified elements +get packed into a list again and sent to the left outlet of [list-map]. +; +#X obj 315 430 list-map; +#X obj 315 472 list trim; +#X obj 315 452 list prepend set; +#X obj 387 430 pow 3; +#X floatatom 417 407 5 0 0 0 - - -; +#X msg 315 405 1 2 3 4 5; +#X msg 315 494; +#N canvas 510 66 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 155 AUTHOR Frank Barknecht; +#X text 12 175 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 75 INLET_0 anything; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION call a user-defined operation for each of +the incoming list's items and return a list of the return values; +#X text 12 95 INLET_1 anything; +#X text 12 115 OUTLET_0 list; +#X text 12 135 OUTLET_1 float symbol pointer; +#X restore 533 611 pd META; +#X connect 0 0 6 0; +#X connect 0 1 2 0; +#X connect 0 1 5 0; +#X connect 2 0 0 1; +#X connect 3 0 2 1; +#X connect 4 0 0 0; +#X connect 7 0 25 0; +#X connect 10 0 14 1; +#X connect 11 0 0 0; +#X connect 12 0 0 1; +#X connect 13 0 0 1; +#X connect 14 0 25 1; +#X connect 15 0 25 0; +#X connect 16 0 26 0; +#X connect 17 0 19 0; +#X connect 18 0 17 0; +#X connect 20 0 26 1; +#X connect 21 0 19 0; +#X connect 25 0 9 0; +#X connect 25 1 8 0; +#X connect 25 1 14 0; +#X connect 26 0 18 0; +#X connect 26 1 20 0; +#X connect 27 0 26 0; +#X connect 30 0 32 0; +#X connect 30 1 33 0; +#X connect 31 0 36 0; +#X connect 32 0 31 0; +#X connect 33 0 30 1; +#X connect 34 0 33 1; +#X connect 35 0 30 0; diff --git a/list-abs/list-map.pd b/list-abs/list-map.pd new file mode 100755 index 0000000..b455567 --- /dev/null +++ b/list-abs/list-map.pd @@ -0,0 +1,31 @@ +#N canvas 470 232 489 423 10; +#X obj 86 33 inlet; +#X obj 275 52 inlet; +#X obj 151 352 outlet; +#X obj 170 248 outlet; +#X obj 151 317 list; +#X obj 170 215 list-drip; +#X obj 275 215 list prepend; +#X obj 354 185 t a; +#X obj 151 155 t b a a b; +#X obj 86 58 route bang; +#X obj 86 83 b; +#X obj 151 84 t b a; +#X obj 151 124 list; +#X connect 0 0 9 0; +#X connect 1 0 6 0; +#X connect 4 0 2 0; +#X connect 5 0 3 0; +#X connect 6 0 7 0; +#X connect 6 0 4 1; +#X connect 7 0 6 1; +#X connect 8 0 4 0; +#X connect 8 1 5 0; +#X connect 8 2 4 1; +#X connect 8 3 6 1; +#X connect 9 0 10 0; +#X connect 9 1 11 0; +#X connect 10 0 12 0; +#X connect 11 0 12 0; +#X connect 11 1 12 1; +#X connect 12 0 8 0; diff --git a/list-abs/list-map2-help.pd b/list-abs/list-map2-help.pd new file mode 100755 index 0000000..27b40d2 --- /dev/null +++ b/list-abs/list-map2-help.pd @@ -0,0 +1,452 @@ +#N canvas 0 31 725 634 10; +#X obj 135 300 spigot; +#X obj 171 283 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 +1; +#X obj 67 366 print MAIN; +#X obj 381 329 print SERIALIZED; +#X obj 323 358 print MAIN; +#X msg 67 235 bang; +#X msg 131 256 a b c; +#X msg 323 224 bang; +#X msg 72 427 0 1 2 3; +#X obj 72 516 list trim; +#X obj 72 496 list prepend set; +#X obj 158 451 list append -|-; +#X msg 227 521 set; +#X msg 71 401 bang; +#X obj 325 512 list trim; +#X obj 325 492 list prepend set; +#X msg 325 425 1 2 3 4 5; +#X obj 323 292 list-map2; +#X obj 411 292 +; +#X msg 352 269 10 20 30 40; +#X msg 323 248 1 2 3 4; +#X msg 130 429 a b c d; +#X obj 67 300 list-map2; +#X obj 325 470 list-map2; +#X obj 72 451 list-map2; +#X msg 354 446 2 0; +#X obj 397 470 *; +#X text 64 57 Calls a user-defined operation for each pair of elements +of two incoming lists and returns a list of the return values.; +#X obj 125 339 print SERIALIZED_PAIRS; +#X text 64 100 [list-map2] is a helper abstraction to make element-wise +operations on two lists easy to patch. The basic idea is to bundle +two list-serializers and a list-repacker into one object. Then you +connect whatever operation should be applied on every pair of list +items to the right outlet and send the modified items back to the right +inlet. Here the modified elements get packed into a list again and +sent to the left outlet of [list-map2].; +#N canvas 239 121 843 692 more-examples 0; +#N canvas 0 0 450 300 (subpatch) 0; +#X array \$0-in1 64 float 0; +#X coords 0 1 63 -1 128 60 1; +#X restore 366 91 graph; +#N canvas 0 0 450 300 (subpatch) 0; +#X array \$0-in2 64 float 0; +#X coords 0 1 63 -1 128 60 1; +#X restore 508 91 graph; +#X msg 68 83 bang; +#N canvas 0 0 297 280 noise 0; +#X obj 33 115 random 1000; +#X obj 33 88 t b a; +#X obj 33 143 / 500; +#X obj 33 163 - 1; +#X msg 33 44 64; +#N canvas 0 0 450 300 countto 0; +#X obj 163 151 f 0; +#X obj 190 151 + 1; +#X obj 163 109 until; +#X msg 205 111 0; +#X obj 163 180 outlet; +#X obj 163 39 inlet; +#X obj 163 87 t a b; +#X connect 0 0 1 0; +#X connect 0 0 4 0; +#X connect 1 0 0 1; +#X connect 2 0 0 0; +#X connect 3 0 0 1; +#X connect 5 0 6 0; +#X connect 6 0 2 0; +#X connect 6 1 3 0; +#X restore 33 66 pd countto; +#X obj 33 21 inlet; +#X obj 33 194 tabwrite \$0-in2; +#X connect 0 0 2 0; +#X connect 1 0 0 0; +#X connect 1 1 7 1; +#X connect 2 0 3 0; +#X connect 3 0 7 0; +#X connect 4 0 5 0; +#X connect 5 0 1 0; +#X connect 6 0 4 0; +#X restore 508 52 pd noise; +#X msg 508 28 make noise; +#X msg 527 184 const 0; +#X obj 527 280 s \$0-out; +#X text 586 168 impulse; +#X obj 149 164 list-map2; +#N canvas 414 307 598 380 tabdump-ins 0; +#X obj 187 213 list prepend; +#X obj 278 213 t a; +#X obj 125 254 list; +#X obj 125 23 inlet; +#X obj 125 279 outlet; +#X msg 187 92 64; +#N canvas 0 0 450 300 countto 0; +#X obj 163 151 f 0; +#X obj 190 151 + 1; +#X obj 163 109 until; +#X msg 205 111 0; +#X obj 163 180 outlet; +#X obj 163 39 inlet; +#X obj 163 87 t a b; +#X connect 0 0 1 0; +#X connect 0 0 4 0; +#X connect 1 0 0 1; +#X connect 2 0 0 0; +#X connect 3 0 0 1; +#X connect 5 0 6 0; +#X connect 6 0 2 0; +#X connect 6 1 3 0; +#X restore 187 114 pd countto; +#X obj 187 136 t a a; +#X obj 320 213 list prepend; +#X obj 411 213 t a; +#X obj 320 190 tabread \$0-in2; +#X obj 187 190 tabread \$0-in1; +#X obj 187 256 list; +#X obj 187 281 outlet; +#X obj 125 46 t b b b b b; +#X connect 0 0 2 1; +#X connect 0 0 1 0; +#X connect 1 0 0 1; +#X connect 2 0 4 0; +#X connect 3 0 14 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 7 0 11 0; +#X connect 7 1 10 0; +#X connect 8 0 9 0; +#X connect 8 0 12 1; +#X connect 9 0 8 1; +#X connect 10 0 8 0; +#X connect 11 0 0 0; +#X connect 12 0 13 0; +#X connect 14 0 2 0; +#X connect 14 1 12 0; +#X connect 14 2 5 0; +#X connect 14 3 0 1; +#X connect 14 4 8 1; +#X restore 149 134 pd tabdump-ins; +#N canvas 0 0 450 300 (subpatch) 0; +#X array \$0-out-max 64 float 0; +#X coords 0 1 63 -1 128 60 1; +#X restore 363 174 graph; +#X obj 149 192 list prepend 0; +#X obj 527 225 s \$0-in1; +#X msg 588 184 const 0 \, 16 1; +#X obj 231 165 max; +#X obj 527 249 s \$0-in2; +#N canvas 0 0 450 300 (subpatch) 0; +#X array \$0-out-min 64 float 0; +#X coords 0 1 63 -1 128 60 1; +#X restore 364 274 graph; +#N canvas 0 0 450 300 (subpatch) 0; +#X array \$0-out-mul 64 float 0; +#X coords 0 1 63 -1 128 60 1; +#X restore 364 398 graph; +#X obj 150 277 list-map2; +#X obj 150 305 list prepend 0; +#X obj 150 327 s \$0-out-min; +#X obj 232 278 min; +#X obj 150 390 list-map2; +#X obj 150 418 list prepend 0; +#X obj 232 391 *; +#X obj 150 440 s \$0-out-mul; +#X obj 149 214 s \$0-out-max; +#N canvas 414 307 598 380 tabdump-ins 0; +#X obj 187 213 list prepend; +#X obj 278 213 t a; +#X obj 125 254 list; +#X obj 125 23 inlet; +#X obj 125 279 outlet; +#X msg 187 92 64; +#N canvas 0 0 450 300 countto 0; +#X obj 163 151 f 0; +#X obj 190 151 + 1; +#X obj 163 109 until; +#X msg 205 111 0; +#X obj 163 180 outlet; +#X obj 163 39 inlet; +#X obj 163 87 t a b; +#X connect 0 0 1 0; +#X connect 0 0 4 0; +#X connect 1 0 0 1; +#X connect 2 0 0 0; +#X connect 3 0 0 1; +#X connect 5 0 6 0; +#X connect 6 0 2 0; +#X connect 6 1 3 0; +#X restore 187 114 pd countto; +#X obj 187 136 t a a; +#X obj 320 213 list prepend; +#X obj 411 213 t a; +#X obj 320 190 tabread \$0-in2; +#X obj 187 190 tabread \$0-in1; +#X obj 187 256 list; +#X obj 187 281 outlet; +#X obj 125 46 t b b b b b; +#X connect 0 0 2 1; +#X connect 0 0 1 0; +#X connect 1 0 0 1; +#X connect 2 0 4 0; +#X connect 3 0 14 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 7 0 11 0; +#X connect 7 1 10 0; +#X connect 8 0 9 0; +#X connect 8 0 12 1; +#X connect 9 0 8 1; +#X connect 10 0 8 0; +#X connect 11 0 0 0; +#X connect 12 0 13 0; +#X connect 14 0 2 0; +#X connect 14 1 12 0; +#X connect 14 2 5 0; +#X connect 14 3 0 1; +#X connect 14 4 8 1; +#X restore 150 252 pd tabdump-ins; +#N canvas 414 307 598 380 tabdump-ins 0; +#X obj 187 213 list prepend; +#X obj 278 213 t a; +#X obj 125 254 list; +#X obj 125 23 inlet; +#X obj 125 279 outlet; +#X msg 187 92 64; +#N canvas 0 0 450 300 countto 0; +#X obj 163 151 f 0; +#X obj 190 151 + 1; +#X obj 163 109 until; +#X msg 205 111 0; +#X obj 163 180 outlet; +#X obj 163 39 inlet; +#X obj 163 87 t a b; +#X connect 0 0 1 0; +#X connect 0 0 4 0; +#X connect 1 0 0 1; +#X connect 2 0 0 0; +#X connect 3 0 0 1; +#X connect 5 0 6 0; +#X connect 6 0 2 0; +#X connect 6 1 3 0; +#X restore 187 114 pd countto; +#X obj 187 136 t a a; +#X obj 320 213 list prepend; +#X obj 411 213 t a; +#X obj 320 190 tabread \$0-in2; +#X obj 187 190 tabread \$0-in1; +#X obj 187 256 list; +#X obj 187 281 outlet; +#X obj 125 46 t b b b b b; +#X connect 0 0 2 1; +#X connect 0 0 1 0; +#X connect 1 0 0 1; +#X connect 2 0 4 0; +#X connect 3 0 14 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 7 0 11 0; +#X connect 7 1 10 0; +#X connect 8 0 9 0; +#X connect 8 0 12 1; +#X connect 9 0 8 1; +#X connect 10 0 8 0; +#X connect 11 0 0 0; +#X connect 12 0 13 0; +#X connect 14 0 2 0; +#X connect 14 1 12 0; +#X connect 14 2 5 0; +#X connect 14 3 0 1; +#X connect 14 4 8 1; +#X restore 150 365 pd tabdump-ins; +#N canvas 0 0 450 300 (subpatch) 0; +#X array \$0-out-xfade 64 float 0; +#X coords 0 1 63 -1 128 60 1; +#X restore 365 534 graph; +#X obj 151 582 list-map2; +#X obj 151 610 list prepend 0; +#N canvas 414 307 598 380 tabdump-ins 0; +#X obj 187 213 list prepend; +#X obj 278 213 t a; +#X obj 125 254 list; +#X obj 125 23 inlet; +#X obj 125 279 outlet; +#X msg 187 92 64; +#N canvas 0 0 450 300 countto 0; +#X obj 163 151 f 0; +#X obj 190 151 + 1; +#X obj 163 109 until; +#X msg 205 111 0; +#X obj 163 180 outlet; +#X obj 163 39 inlet; +#X obj 163 87 t a b; +#X connect 0 0 1 0; +#X connect 0 0 4 0; +#X connect 1 0 0 1; +#X connect 2 0 0 0; +#X connect 3 0 0 1; +#X connect 5 0 6 0; +#X connect 6 0 2 0; +#X connect 6 1 3 0; +#X restore 187 114 pd countto; +#X obj 187 136 t a a; +#X obj 320 213 list prepend; +#X obj 411 213 t a; +#X obj 320 190 tabread \$0-in2; +#X obj 187 190 tabread \$0-in1; +#X obj 187 256 list; +#X obj 187 281 outlet; +#X obj 125 46 t b b b b b; +#X connect 0 0 2 1; +#X connect 0 0 1 0; +#X connect 1 0 0 1; +#X connect 2 0 4 0; +#X connect 3 0 14 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 7 0 11 0; +#X connect 7 1 10 0; +#X connect 8 0 9 0; +#X connect 8 0 12 1; +#X connect 9 0 8 1; +#X connect 10 0 8 0; +#X connect 11 0 0 0; +#X connect 12 0 13 0; +#X connect 14 0 2 0; +#X connect 14 1 12 0; +#X connect 14 2 5 0; +#X connect 14 3 0 1; +#X connect 14 4 8 1; +#X restore 151 529 pd tabdump-ins; +#X obj 151 632 s \$0-out-xfade; +#X obj 154 487 hsl 64 15 0 1 0 0 empty empty crossfade_0-1 -2 -8 1 +10 -262144 -1 -1 0 1; +#X obj 151 506 t b a; +#N canvas 0 0 450 300 xfade 0; +#X obj 54 131 -; +#X obj 54 155 * 0.5; +#X obj 54 182 +; +#X obj 104 48 inlet; +#X obj 54 48 inlet; +#X obj 54 206 outlet; +#X obj 54 81 unpack 0 0; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 1 1; +#X connect 4 0 6 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 1 2 1; +#X restore 234 582 pd xfade; +#X obj 258 520 hsl 64 15 0 1 0 0 empty empty crossfade_0-1 -2 -8 1 +10 -262144 -1 -1 0 1; +#X obj 255 539 t b a; +#X obj 298 640 list-inter; +#X text 272 622 this is similar to:; +#X connect 2 0 9 0; +#X connect 2 0 27 0; +#X connect 2 0 28 0; +#X connect 2 0 32 0; +#X connect 4 0 3 0; +#X connect 5 0 6 0; +#X connect 5 0 12 0; +#X connect 5 0 15 0; +#X connect 8 0 11 0; +#X connect 8 1 14 0; +#X connect 9 0 8 0; +#X connect 9 1 8 1; +#X connect 11 0 26 0; +#X connect 13 0 12 0; +#X connect 14 0 8 2; +#X connect 18 0 19 0; +#X connect 18 1 21 0; +#X connect 19 0 20 0; +#X connect 21 0 18 2; +#X connect 22 0 23 0; +#X connect 22 1 24 0; +#X connect 23 0 25 0; +#X connect 24 0 22 2; +#X connect 27 0 18 0; +#X connect 27 1 18 1; +#X connect 28 0 22 0; +#X connect 28 1 22 1; +#X connect 30 0 31 0; +#X connect 30 1 36 0; +#X connect 31 0 33 0; +#X connect 32 0 30 0; +#X connect 32 1 30 1; +#X connect 34 0 35 0; +#X connect 35 0 32 0; +#X connect 35 1 36 1; +#X connect 36 0 30 2; +#X connect 37 0 38 0; +#X connect 38 0 30 0; +#X connect 38 1 36 1; +#X restore 69 575 pd more-examples; +#X text 67 217 bang will redo the last two lists; +#X text 324 391 If the second list is too short \, its final element +will be repeated:; +#X text 65 22 [list-map2] - map an operation on element pairs from +two lists.; +#X text 67 606 2007 Frank Barknecht; +#N canvas 510 66 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 165 AUTHOR Frank Barknecht; +#X text 12 185 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 85 INLET_1 anything; +#X text 12 125 OUTLET_0 list; +#X text 12 45 DESCRIPTION map an operation on element pairs from two +lists; +#X text 12 65 INLET_0 bang anything; +#X text 12 105 INLET_2 anything; +#X text 12 145 OUTLET_1 list; +#X restore 663 601 pd META; +#X msg 325 534; +#X msg 72 538; +#X msg 67 256 1 2 3 4; +#X connect 0 0 22 2; +#X connect 1 0 0 1; +#X connect 5 0 22 0; +#X connect 6 0 22 1; +#X connect 7 0 17 0; +#X connect 8 0 24 0; +#X connect 9 0 37 0; +#X connect 10 0 9 0; +#X connect 11 0 24 2; +#X connect 12 0 37 0; +#X connect 13 0 24 0; +#X connect 14 0 36 0; +#X connect 15 0 14 0; +#X connect 16 0 23 0; +#X connect 17 0 4 0; +#X connect 17 1 3 0; +#X connect 17 1 18 0; +#X connect 18 0 17 2; +#X connect 19 0 17 1; +#X connect 20 0 17 0; +#X connect 21 0 24 1; +#X connect 22 0 2 0; +#X connect 22 1 0 0; +#X connect 22 1 28 0; +#X connect 23 0 15 0; +#X connect 23 1 26 0; +#X connect 24 0 10 0; +#X connect 24 1 11 0; +#X connect 25 0 23 1; +#X connect 26 0 23 2; +#X connect 38 0 22 0; diff --git a/list-abs/list-map2.pd b/list-abs/list-map2.pd new file mode 100755 index 0000000..8901c74 --- /dev/null +++ b/list-abs/list-map2.pd @@ -0,0 +1,39 @@ +#N canvas 470 232 489 423 10; +#X obj 86 33 inlet; +#X obj 300 34 inlet; +#X obj 151 352 outlet; +#X obj 169 269 outlet; +#X obj 151 317 list; +#X obj 300 215 list prepend; +#X obj 379 185 t a; +#X obj 86 58 route bang; +#X obj 86 83 b; +#X obj 151 84 t b a; +#X obj 151 124 list; +#X obj 169 215 list-drip2; +#X obj 169 243 list; +#X obj 258 33 inlet; +#X obj 234 192 list; +#X obj 151 155 t b a a b b; +#X connect 0 0 7 0; +#X connect 1 0 5 0; +#X connect 4 0 2 0; +#X connect 5 0 6 0; +#X connect 5 0 4 1; +#X connect 6 0 5 1; +#X connect 7 0 8 0; +#X connect 7 1 9 0; +#X connect 8 0 10 0; +#X connect 9 0 10 0; +#X connect 9 1 10 1; +#X connect 10 0 15 0; +#X connect 11 0 12 0; +#X connect 11 1 12 1; +#X connect 12 0 3 0; +#X connect 13 0 14 1; +#X connect 14 0 11 1; +#X connect 15 0 4 0; +#X connect 15 1 11 0; +#X connect 15 2 4 1; +#X connect 15 3 14 0; +#X connect 15 4 5 1; diff --git a/list-abs/list-math-help.pd b/list-abs/list-math-help.pd new file mode 100755 index 0000000..e621b8c --- /dev/null +++ b/list-abs/list-math-help.pd @@ -0,0 +1,57 @@ +#N canvas 0 31 618 551 10; +#X obj 100 259 print L; +#X msg 100 194 1 2 3 4 a b c; +#X floatatom 210 193 5 0 0 0 - - -; +#X obj 344 263 print L; +#X msg 344 198 1 2 3 4 a b c; +#X floatatom 454 197 5 0 0 0 - - -; +#X obj 104 365 print L; +#X msg 104 300 1 2 3 4 a b c; +#X floatatom 214 299 5 0 0 0 - - -; +#X obj 100 226 list-math *; +#X msg 99 167 1 2 3 4 a b c \, 10 20 30 x y z; +#X text 72 87 Use as "list-math operator" where operator is some binary +operator \, that expr can understand \, like + \, - \, * or /; +#X obj 346 373 print L; +#X msg 346 308 1 2 3 4 a b c; +#X floatatom 456 307 5 0 0 0 - - -; +#X obj 72 31 cnv 15 140 30 empty empty list-math 20 12 0 14 -233017 +-66577 0; +#X text 232 40 simple mathematical operations on lists.; +#X obj 344 230 list-math +; +#X obj 104 332 list-math /; +#X obj 346 340 list-math -; +#X msg 346 416 1 2 3 4 a b c; +#X floatatom 456 415 5 0 0 0 - - -; +#X obj 346 448 list-math - 2; +#X obj 346 481 print L-with-arg; +#X text 189 448 Using a default arg:; +#X text 71 125 A second argument is accepted to set a default scalar +to use.; +#N canvas 510 66 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 65 INLET_0 anything; +#X text 12 5 KEYWORDS control list_op; +#X text 12 105 OUTLET_0 list; +#X text 12 45 DESCRIPTION simple mathematical operations on lists; +#X text 12 85 INLET_1 float; +#X restore 556 521 pd META; +#X connect 1 0 9 0; +#X connect 2 0 9 1; +#X connect 4 0 17 0; +#X connect 5 0 17 1; +#X connect 7 0 18 0; +#X connect 8 0 18 1; +#X connect 9 0 0 0; +#X connect 10 0 9 0; +#X connect 13 0 19 0; +#X connect 14 0 19 1; +#X connect 17 0 3 0; +#X connect 18 0 6 0; +#X connect 19 0 12 0; +#X connect 20 0 22 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; diff --git a/list-abs/list-math.pd b/list-abs/list-math.pd new file mode 100755 index 0000000..591a423 --- /dev/null +++ b/list-abs/list-math.pd @@ -0,0 +1,16 @@ +#N canvas 424 89 462 324 10; +#X obj 55 58 inlet; +#X obj 55 235 outlet; +#X text 44 16 Use as "list-math operator" where operator is some binary +operator \, expr can understand.; +#X obj 55 136 list-map; +#X obj 152 208 \$1 \$2; +#X obj 182 134 inlet; +#X obj 152 97 route float; +#X connect 0 0 3 0; +#X connect 3 0 1 0; +#X connect 3 1 6 0; +#X connect 4 0 3 1; +#X connect 5 0 4 1; +#X connect 6 0 4 0; +#X connect 6 1 3 1; diff --git a/list-abs/list-mean-help.pd b/list-abs/list-mean-help.pd new file mode 100755 index 0000000..7c99ed5 --- /dev/null +++ b/list-abs/list-mean-help.pd @@ -0,0 +1,196 @@ +#N struct 1114-dial float y; +#N canvas 0 31 534 466 10; +#X obj 98 306 list-mean; +#N canvas 0 0 450 300 randlist 0; +#X obj 134 129 until; +#X msg 246 151 set; +#X msg 134 193 add2 \$1; +#X obj 112 101 t b f b; +#X obj 135 249 outlet; +#X obj 112 31 inlet; +#X obj 112 73 + 1; +#X obj 112 53 random 10; +#X obj 134 151 random 10; +#X obj 134 171 - 5; +#X connect 0 0 8 0; +#X connect 1 0 4 0; +#X connect 2 0 4 0; +#X connect 3 0 4 0; +#X connect 3 1 0 0; +#X connect 3 2 1 0; +#X connect 5 0 7 0; +#X connect 6 0 3 0; +#X connect 7 0 6 0; +#X connect 8 0 9 0; +#X connect 9 0 2 0; +#X restore 153 236 pd randlist; +#X msg 153 214 bang; +#X floatatom 98 340 5 0 0 1 arithmetric_mean - -; +#X text 86 22 [list-mean]; +#X msg 153 262 4 -3 -4 1 2 -3; +#X msg 98 159 1 2 3 4; +#X msg 98 185 any symbols 1 2 3 4 are ignored; +#X text 96 117 Non-floats in a list are silently dropped.; +#X text 114 82 mean = sum(f[i]) / total number of floats; +#X text 96 42 Calculates the arithmetric mean of a list (of floats) +according to:; +#N canvas 318 53 648 574 graphical-mean 0; +#N canvas 0 0 450 300 randlist 0; +#X obj 134 129 until; +#X msg 246 151 set; +#X msg 134 213 add2 \$1; +#X obj 112 101 t b f b; +#X obj 135 249 outlet; +#X obj 112 31 inlet; +#X obj 134 151 random 100; +#X msg 112 59 10; +#X obj 134 191 / 10; +#X obj 134 170 + 1; +#X connect 0 0 6 0; +#X connect 1 0 4 0; +#X connect 2 0 4 0; +#X connect 3 0 4 0; +#X connect 3 1 0 0; +#X connect 3 2 1 0; +#X connect 5 0 7 0; +#X connect 6 0 9 0; +#X connect 7 0 3 0; +#X connect 8 0 2 0; +#X connect 9 0 8 0; +#X restore 79 388 pd randlist; +#X msg 79 366 bang; +#X obj 79 447 list prepend 0; +#X obj 79 500 s \$0-tab; +#N canvas 0 0 450 300 (subpatch) 0; +#X array \$0-tab 10 float 0; +#X coords 0 10 9 0 200 140 1; +#X restore 75 152 graph; +#N canvas 0 0 916 918 \$0-c 0; +#X scalar 1114-dial 0 \;; +#X coords 0 0 200 140 200 140 1; +#X restore 75 152 pd \$0-c; +#N canvas 0 0 503 429 create 0; +#X msg 242 258 traverse pd-\$1 \, bang; +#X obj 242 238 symbol \$0-c; +#X msg 107 79 0; +#X obj 242 278 pointer; +#X msg 243 178 clear; +#X obj 243 205 s pd-\$0-c; +#X obj 107 114 t a b b; +#X obj 107 50 loadbang; +#X obj 107 326 outlet; +#X obj 107 302 append \$0-dial y; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 2 0 6 0; +#X connect 3 0 9 1; +#X connect 4 0 5 0; +#X connect 6 0 9 0; +#X connect 6 1 1 0; +#X connect 6 2 4 0; +#X connect 7 0 2 0; +#X connect 9 0 8 0; +#X restore 468 339 pd create; +#X obj 339 127 metro 50; +#X obj 339 102 tgl 15 0 empty empty show-mean 17 7 1 10 -258699 -262144 +-1 0 1; +#N canvas 473 338 450 300 countto 0; +#X obj 131 154 f 0; +#X obj 156 153 + 1; +#X msg 174 113 0; +#X obj 131 183 outlet; +#X obj 131 59 inlet; +#X obj 131 116 until; +#X obj 131 96 t a b; +#X connect 0 0 1 0; +#X connect 0 0 3 0; +#X connect 1 0 0 1; +#X connect 2 0 0 1; +#X connect 4 0 6 0; +#X connect 5 0 0 0; +#X connect 6 0 5 0; +#X connect 6 1 2 0; +#X restore 362 195 pd countto; +#X obj 362 219 tabread \$0-tab; +#X obj 362 249 list prepend; +#X obj 452 249 t a; +#X msg 362 175 10; +#X obj 339 148 t b b b; +#X obj 339 274 list; +#X obj 79 344 loadbang; +#X msg 79 414 0.6 6.9 3.6 5.6 0.7 3.8 3.9 5.3 9.2 9.2; +#X text 77 30 Switch on the "show"-metro and play with the values in +the array.; +#N canvas 336 319 712 355 \$0-dial 0; +#X obj 19 119 outlet; +#X obj 19 86 route change; +#X obj 19 62 struct \$0-dial float y; +#X obj 229 62 drawpolygon 900 2 0 y 200 y; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X restore 453 315 pd \$0-dial; +#X msg 213 469 bounds 0 10 9 0; +#X obj 213 449 loadbang; +#X obj 339 313 list-mean; +#X obj 339 388 set \$0-dial y; +#X floatatom 339 339 5 0 0 0 - - -; +#X msg 92 469 const 5; +#N canvas 0 0 299 354 scale 0; +#X msg 74 83 10 \$1; +#X obj 74 107 -; +#X obj 74 158 * 140; +#X obj 74 134 / 20; +#X obj 74 49 inlet; +#X obj 74 182 outlet; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 2 0 5 0; +#X connect 3 0 2 0; +#X connect 4 0 0 0; +#X restore 339 363 pd scale; +#X connect 0 0 17 0; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 6 0 23 1; +#X connect 7 0 14 0; +#X connect 8 0 7 0; +#X connect 9 0 10 0; +#X connect 10 0 11 0; +#X connect 11 0 12 0; +#X connect 11 0 15 1; +#X connect 12 0 11 1; +#X connect 13 0 9 0; +#X connect 14 0 15 0; +#X connect 14 1 13 0; +#X connect 14 2 11 1; +#X connect 15 0 22 0; +#X connect 16 0 1 0; +#X connect 17 0 2 0; +#X connect 19 0 23 1; +#X connect 20 0 3 0; +#X connect 21 0 20 0; +#X connect 22 0 24 0; +#X connect 24 0 26 0; +#X connect 25 0 3 0; +#X connect 26 0 23 0; +#X restore 97 363 pd graphical-mean; +#X text 101 394 More means:; +#X obj 192 394 list-geometric-mean; +#X obj 192 415 list-harmonic-mean; +#N canvas 510 66 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 115 AUTHOR Frank Barknecht; +#X text 12 135 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 75 INLET_0 anything; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION calculate the arithmetric mean of a list +of floats; +#X text 12 95 OUTLET_0 float; +#X restore 466 421 pd META; +#X connect 0 0 3 0; +#X connect 1 0 5 0; +#X connect 2 0 1 0; +#X connect 5 0 0 0; +#X connect 6 0 0 0; +#X connect 7 0 0 0; diff --git a/list-abs/list-mean.pd b/list-abs/list-mean.pd new file mode 100755 index 0000000..f561c11 --- /dev/null +++ b/list-abs/list-mean.pd @@ -0,0 +1,52 @@ +#N canvas 0 0 457 428 10; +#X obj 127 69 inlet; +#X obj 127 337 outlet; +#X obj 146 138 list-drip; +#X obj 146 164 route float; +#X obj 127 274 f; +#X obj 127 308 /; +#X obj 146 189 t a b; +#N canvas 370 313 450 300 accum 0; +#X obj 182 102 0; +#X obj 135 79 inlet; +#X obj 182 79 inlet; +#X obj 135 169 outlet; +#X obj 135 137 +; +#X obj 168 138 f; +#X connect 0 0 4 1; +#X connect 1 0 4 0; +#X connect 2 0 0 0; +#X connect 4 0 3 0; +#X connect 4 0 5 0; +#X connect 5 0 4 1; +#X restore 146 224 pd accum; +#N canvas 425 298 450 300 count 0; +#X obj 133 59 b; +#X obj 133 35 inlet; +#X obj 183 35 inlet; +#X obj 164 111 + 1; +#X obj 133 133 outlet; +#X msg 183 71 1; +#X obj 133 110 f 1; +#X connect 0 0 6 0; +#X connect 1 0 0 0; +#X connect 2 0 5 0; +#X connect 3 0 6 1; +#X connect 5 0 6 1; +#X connect 6 0 3 0; +#X connect 6 0 4 0; +#X restore 229 227 pd count; +#X obj 127 105 t b a b b; +#X connect 0 0 9 0; +#X connect 2 0 3 0; +#X connect 3 0 6 0; +#X connect 4 0 5 0; +#X connect 5 0 1 0; +#X connect 6 0 7 0; +#X connect 6 1 8 0; +#X connect 7 0 4 1; +#X connect 8 0 5 1; +#X connect 9 0 4 0; +#X connect 9 1 2 0; +#X connect 9 2 7 1; +#X connect 9 3 8 1; diff --git a/list-abs/list-minmax-help.pd b/list-abs/list-minmax-help.pd new file mode 100755 index 0000000..09a76c5 --- /dev/null +++ b/list-abs/list-minmax-help.pd @@ -0,0 +1,41 @@ +#N canvas 0 31 626 365 10; +#X floatatom 254 271 5 0 0 0 min - -; +#X floatatom 326 271 5 0 0 0 max - -; +#X obj 254 138 random 100; +#X obj 254 116 until; +#X msg 366 138 set; +#X msg 232 61 10; +#X msg 254 160 add2 \$1; +#X obj 232 88 t b f b; +#X msg 254 203 41 49 75 14 47 94 89 87 30 87; +#X text 178 28 list-minmax: find minimum and maximum float in a list. +; +#X msg 141 201 2; +#X text 140 178 special cases; +#X obj 254 234 list-minmax; +#X msg 179 202 11 2 2 2; +#N canvas 510 66 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 85 OUTLET_0 float; +#X text 12 45 DESCRIPTION find minimum and maximum float in a list +; +#X text 12 65 INLET_0 list; +#X text 12 105 OUTLET_1 float; +#X restore 566 331 pd META; +#X connect 2 0 6 0; +#X connect 3 0 2 0; +#X connect 4 0 8 0; +#X connect 5 0 7 0; +#X connect 6 0 8 0; +#X connect 7 0 8 0; +#X connect 7 1 3 0; +#X connect 7 2 4 0; +#X connect 8 0 12 0; +#X connect 10 0 12 0; +#X connect 12 0 0 0; +#X connect 12 1 1 0; +#X connect 13 0 12 0; diff --git a/list-abs/list-minmax.pd b/list-abs/list-minmax.pd new file mode 100755 index 0000000..a5f5890 --- /dev/null +++ b/list-abs/list-minmax.pd @@ -0,0 +1,53 @@ +#N canvas 385 204 676 470 10; +#X obj 128 97 list-drip; +#X obj 128 120 route float; +#X obj 159 256 f; +#X obj 106 394 outlet; +#X obj 165 369 f; +#X obj 165 396 outlet; +#X obj 106 305 t b b; +#X obj 106 10 inlet; +#X obj 106 366 f; +#N canvas 0 0 450 300 once 0; +#X obj 110 75 inlet; +#X obj 105 187 spigot 1; +#X obj 110 104 t b f; +#X msg 125 151 0; +#X msg 165 99 1; +#X obj 165 63 inlet; +#X obj 102 219 outlet; +#X connect 0 0 2 0; +#X connect 1 0 6 0; +#X connect 2 0 3 0; +#X connect 2 1 1 0; +#X connect 3 0 1 1; +#X connect 4 0 1 1; +#X connect 5 0 4 0; +#X restore 260 183 pd once; +#X obj 275 258 f; +#X obj 244 257 max; +#X obj 128 256 min; +#X obj 128 150 t a a a; +#X obj 106 30 t b a b; +#X text 321 183 prime [min] and [max] with first item once; +#X connect 0 0 1 0; +#X connect 1 0 13 0; +#X connect 2 0 12 1; +#X connect 4 0 5 0; +#X connect 6 0 8 0; +#X connect 6 1 4 0; +#X connect 7 0 14 0; +#X connect 8 0 3 0; +#X connect 9 0 11 1; +#X connect 9 0 12 1; +#X connect 10 0 11 1; +#X connect 11 0 10 0; +#X connect 11 0 4 1; +#X connect 12 0 2 0; +#X connect 12 0 8 1; +#X connect 13 0 12 0; +#X connect 13 1 11 0; +#X connect 13 2 9 0; +#X connect 14 0 6 0; +#X connect 14 1 0 0; +#X connect 14 2 9 1; diff --git a/list-abs/list-moses-help.pd b/list-abs/list-moses-help.pd new file mode 100755 index 0000000..95aae6e --- /dev/null +++ b/list-abs/list-moses-help.pd @@ -0,0 +1,41 @@ +#N canvas 0 31 691 397 10; +#X floatatom 95 93 5 0 0 0 - - -; +#X obj 95 355 print smaller; +#X obj 141 332 print bigger-or-equal; +#X floatatom 141 227 5 0 0 2 split-value - -; +#X text 57 38 list-moses: like [moses] for lists. Additionally you +can set the element index \, at which to compare \, if it is bigger +or smaller than the stored value.; +#X text 338 217 arg1: comparison value; +#X obj 188 255 hradio 15 1 0 8 empty empty split-index 0 -6 0 10 -262144 +-1 -1 1; +#X floatatom 128 148 5 0 0 0 - - -; +#X obj 95 277 list-moses 4 2; +#X text 337 252 arg2: which element to compare (zero based). Can be +negative \, too.; +#X msg 128 172 1 TEST \$1 4 5 6 7 8; +#X obj 188 306 print not-a-float; +#X msg 95 117 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1; +#N canvas 510 66 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 185 AUTHOR Frank Barknecht; +#X text 12 205 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION like [moses] for lists; +#X text 12 65 INLET_0 anything; +#X text 12 85 INLET_1 float; +#X text 12 105 INLET_2 float; +#X text 12 125 OUTLET_0 list; +#X text 12 145 OUTLET_1 list; +#X text 12 165 OUTLET_2 list; +#X restore 636 371 pd META; +#X connect 0 0 12 0; +#X connect 3 0 8 1; +#X connect 6 0 8 2; +#X connect 7 0 10 0; +#X connect 8 0 1 0; +#X connect 8 1 2 0; +#X connect 8 2 11 0; +#X connect 10 0 8 0; +#X connect 12 0 8 0; diff --git a/list-abs/list-moses.pd b/list-abs/list-moses.pd new file mode 100755 index 0000000..c15fa82 --- /dev/null +++ b/list-abs/list-moses.pd @@ -0,0 +1,32 @@ +#N canvas 264 111 497 457 10; +#X obj 66 63 inlet; +#X obj 201 120 list-idx \$2; +#X obj 273 91 inlet; +#X obj 231 210 inlet; +#X obj 201 148 route float; +#X obj 66 399 outlet; +#X obj 90 369 outlet; +#X obj 201 242 >= \$1; +#X obj 66 90 t a a; +#X text 165 34 arg1: comparison value; +#X text 165 59 arg2: which element to compare (zero based); +#X obj 114 338 outlet; +#X obj 273 210 b; +#X obj 66 278 list prepend 2; +#X obj 273 242 2; +#X obj 66 308 route 0 1 2; +#X connect 0 0 8 0; +#X connect 1 0 4 0; +#X connect 2 0 1 1; +#X connect 3 0 7 1; +#X connect 4 0 7 0; +#X connect 4 1 12 0; +#X connect 7 0 13 1; +#X connect 8 0 13 0; +#X connect 8 1 1 0; +#X connect 12 0 14 0; +#X connect 13 0 15 0; +#X connect 14 0 13 1; +#X connect 15 0 5 0; +#X connect 15 1 6 0; +#X connect 15 2 11 0; diff --git a/list-abs/list-mult-help.pd b/list-abs/list-mult-help.pd new file mode 100755 index 0000000..17f2cc7 --- /dev/null +++ b/list-abs/list-mult-help.pd @@ -0,0 +1,20 @@ +#N canvas 0 31 450 300 10; +#X msg 145 116 5 5 5 NOPE 5; +#X obj 145 217 print; +#X msg 203 139 1 2 3 0 -1; +#X text 108 67 Substract two lists element by element; +#X obj 145 177 list-mult; +#N canvas 460 31 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 105 OUTLET_0 list; +#X text 12 45 DESCRIPTION substract two lists element by element; +#X text 12 65 INLET_0 anything; +#X text 12 85 INLET_1 anything; +#X restore 386 271 pd META; +#X connect 0 0 4 0; +#X connect 2 0 4 1; +#X connect 4 0 1 0; diff --git a/list-abs/list-mult.pd b/list-abs/list-mult.pd new file mode 100755 index 0000000..8c04ab8 --- /dev/null +++ b/list-abs/list-mult.pd @@ -0,0 +1,8 @@ +#N canvas 256 135 500 518 10; +#X obj 59 31 inlet; +#X obj 138 34 inlet; +#X obj 59 117 outlet; +#X obj 59 84 list-emath *; +#X connect 0 0 3 0; +#X connect 1 0 3 1; +#X connect 3 0 2 0; diff --git a/list-abs/list-normalize-help.pd b/list-abs/list-normalize-help.pd new file mode 100755 index 0000000..844c4bd --- /dev/null +++ b/list-abs/list-normalize-help.pd @@ -0,0 +1,79 @@ +#N canvas 0 31 832 543 10; +#X obj 145 295 list-normalize; +#X msg 145 183 10 100 200; +#X msg 157 204 -10 100 200; +#X msg 165 226 -10 100 and -200; +#X msg 168 251 0.1 0.01 and -0.02; +#X text 40 13 list-normalize: normalize a list.; +#X text 54 89 All the other float elements then are scaled with the +same factor.; +#X text 54 41 First it looks for the element with the largest absolute +value \, then this is scaled to be 1 or -1 preserving the sign.; +#X text 54 129 It's the same operation as the "Normalize" instruction +in many soundfile editors or the "normalize 1" method of Pd arrays. +; +#X obj 427 425 list-math *; +#X text 33 427 Hint: To normalize to values other than 1 \, you can +use:; +#X obj 499 366 loadbang; +#X floatatom 499 406 5 0 0 0 - - -; +#X msg 499 386 3; +#X obj 145 377 print Normalized; +#X obj 427 450 print Norm_to_3; +#X obj 617 28 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 617 205 pack 0 0 0; +#X obj 639 166 t b f; +#X obj 685 169 t b f; +#X obj 617 267 unpack 0 0 0; +#X obj 652 28 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 685 28 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X floatatom 617 298 5 0 0 0 - - -; +#X floatatom 656 298 5 0 0 0 - - -; +#X floatatom 696 298 5 0 0 0 - - -; +#X obj 617 324 vsl 15 128 0 1 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 656 324 vsl 15 128 0 1 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 696 324 vsl 15 128 0 1 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X text 735 94 0-127; +#X text 740 390 0-1; +#X obj 617 240 list-normalize; +#N canvas 460 31 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 105 AUTHOR Frank Barknecht; +#X text 12 125 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 85 OUTLET_0 list; +#X text 12 45 DESCRIPTION normalize a list; +#X text 12 65 INLET_0 list; +#X restore 746 491 pd META; +#X connect 0 0 9 0; +#X connect 0 0 14 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 0 0; +#X connect 4 0 0 0; +#X connect 9 0 15 0; +#X connect 11 0 13 0; +#X connect 12 0 9 1; +#X connect 13 0 12 0; +#X connect 16 0 17 0; +#X connect 17 0 31 0; +#X connect 18 0 17 0; +#X connect 18 1 17 1; +#X connect 19 0 17 0; +#X connect 19 1 17 2; +#X connect 20 0 23 0; +#X connect 20 1 24 0; +#X connect 20 2 25 0; +#X connect 21 0 18 0; +#X connect 22 0 19 0; +#X connect 23 0 26 0; +#X connect 24 0 27 0; +#X connect 25 0 28 0; +#X connect 31 0 20 0; diff --git a/list-abs/list-normalize.pd b/list-abs/list-normalize.pd new file mode 100755 index 0000000..953a51f --- /dev/null +++ b/list-abs/list-normalize.pd @@ -0,0 +1,14 @@ +#N canvas 306 264 642 393 10; +#X obj 209 202 list-minmax; +#X obj 209 170 list-abs; +#X obj 179 77 inlet; +#X obj 179 99 t a a; +#X obj 209 286 list-math /; +#X obj 209 319 outlet; +#X text 135 41 list-normalize: normalize a list inside (-1 \, 1); +#X connect 0 1 4 1; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 3 1 1 0; +#X connect 4 0 5 0; diff --git a/list-abs/list-nth-help.pd b/list-abs/list-nth-help.pd new file mode 100755 index 0000000..12792fc --- /dev/null +++ b/list-abs/list-nth-help.pd @@ -0,0 +1,43 @@ +#N canvas 0 31 624 592 10; +#X floatatom 268 339 5 0 0 1 n - -; +#X text 136 110 Inlets: 1) list to look up in; +#X text 134 38 look up the nth element in a list. n has to be positive +and is zero-based!; +#X obj 56 493 list-idx; +#X text 53 472 Also see:; +#X obj 215 392 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 56 38 list-nth; +#X text 193 129 2) number giving position to filter. Zero-based \, +positive.; +#X msg 201 238 0 1 2 3 4 5 6; +#X text 138 83 Argument: ; +#X msg 223 300 a b c d e; +#X obj 201 425 prepent set; +#X msg 201 448; +#X msg 149 395 bang; +#X msg 218 266 list x y z; +#X obj 201 364 list-nth 2; +#X text 310 301 non-lists get converted to proper lists.; +#X text 134 162 Note: negative postion numbers give no output \, lists +longer than the index give a spurious 0 as result \, but also an error +in the console: "$x: argument out of range".; +#X text 53 520 [list-idx] is more flexible \, but a bit slower.; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 105 AUTHOR Frank Barknecht; +#X text 12 125 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION look up the nth element in a list; +#X text 12 65 INLET_0 anything; +#X text 12 85 OUTLET_0 float symbol pointer; +#X restore 538 539 pd META; +#X connect 0 0 15 1; +#X connect 8 0 15 0; +#X connect 10 0 15 0; +#X connect 11 0 12 0; +#X connect 13 0 11 0; +#X connect 14 0 15 0; +#X connect 15 0 5 0; +#X connect 15 0 11 0; diff --git a/list-abs/list-nth.pd b/list-abs/list-nth.pd new file mode 100755 index 0000000..ac48a52 --- /dev/null +++ b/list-abs/list-nth.pd @@ -0,0 +1,23 @@ +#N canvas 0 0 570 388 10; +#X obj 116 86 list; +#X msg 203 167 set \, adddollar \$1; +#X obj 116 259 outlet; +#X obj 116 57 inlet; +#X obj 171 88 f \$1; +#X obj 217 58 loadbang; +#X obj 171 57 inlet; +#X obj 171 111 moses; +#X obj 203 133 + 1; +#X msg 171 145 set; +#X msg 116 227; +#X connect 0 0 10 0; +#X connect 1 0 10 0; +#X connect 3 0 0 0; +#X connect 4 0 7 0; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 9 0; +#X connect 7 1 8 0; +#X connect 8 0 1 0; +#X connect 9 0 10 0; +#X connect 10 0 2 0; diff --git a/list-abs/list-onearg-help.pd b/list-abs/list-onearg-help.pd new file mode 100755 index 0000000..c45989c --- /dev/null +++ b/list-abs/list-onearg-help.pd @@ -0,0 +1,48 @@ +#N canvas 0 31 550 477 10; +#X msg 195 65 bang; +#X obj 195 132 print float; +#X msg 49 65 bang; +#X msg 51 197 bang; +#X obj 51 264 print blank; +#X msg 53 348 bang; +#X obj 53 415 print blank_with_default; +#X text 24 173 When there is a blank argument \, there is no output: +; +#X text 26 37 This object can take any kind of argument:; +#X msg 276 349 bang; +#X obj 276 416 print blank_with_default; +#X msg 204 195 bang; +#X obj 204 262 print blank; +#X obj 49 132 print non-float; +#X obj 49 101 list-onearg word; +#X obj 53 384 list-onearg \$1 default; +#X obj 51 233 list-onearg; +#X obj 204 231 list-onearg \$1; +#X obj 195 101 list-onearg 5; +#X text 13 12 [list-onearg]; +#X obj 276 385 list-onearg 0 256; +#X text 32 295 If you set a second argument \, it will be used as the +default when the argument is blank. (0 is treated as no argument \, +too.); +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 105 AUTHOR Frank Barknecht; +#X text 12 125 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op abstraction_op; +#X text 12 45 DESCRIPTION output on bang only if \$1 exists; +#X text 12 65 INLET_0 bang; +#X text 12 85 OUTLET_0 float symbol; +#X restore 485 446 pd META; +#X connect 0 0 18 0; +#X connect 2 0 14 0; +#X connect 3 0 16 0; +#X connect 5 0 15 0; +#X connect 9 0 20 0; +#X connect 11 0 17 0; +#X connect 14 0 13 0; +#X connect 15 0 6 0; +#X connect 16 0 4 0; +#X connect 17 0 12 0; +#X connect 18 0 1 0; +#X connect 20 0 10 0; diff --git a/list-abs/list-onearg.pd b/list-abs/list-onearg.pd new file mode 100755 index 0000000..44c1463 --- /dev/null +++ b/list-abs/list-onearg.pd @@ -0,0 +1,23 @@ +#N canvas 160 304 587 350 10; +#X obj 259 234 outlet; +#X text 83 259 If the argument is not equal to 0 \, use it. Pd init +arguments to 0 so unused arguments will be 0; +#X obj 143 116 select 0; +#X text 82 296 This is useful to have internals inited \, but not reset +if there is no argument specified.; +#X obj 143 190 select 0; +#X text 275 172 if 2nd arg \, then use as default value; +#X obj 143 20 inlet; +#X obj 259 13 inlet; +#X text 297 14 convenience inlet; +#X obj 143 96 list append \$1; +#X obj 143 169 list append \$2; +#X obj 143 55 bang; +#X connect 2 0 10 0; +#X connect 2 1 0 0; +#X connect 4 1 0 0; +#X connect 6 0 11 0; +#X connect 7 0 0 0; +#X connect 9 0 2 0; +#X connect 10 0 4 0; +#X connect 11 0 9 0; diff --git a/list-abs/list-pad-help.pd b/list-abs/list-pad-help.pd new file mode 100755 index 0000000..73c44c8 --- /dev/null +++ b/list-abs/list-pad-help.pd @@ -0,0 +1,42 @@ +#N canvas 0 31 554 508 10; +#X obj 159 285 list-pad; +#X obj 159 335 list trim; +#X obj 159 313 list prepend set; +#X msg 62 209 bang; +#X msg 212 253 a b c d e f; +#X msg 159 211 1 2 3; +#X msg 206 210 1 2 3 4 5 6 7 8 9; +#X text 111 417 Using an idiom by Michal Seta; +#X msg 125 211 1; +#X text 97 53 Use [list-pad] when you want to complete a list with +more values \, if the incoming list is too short. Longer lists get +passed unchanged.; +#X obj 50 29 list-pad; +#X text 315 256 <= pad to these values; +#X obj 212 233 loadbang; +#X text 97 105 The list of padding values is provided through the second +inlet.; +#X text 96 149 The result list consists of the first list padded with +the respective values of the second list.; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 135 AUTHOR Frank Barknecht; +#X text 12 155 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION complete a list with more values \, if the +incoming list is too short; +#X text 12 75 INLET_0 anything; +#X text 12 115 OUTLET_0 list; +#X text 12 95 INLET_1 anything; +#X text 12 5 KEYWORDS control list_op; +#X restore 465 456 pd META; +#X msg 159 380; +#X connect 0 0 2 0; +#X connect 1 0 16 0; +#X connect 2 0 1 0; +#X connect 3 0 0 0; +#X connect 4 0 0 1; +#X connect 5 0 0 0; +#X connect 6 0 0 0; +#X connect 8 0 0 0; +#X connect 12 0 4 0; diff --git a/list-abs/list-pad.pd b/list-abs/list-pad.pd new file mode 100755 index 0000000..4242a2b --- /dev/null +++ b/list-abs/list-pad.pd @@ -0,0 +1,21 @@ +#N canvas 325 242 450 300 10; +#X obj 129 41 inlet; +#X obj 216 113 list; +#X obj 216 140 list length; +#X obj 149 190 list split; +#X obj 228 43 inlet; +#X obj 129 256 outlet; +#X obj 129 74 t a b b a; +#X obj 129 229 list append; +#X obj 149 166 list; +#X connect 0 0 6 0; +#X connect 1 0 2 0; +#X connect 2 0 3 1; +#X connect 3 1 7 1; +#X connect 4 0 8 1; +#X connect 6 0 7 0; +#X connect 6 1 8 0; +#X connect 6 2 7 1; +#X connect 6 3 1 0; +#X connect 7 0 5 0; +#X connect 8 0 3 0; diff --git a/list-abs/list-quicksort-help.pd b/list-abs/list-quicksort-help.pd new file mode 100755 index 0000000..af97e10 --- /dev/null +++ b/list-abs/list-quicksort-help.pd @@ -0,0 +1,51 @@ +#N canvas 155 47 766 651 10; +#X msg 93 470 2 3 100; +#X obj 223 357 hradio 15 1 0 2 empty empty empty 0 -8 0 10 -262144 +-1 -1 0; +#X msg 267 357 asc; +#X msg 305 357 desc; +#X obj 93 205 list-random 100 10; +#X obj 125 256 prepent set; +#X msg 93 179 bang; +#X obj 93 230 t b a; +#X msg 93 291 91 35 78 70 85 46 64 10 93 83; +#X text 279 324 non-floats are removed with a warning.; +#X msg 135 324 100 2 wrong type 3; +#X obj 93 441 prepent set; +#X text 66 80 Inlets: 1) list to sort; +#X text 66 134 Argument:; +#X text 121 98 2) direction: 0 or asc for ascending \, 1 or desc for +descending; +#X text 137 134 +; +#X text 65 40 Sort an incoming list of values in ascending or descending +order. Non-numbers are dropped.; +#X text 299 510 Alternative implementations available in:; +#X obj 383 540 list-shellsort; +#X obj 309 540 list-sort; +#X text 59 525 2008 Matt Barber; +#X obj 93 396 list-quicksort desc; +#X obj 35 11 list-quicksort; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 5 KEYWORDS control list_op; +#X text 12 75 INLET_0 list; +#X text 12 95 INLET_1 float asc desc; +#X text 12 115 OUTLET_0 list; +#X text 12 135 AUTHOR Matt Barber; +#X text 12 155 HELP_PATCH_AUTHORS Matt Barber \, Frank Barknecht; +#X text 11 44 DESCRIPTION sort an incoming list of values in ascending +or descending order using a quicksort algorithm on a table.; +#X restore 675 603 pd META; +#X connect 1 0 21 1; +#X connect 2 0 21 1; +#X connect 3 0 21 1; +#X connect 4 0 7 0; +#X connect 5 0 8 0; +#X connect 6 0 4 0; +#X connect 7 0 8 0; +#X connect 7 1 5 0; +#X connect 8 0 21 0; +#X connect 10 0 21 0; +#X connect 11 0 0 0; +#X connect 21 0 11 0; diff --git a/list-abs/list-quicksort.pd b/list-abs/list-quicksort.pd new file mode 100755 index 0000000..06f54bc --- /dev/null +++ b/list-abs/list-quicksort.pd @@ -0,0 +1,1130 @@ +#N canvas 639 454 587 357 10; +#X obj 53 47 inlet; +#X obj 53 249 outlet; +#X obj 449 100 loadbang; +#X obj 387 52 inlet; +#X obj 387 161 list append \$1; +#X obj 387 131 t b a; +#X obj 387 189 s \$0-direction; +#X obj 53 121 sel 0 1; +#X obj 72 221 list-tabdump; +#X obj 72 175 list prepend \$0-table; +#X obj 72 199 list append 0; +#X text 55 334 2008 Matt Barber; +#N canvas 520 211 803 430 \$0-table 0; +#X obj 185 113 list-len; +#X msg 271 361 resize \$1; +#X obj 271 384 s \$0-table; +#X obj 41 24 inlet; +#X obj 41 344 outlet; +#X obj 41 207 f; +#X obj 139 24 table \$0-table 100; +#X obj 185 136 moses 100; +#X obj 185 173 * 0.01; +#X obj 185 195 + 1; +#X obj 185 218 int; +#X obj 185 242 * 100; +#X obj 271 259 t f f f; +#X obj 290 283 * 2; +#X msg 290 305 resize \$1; +#X obj 290 327 s \$0-queue-table; +#X text 401 327 <== resize list table so that it can hold the lists. +Size of queue table needs to be about 2 times this in the worst case +(2 values for each partition \, with a worst case of n-1 partitions +for a list of size n). This could be more conservative since the size +is based on the list before the floats were filtered out.; +#N canvas 0 22 583 323 \$0-filter-write 0; +#X text 20 20 Filter non-floats quicker than [list-filter]; +#X obj 109 69 inlet; +#X obj 51 135 list-drip; +#X obj 201 204 print; +#X msg 201 174 list-quicksort: Warning: dropped a non-number from list +; +#X obj 158 238 outlet; +#X obj 121 207 f; +#X obj 149 207 + 1; +#X obj 51 273 tabwrite \$0-table; +#X msg 136 120 0; +#X obj 51 157 route float; +#X obj 51 179 t f b; +#X obj 109 91 t a b; +#X connect 1 0 12 0; +#X connect 2 0 10 0; +#X connect 4 0 3 0; +#X connect 6 0 7 0; +#X connect 6 0 8 1; +#X connect 7 0 6 1; +#X connect 7 0 5 0; +#X connect 9 0 6 1; +#X connect 10 0 11 0; +#X connect 10 1 4 0; +#X connect 11 0 8 0; +#X connect 11 1 6 0; +#X connect 12 0 2 0; +#X connect 12 1 9 0; +#X restore 58 145 pd \$0-filter-write; +#X obj 41 56 t b a a b; +#X msg 92 111 0; +#X connect 0 0 7 0; +#X connect 1 0 2 0; +#X connect 3 0 18 0; +#X connect 5 0 4 0; +#X connect 7 1 8 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 11 0; +#X connect 11 0 12 0; +#X connect 12 0 1 0; +#X connect 12 1 13 0; +#X connect 12 2 7 1; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 17 0 5 1; +#X connect 18 0 5 0; +#X connect 18 1 17 0; +#X connect 18 2 0 0; +#X connect 18 3 19 0; +#X connect 19 0 5 1; +#X restore 53 76 pd \$0-table; +#X text 332 234 <== engine; +#X obj 232 205 - 1; +#N canvas 232 332 1064 568 \$0-main-loop 1; +#X obj 70 14 inlet; +#X obj 70 231 v \$0-left; +#X obj 136 231 v \$0-right; +#N canvas 677 165 450 300 \$0-tabswap 0; +#X obj 164 23 inlet; +#X obj 236 47 inlet; +#X obj 250 120 f; +#X obj 265 97 tabread \$0-table; +#X obj 69 120 tabread \$0-table; +#X obj 93 204 tabwrite \$0-table; +#X obj 164 46 t b f f; +#X connect 0 0 6 0; +#X connect 1 0 3 0; +#X connect 1 0 5 1; +#X connect 2 0 5 0; +#X connect 3 0 2 1; +#X connect 4 0 5 0; +#X connect 6 0 2 0; +#X connect 6 1 5 1; +#X connect 6 2 4 0; +#X restore 401 461 pd \$0-tabswap; +#N canvas 404 68 735 438 \$0-find-pivot 1; +#X obj 38 135 inlet; +#N canvas 95 526 394 222 \$0-median-of-three 0; +#X obj 47 13 inlet; +#X obj 146 50 v \$0-right; +#X obj 47 58 v \$0-left; +#X obj 96 96 +; +#X obj 96 116 * 0.5; +#X obj 47 79 t f f; +#N canvas 291 521 635 449 \$0-find-median 0; +#X obj 163 76 inlet; +#X obj 331 86 inlet; +#X obj 386 82 inlet; +#X obj 206 311 outlet; +#X obj 206 261 f; +#X obj 175 261 f; +#N canvas 60 186 904 625 \$0-logic 0; +#X obj 68 27 inlet; +#X obj 239 108 inlet; +#X obj 383 108 inlet; +#X obj 72 493 outlet; +#X obj 152 493 outlet; +#X obj 239 180 max; +#X obj 148 169 min; +#X obj 48 197 min; +#X obj 133 214 max; +#X obj 368 257 ==; +#X obj 152 293 ==; +#X obj 72 301 ==; +#X obj 133 240 t f f f; +#X obj 72 325 sel 1; +#X obj 152 317 sel 1; +#X obj 368 290 sel 1; +#X obj 152 461 spigot; +#X obj 72 460 spigot; +#X obj 68 60 t f f b; +#X obj 107 108 s \$0-logic-spigots; +#X msg 107 86 1; +#X obj 152 342 t b b; +#X obj 246 398 r \$0-logic-spigots; +#X msg 185 398 0; +#X msg 105 398 0; +#X text 376 396 <== if median is doubled \, only bang out one of them. +; +#X obj 368 314 t b b; +#X obj 368 493 outlet; +#X text 396 177 <== First "sort" right and center \, then "sort" left +and right \, then "sort" left and center. Median will be sent to the +trigger. Another option might be to actually sort them in the table +\, but this probably takes more steps in Pd since reading a table requires +an object.; +#X connect 0 0 18 0; +#X connect 1 0 5 0; +#X connect 1 0 6 0; +#X connect 1 0 10 1; +#X connect 2 0 6 1; +#X connect 2 0 5 1; +#X connect 2 0 9 1; +#X connect 5 0 7 1; +#X connect 6 0 8 1; +#X connect 7 0 8 0; +#X connect 8 0 12 0; +#X connect 9 0 15 0; +#X connect 10 0 14 0; +#X connect 11 0 13 0; +#X connect 12 0 11 0; +#X connect 12 1 10 0; +#X connect 12 2 9 0; +#X connect 13 0 17 0; +#X connect 14 0 21 0; +#X connect 15 0 26 0; +#X connect 16 0 4 0; +#X connect 17 0 3 0; +#X connect 18 0 7 0; +#X connect 18 1 11 1; +#X connect 18 2 20 0; +#X connect 20 0 19 0; +#X connect 21 0 16 0; +#X connect 21 1 24 0; +#X connect 22 0 16 1; +#X connect 22 0 17 1; +#X connect 23 0 16 1; +#X connect 23 0 17 1; +#X connect 24 0 17 1; +#X connect 26 0 27 0; +#X connect 26 1 23 0; +#X connect 26 1 24 0; +#X restore 45 189 pd \$0-logic; +#X obj 386 103 tabread \$0-table; +#X obj 213 103 tabread \$0-table; +#X obj 45 120 tabread \$0-table; +#X obj 163 103 t f f; +#X obj 237 261 f; +#X text 276 262 <== output index of median; +#X connect 0 0 10 0; +#X connect 1 0 4 1; +#X connect 1 0 8 0; +#X connect 2 0 7 0; +#X connect 2 0 11 1; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X connect 6 0 5 0; +#X connect 6 1 4 0; +#X connect 6 2 11 0; +#X connect 7 0 6 2; +#X connect 8 0 6 1; +#X connect 9 0 6 0; +#X connect 10 0 9 0; +#X connect 10 1 5 1; +#X connect 11 0 3 0; +#X restore 47 160 pd \$0-find-median; +#X obj 47 182 outlet; +#X obj 96 137 int; +#X obj 47 33 t b b; +#X connect 0 0 9 0; +#X connect 1 0 6 2; +#X connect 1 0 3 1; +#X connect 2 0 5 0; +#X connect 3 0 4 0; +#X connect 4 0 8 0; +#X connect 5 0 6 0; +#X connect 5 1 3 0; +#X connect 6 0 7 0; +#X connect 8 0 6 1; +#X connect 9 0 2 0; +#X connect 9 1 1 0; +#X restore 38 214 pd \$0-median-of-three; +#X obj 182 173 v \$0-right; +#X obj 38 156 t b b; +#X obj 38 268 ==; +#X obj 38 238 t f f; +#X obj 88 323 f; +#X obj 137 340 pack 0 0; +#X obj 38 290 sel 0; +#X obj 137 361 s \$0-swap; +#X text 215 289 <== If the median is the right element \, do nothing +\, otherwise swap the median element with the right element.; +#X text 36 15 Quicksort algorithm runs quicker on average (with evenly +distributed lists) if pivot is chosen as the median of three elements +of a partition to be sorted. The upshot is that the same method can +be used to manually sort partitions of 3 elements or less. This step +isn't needed for partitions of size four \, since the next round will +be manually sorted no matter what. This step can be sabotaged with +specialized "median-of-three killer" lists \, which don't arise in +everyday circumstances.; +#X text 235 212 <== Find the median of the left \, middle \, and right +elements and pass the index. Any three indices will do \, but using +these three might lead to fewer total swaps.; +#X connect 0 0 3 0; +#X connect 1 0 5 0; +#X connect 2 0 4 1; +#X connect 2 0 7 1; +#X connect 3 0 1 0; +#X connect 3 1 2 0; +#X connect 4 0 8 0; +#X connect 5 0 4 0; +#X connect 5 1 6 1; +#X connect 6 0 7 0; +#X connect 7 0 9 0; +#X connect 8 0 6 0; +#X restore 175 403 pd \$0-find-pivot; +#N canvas 292 184 823 728 \$0-partition-loop 0; +#X obj 327 288 v \$0-right; +#X obj 149 260 v \$0-left; +#X obj 64 136 inlet; +#N canvas 741 346 630 559 \$0-right-loop 0; +#X obj 165 53 inlet; +#X obj 245 266 inlet; +#X obj 112 133 until; +#X obj 165 74 - 1; +#X obj 169 168 f; +#X obj 225 168 - 1; +#X obj 193 467 f; +#X obj 38 337 sel 1; +#X obj 38 359 t b b; +#X obj 65 382 s \$0-stop-right-loop; +#X obj 38 260 tabread \$0-table; +#X obj 304 208 v $-left; +#X obj 289 286 sel 1; +#X obj 316 329 s \$0-stop-right-loop; +#X obj 139 32 r \$0-stop-right-loop; +#X obj 165 96 t b f b; +#X text 338 266 <== insulate against a runaway "pointer"; +#X obj 193 488 outlet; +#X obj 289 306 t b b; +#X obj 169 196 t f f f; +#X obj 289 263 <; +#X obj 304 235 + 1; +#X text 275 45 This decrements a pointer from the right side until +it finds a value less than the pivot.; +#X obj 38 305 <; +#N canvas 547 408 584 529 >oror; +#X connect 0 0 3 0; +#X connect 1 0 24 1; +#X connect 2 0 4 0; +#X connect 3 0 15 0; +#X connect 4 0 19 0; +#X connect 5 0 4 1; +#X connect 6 0 17 0; +#X connect 7 0 8 0; +#X connect 8 0 6 0; +#X connect 8 1 9 0; +#X connect 10 0 24 0; +#X connect 11 0 21 0; +#X connect 12 0 18 0; +#X connect 14 0 2 1; +#X connect 15 0 2 0; +#X connect 15 1 4 1; +#X connect 15 2 11 0; +#X connect 18 0 6 0; +#X connect 18 1 13 0; +#X connect 19 0 10 0; +#X connect 19 1 20 0; +#X connect 19 2 5 0; +#X connect 19 2 6 1; +#X connect 20 0 12 0; +#X connect 21 0 20 1; +#X connect 23 0 7 0; +#X connect 24 0 23 0; +#X connect 24 1 23 1; +#X connect 24 2 25 0; +#X connect 24 3 25 1; +#X connect 25 0 7 0; +#X restore 312 461 pd \$0-right-loop; +#X obj 405 348 tabread \$0-table; +#X obj 312 431 f; +#X obj 64 424 f; +#N canvas 159 384 697 546 \$0-left-loop 0; +#X obj 165 52 inlet; +#X obj 245 275 inlet; +#X obj 112 133 until; +#X obj 169 168 f; +#X obj 193 477 f; +#X obj 38 357 sel 1; +#X obj 38 379 t b b; +#X obj 38 270 tabread \$0-table; +#X obj 289 276 sel 1; +#X obj 165 96 t b f b; +#X obj 193 498 outlet; +#X obj 139 18 r \$0-stop-left-loop; +#X obj 316 329 s \$0-stop-left-loop; +#X obj 65 402 s \$0-stop-left-loop; +#X obj 226 168 + 1; +#X obj 289 303 t b b; +#X obj 169 196 t f f f; +#X obj 304 188 v \$0-right; +#X obj 304 212 - 1; +#X obj 289 253 >=; +#X text 338 256 <== insulate against a runaway "pointer."; +#X text 289 22 This increments a "pointer" from the left side until +it finds a value that is greater than the pivot.; +#X obj 38 315 >; +#N canvas 547 408 584 529 >oror=; +#X obj 64 483 t f f; +#X obj 327 331 t f f; +#X obj 64 591 sel 0; +#X obj 114 407 + 1; +#X obj 64 158 t b b; +#X obj 64 236 until; +#X obj 64 260 t b b; +#X obj 91 206 r \$0-stop-partition-loop; +#X obj 109 175 s \$0-partition-loop-init; +#X obj 327 243 r \$0-partition-loop-init; +#X obj 405 372 s \$0-pivot-value; +#X obj 405 435 r \$0-pivot-value; +#X obj 151 435 r \$0-pivot-value; +#X obj 312 484 s \$0-right-pointer; +#X obj 79 548 r \$0-right-pointer; +#X obj 91 508 s \$0-left-pointer; +#X obj 114 382 r \$0-left-pointer; +#X text 123 33 This partitions a portion of the table (from the "left" +to the "right" indices given) based on the pivot \, which will be the +right index value. If we're sorting in ascending order \, all values +less than the pivot will be moved to the left and the values greater +than the pivot will be moved to the right. The two loops find indices +to swap values that are on the wrong side. At the end of the loop \, +the right value will be swapped to the middle \; it is now in its proper +location in the table. New partition boundaries based on this location +are sent to the schedule queue.; +#X text 371 551 <== if the pointers have not met \, then we've found +values to swap. If they have met or passed each other \, then all values +are in place \, and we should break the loop.; +#X text 430 461 <== Run the two loops to find values to swap.; +#X obj 354 394 s \$0-right-index; +#N canvas 86 406 953 398 \$0-tail 0; +#X obj 63 69 inlet; +#X obj 398 80 inlet; +#X obj 437 137 s \$0-stop-partition-loop; +#X obj 63 277 pack 0 0; +#X obj 63 254 f; +#X obj 235 290 pack 0 0; +#X obj 328 138 f; +#X obj 63 307 s \$0-swap; +#N canvas 308 492 677 393 \$0-schedule-next 0; +#X obj 85 93 inlet; +#X obj 91 216 - 1; +#X obj 46 233 moses; +#X obj 46 178 v \$0-left; +#X obj 155 240 moses; +#X obj 129 188 v \$0-right; +#X obj 203 223 + 2; +#X obj 182 296 pack 0 0; +#X obj 182 271 swap; +#X obj 203 93 inlet; +#X obj 46 313 list append; +#X obj 46 259 pack 0 0; +#X obj 203 246 - 1; +#X obj 73 286 t b; +#X obj 46 336 s \$0-schedule; +#X obj 85 115 t b b b; +#X text 28 24 This schedules the next partitions to be sorted. After +the pivot is replaced to its proper location \, the new partitions +should be [left \, pivotindex-1] and [pivotindex+1 \, right].; +#X text 277 230 <== If the values within a pair are the same \, they +point to one element of the table which is in its proper location. +So we don't schedule it. Note the spooky arithmetic \, necessary because +[moses] is >= at the right outlet.; +#X connect 0 0 15 0; +#X connect 1 0 2 1; +#X connect 1 0 11 1; +#X connect 2 0 11 0; +#X connect 2 1 13 0; +#X connect 3 0 2 0; +#X connect 4 1 8 0; +#X connect 5 0 4 0; +#X connect 6 0 4 1; +#X connect 6 0 12 0; +#X connect 7 0 10 1; +#X connect 8 0 7 0; +#X connect 8 1 7 1; +#X connect 9 0 6 0; +#X connect 9 0 1 0; +#X connect 10 0 14 0; +#X connect 11 0 10 0; +#X connect 12 0 8 1; +#X connect 13 0 10 0; +#X connect 15 0 3 0; +#X connect 15 1 5 0; +#X connect 15 2 10 1; +#X restore 398 350 pd \$0-schedule-next; +#X obj 398 106 t b b b; +#X obj 78 227 r \$0-left-pointer; +#X obj 343 53 r \$0-left-pointer; +#X obj 108 250 r \$0-right-pointer; +#X obj 437 158 r \$0-right-index; +#X obj 328 182 t f f f; +#N canvas 0 22 363 368 \$0-adjacent? 0; +#X obj 63 73 inlet; +#X obj 123 134 inlet; +#X obj 115 220 f; +#X obj 63 151 ==; +#X obj 63 180 sel 1; +#X obj 63 95 + 1; +#X obj 63 122 t f f; +#X obj 115 243 outlet; +#X connect 0 0 5 0; +#X connect 1 0 3 1; +#X connect 2 0 7 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 5 0 6 0; +#X connect 6 0 3 0; +#X connect 6 1 2 1; +#X restore 427 311 pd \$0-adjacent?; +#N canvas 2 76 450 338 \$0-pivot-order? 0; +#X obj 86 44 inlet; +#X obj 96 272 outlet; +#X obj 105 192 sel 0; +#X obj 112 104 r \$0-pivot-value; +#X obj 105 79 tabread \$0-table; +#N canvas 547 408 584 529 >oror; +#X obj 144 207 r \$0-left-pointer; +#X obj 114 243 f; +#X connect 0 0 4 0; +#X connect 2 0 9 0; +#X connect 3 0 5 1; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 5 1 6 1; +#X connect 5 2 7 0; +#X connect 5 3 7 1; +#X connect 6 0 2 0; +#X connect 7 0 2 0; +#X connect 8 0 9 1; +#X connect 9 0 1 0; +#X restore 235 231 pd \$0-pivot-order?; +#X obj 280 264 r \$0-right-index; +#X text 502 225 <== Don't swap if the last left pointer points to a +value that is already in order with the pivot.; +#X text 539 310 <== When the last left pointer is adjacent to the pivot +(on the right) \, schedule the left pointer for the next partition. +; +#X connect 0 0 4 0; +#X connect 1 0 9 0; +#X connect 3 0 7 0; +#X connect 4 0 3 0; +#X connect 5 0 7 0; +#X connect 6 0 14 0; +#X connect 9 0 8 0; +#X connect 9 1 6 0; +#X connect 9 2 2 0; +#X connect 10 0 4 1; +#X connect 11 0 6 1; +#X connect 12 0 3 1; +#X connect 13 0 15 1; +#X connect 14 0 16 0; +#X connect 14 1 15 0; +#X connect 14 2 8 1; +#X connect 15 0 8 1; +#X connect 16 0 5 0; +#X connect 17 0 5 1; +#X restore 64 630 pd \$0-tail; +#X text 143 632 <== put the rest here to save space; +#X connect 0 0 10 0; +#X connect 1 0 6 1; +#X connect 2 0 13 0; +#X connect 3 0 5 1; +#X connect 3 0 22 0; +#X connect 4 0 19 0; +#X connect 5 0 3 0; +#X connect 6 0 7 0; +#X connect 7 0 9 0; +#X connect 8 0 11 0; +#X connect 9 0 8 0; +#X connect 9 1 24 0; +#X connect 10 0 5 1; +#X connect 10 1 4 0; +#X connect 10 1 29 0; +#X connect 11 0 30 0; +#X connect 11 1 30 1; +#X connect 12 0 6 1; +#X connect 13 0 14 0; +#X connect 13 1 17 0; +#X connect 14 0 15 0; +#X connect 15 0 6 0; +#X connect 15 1 5 0; +#X connect 16 0 14 1; +#X connect 18 0 1 0; +#X connect 18 0 0 0; +#X connect 20 0 3 1; +#X connect 21 0 7 1; +#X connect 23 0 8 1; +#X connect 25 0 12 0; +#X restore 109 435 pd \$0-partition-loop; +#X obj 401 412 r \$0-swap; +#N canvas 670 232 607 336 \$0-manual-sort 0; +#X obj 27 58 inlet; +#N canvas 207 434 411 426 \$0-sort-2 0; +#X obj 49 78 inlet; +#X obj 49 100 t b b; +#X obj 49 128 v \$0-left; +#X obj 296 117 v \$0-right; +#X obj 49 184 tabread \$0-table; +#X obj 167 184 tabread \$0-table; +#X obj 197 327 tabwrite \$0-table; +#X obj 49 327 tabwrite \$0-table; +#N canvas 399 288 584 529 swap? 0; +#X obj 40 52 inlet; +#X obj 153 52 inlet; +#X obj 40 272 spigot 1; +#X obj 256 272 spigot; +#X obj 361 224 unpack 0 0; +#X msg 361 178 1 0; +#X msg 412 196 0 1; +#X obj 463 93 select 0; +#X obj 361 71 select asc desc; +#X obj 40 437 outlet; +#X obj 153 437 outlet; +#X obj 256 300 swap; +#X obj 153 271 spigot 1; +#X obj 317 273 spigot; +#X obj 361 45 r \$0-direction; +#X connect 0 0 2 0; +#X connect 0 0 3 0; +#X connect 1 0 12 0; +#X connect 1 0 13 0; +#X connect 2 0 9 0; +#X connect 3 0 11 0; +#X connect 4 0 2 1; +#X connect 4 0 12 1; +#X connect 4 1 3 1; +#X connect 4 1 13 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 5 0; +#X connect 7 1 6 0; +#X connect 8 0 5 0; +#X connect 8 1 6 0; +#X connect 8 2 7 0; +#X connect 11 0 9 0; +#X connect 11 1 10 0; +#X connect 12 0 10 0; +#X connect 13 0 11 1; +#X connect 14 0 8 0; +#X restore 152 296 pd swap?; +#X obj 152 273 min; +#X obj 197 273 max; +#X obj 49 205 t f f; +#X obj 49 155 t f f; +#X text 46 47 This one is easy. =o); +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 3 0; +#X connect 2 0 12 0; +#X connect 3 0 6 1; +#X connect 3 0 5 0; +#X connect 4 0 11 0; +#X connect 5 0 9 1; +#X connect 5 0 10 1; +#X connect 8 0 7 0; +#X connect 8 1 6 0; +#X connect 9 0 8 0; +#X connect 10 0 8 1; +#X connect 11 0 9 0; +#X connect 11 1 10 0; +#X connect 12 0 4 0; +#X connect 12 1 7 1; +#X restore 27 146 pd \$0-sort-2; +#N canvas 335 408 791 492 \$0-sort-3 0; +#X obj 39 23 inlet; +#X obj 39 45 t b b; +#X obj 39 73 v \$0-left; +#X obj 462 62 v \$0-right; +#X obj 306 130 - 1; +#X obj 207 415 tabwrite \$0-table; +#X obj 45 429 tabwrite \$0-table; +#X obj 363 333 tabwrite \$0-table; +#N canvas 399 288 584 529 swap? 0; +#X obj 40 52 inlet; +#X obj 153 52 inlet; +#X obj 40 272 spigot 1; +#X obj 256 272 spigot; +#X obj 361 224 unpack 0 0; +#X msg 361 178 1 0; +#X msg 412 196 0 1; +#X obj 463 93 select 0; +#X obj 361 71 select asc desc; +#X obj 40 437 outlet; +#X obj 153 437 outlet; +#X obj 256 300 swap; +#X obj 153 271 spigot 1; +#X obj 317 273 spigot; +#X obj 361 45 r \$0-direction; +#X connect 0 0 2 0; +#X connect 0 0 3 0; +#X connect 1 0 12 0; +#X connect 1 0 13 0; +#X connect 2 0 9 0; +#X connect 3 0 11 0; +#X connect 4 0 2 1; +#X connect 4 0 12 1; +#X connect 4 1 3 1; +#X connect 4 1 13 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 5 0; +#X connect 7 1 6 0; +#X connect 8 0 5 0; +#X connect 8 1 6 0; +#X connect 8 2 7 0; +#X connect 11 0 9 0; +#X connect 11 1 10 0; +#X connect 12 0 10 0; +#X connect 13 0 11 1; +#X connect 14 0 8 0; +#X restore 188 316 pd swap?; +#X obj 188 293 min; +#X obj 233 293 max; +#N canvas 399 288 584 529 swap? 0; +#X obj 40 52 inlet; +#X obj 153 52 inlet; +#X obj 40 272 spigot 1; +#X obj 256 272 spigot; +#X obj 361 224 unpack 0 0; +#X msg 361 178 1 0; +#X msg 412 196 0 1; +#X obj 463 93 select 0; +#X obj 361 71 select asc desc; +#X obj 40 437 outlet; +#X obj 153 437 outlet; +#X obj 256 300 swap; +#X obj 153 271 spigot 1; +#X obj 317 273 spigot; +#X obj 361 45 r \$0-direction; +#X connect 0 0 2 0; +#X connect 0 0 3 0; +#X connect 1 0 12 0; +#X connect 1 0 13 0; +#X connect 2 0 9 0; +#X connect 3 0 11 0; +#X connect 4 0 2 1; +#X connect 4 0 12 1; +#X connect 4 1 3 1; +#X connect 4 1 13 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 5 0; +#X connect 7 1 6 0; +#X connect 8 0 5 0; +#X connect 8 1 6 0; +#X connect 8 2 7 0; +#X connect 11 0 9 0; +#X connect 11 1 10 0; +#X connect 12 0 10 0; +#X connect 13 0 11 1; +#X connect 14 0 8 0; +#X restore 45 398 pd swap?; +#X obj 45 375 min; +#X obj 90 375 max; +#N canvas 399 288 584 529 swap? 0; +#X obj 40 52 inlet; +#X obj 153 52 inlet; +#X obj 40 272 spigot 1; +#X obj 256 272 spigot; +#X obj 361 224 unpack 0 0; +#X msg 361 178 1 0; +#X msg 412 196 0 1; +#X obj 463 93 select 0; +#X obj 361 71 select asc desc; +#X obj 40 437 outlet; +#X obj 153 437 outlet; +#X obj 256 300 swap; +#X obj 153 271 spigot 1; +#X obj 317 273 spigot; +#X obj 361 45 r \$0-direction; +#X connect 0 0 2 0; +#X connect 0 0 3 0; +#X connect 1 0 12 0; +#X connect 1 0 13 0; +#X connect 2 0 9 0; +#X connect 3 0 11 0; +#X connect 4 0 2 1; +#X connect 4 0 12 1; +#X connect 4 1 3 1; +#X connect 4 1 13 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 5 0; +#X connect 7 1 6 0; +#X connect 8 0 5 0; +#X connect 8 1 6 0; +#X connect 8 2 7 0; +#X connect 11 0 9 0; +#X connect 11 1 10 0; +#X connect 12 0 10 0; +#X connect 13 0 11 1; +#X connect 14 0 8 0; +#X restore 185 231 pd swap?; +#X obj 185 208 min; +#X obj 230 208 max; +#X obj 351 79 t f f; +#X obj 39 126 tabread \$0-table; +#X obj 185 147 tabread \$0-table; +#X obj 343 130 tabread \$0-table; +#X obj 185 172 t f f; +#X obj 39 97 t f f; +#X obj 39 150 t f f; +#X obj 45 333 t f f; +#X text 478 216 <== Sort right and center.; +#X text 478 296 <== Sort left and right -- right is now ready.; +#X text 478 378 <== Sort left and center -- both are ready.; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 3 0; +#X connect 2 0 22 0; +#X connect 3 0 20 0; +#X connect 3 0 7 1; +#X connect 3 0 17 0; +#X connect 4 0 5 1; +#X connect 4 0 19 0; +#X connect 8 0 24 0; +#X connect 8 1 7 0; +#X connect 9 0 8 0; +#X connect 10 0 8 1; +#X connect 11 0 6 0; +#X connect 11 1 5 0; +#X connect 12 0 11 0; +#X connect 13 0 11 1; +#X connect 14 0 13 1; +#X connect 14 0 12 1; +#X connect 14 1 10 1; +#X connect 14 1 9 1; +#X connect 15 0 14 0; +#X connect 16 0 14 1; +#X connect 17 0 4 0; +#X connect 17 1 20 0; +#X connect 18 0 23 0; +#X connect 19 0 21 0; +#X connect 20 0 16 1; +#X connect 20 0 15 1; +#X connect 21 0 15 0; +#X connect 21 1 16 0; +#X connect 22 0 18 0; +#X connect 22 1 6 1; +#X connect 23 0 9 0; +#X connect 23 1 10 0; +#X connect 24 0 12 0; +#X connect 24 1 13 0; +#X restore 66 120 pd \$0-sort-3; +#X obj 27 92 moses 2; +#X text 24 19 Here we manually sort partitions of size 2 or 3 This +should be more efficient than scheduling extra partitioning.; +#X connect 0 0 3 0; +#X connect 3 0 1 0; +#X connect 3 1 2 0; +#X restore 97 466 pd \$0-manual-sort; +#X obj 70 291 -; +#X obj 70 323 moses 3; +#X obj 109 349 moses 4; +#X obj 148 380 t b b; +#X obj 109 380 t b; +#X text 501 460 <== swapping engine; +#X text 172 346 <== no need to find pivot for partitions of size 4 +\, since both partitions of the next round will be sorted manually. +; +#X msg 89 63 0 \$1; +#X obj 401 437 unpack 0 0; +#X obj 203 34 r \$0-schedule; +#X obj 70 37 t b f b; +#X obj 70 140 until; +#X obj 70 349 t b f; +#X obj 70 498 s \$0-schedule; +#X obj 70 170 t b b; +#X obj 70 263 swap; +#X text 131 317 <== more efficient to manually sort partitions of size +3 or smaller (especially for larger lists).; +#N canvas 464 376 995 572 \$0-queue 0; +#X obj 47 109 inlet; +#X obj 47 510 outlet; +#X obj 238 479 outlet; +#X obj 47 188 list-len; +#X obj 248 175 s \$0-queue-table; +#X obj 74 158 list prepend 0; +#X obj 47 131 t a a; +#X obj 477 33 table \$0-queue-table 200; +#X obj 248 110 inlet; +#X msg 248 142 const 0; +#X obj 238 430 == 0; +#X obj 238 453 sel 1; +#X obj 211 382 tabread \$0-queue-table; +#X obj 47 382 tabread \$0-queue-table; +#X obj 74 335 + 1; +#X obj 211 407 t f f; +#X obj 177 280 f; +#X obj 47 282 f; +#X obj 250 280 +; +#X obj 76 282 + 2; +#X msg 192 127 0; +#X obj 47 212 t b b f; +#X obj 495 121 list split 2; +#X obj 495 99 list prepend; +#X text 493 68 [inlet]; +#X text 496 80 |; +#X text 557 68 [inlet]; +#X text 560 80 |; +#X text 493 217 |; +#X text 491 231 [outlet]; +#X text 583 156 |; +#X text 581 170 [outlet]; +#X obj 584 138 t b; +#X text 624 93 <== this is an equivalent construction using a [list] +sequence.; +#X text 370 378 <== after the index for the current partition is passed +\, grab the two adjacent values and pass them out.; +#X obj 211 510 outlet; +#X obj 495 200 unpack 0 0; +#X text 550 216 |; +#X text 548 230 [outlet]; +#X text 292 276 <== Two counters \, one to supply partition boundary +locations for writing (right) \, and one for reading (left).; +#X text 111 312 <== (no trigger needed as both sides lead to cold inlets) +; +#X text 308 429 <== as long as there is a partition \, the right value +should never == 0... if it does \, the table is sorted \, so we stop +the main loop and send out the list.; +#X text 49 11 This is the schedule queue for partitions. It would take +much less code to do this with a [list] sequence instead of a table +\, but the table is faster. The [list] sequence is also easier to understand +at first. The size of the table needs to be \, in the worst case \, +2(n-1) where n is the size of the list to be sorted. In this case we +simply use 2n \, as we need some zeroes at the end. This could probably +be done better.; +#X connect 0 0 6 0; +#X connect 3 0 21 0; +#X connect 5 0 4 0; +#X connect 6 0 3 0; +#X connect 6 1 5 0; +#X connect 8 0 9 0; +#X connect 8 0 20 0; +#X connect 9 0 4 0; +#X connect 10 0 11 0; +#X connect 11 0 2 0; +#X connect 12 0 15 0; +#X connect 13 0 1 0; +#X connect 14 0 12 0; +#X connect 15 0 35 0; +#X connect 15 1 10 0; +#X connect 16 0 18 0; +#X connect 17 0 19 0; +#X connect 17 0 14 0; +#X connect 17 0 13 0; +#X connect 18 0 16 1; +#X connect 18 0 5 1; +#X connect 19 0 17 1; +#X connect 20 0 17 1; +#X connect 20 0 16 1; +#X connect 20 0 5 1; +#X connect 21 0 17 0; +#X connect 21 1 16 0; +#X connect 21 2 18 1; +#X connect 22 0 36 0; +#X connect 22 1 23 1; +#X connect 22 2 32 0; +#X connect 23 0 22 0; +#X restore 203 80 pd \$0-queue; +#X text 216 229 <== values used in each partition and every loop -- +easier to store a value than to send it.; +#X text 166 500 <== send a bang to the scheduler if we've just manually +sorted something. A bang will not add a partition to the queue \, but +will increment the index to grab the next partition.; +#X text 284 80 <== the "queue" for scheduling partitions.; +#X connect 0 0 18 0; +#X connect 1 0 23 0; +#X connect 2 0 23 1; +#X connect 6 0 16 0; +#X connect 8 0 9 0; +#X connect 9 0 20 0; +#X connect 9 1 10 0; +#X connect 10 0 12 0; +#X connect 10 1 11 0; +#X connect 11 0 5 0; +#X connect 11 1 4 0; +#X connect 12 0 5 0; +#X connect 15 0 25 0; +#X connect 16 0 3 0; +#X connect 16 1 3 1; +#X connect 17 0 25 0; +#X connect 18 0 19 0; +#X connect 18 1 15 0; +#X connect 18 2 25 1; +#X connect 19 0 22 0; +#X connect 20 0 21 0; +#X connect 20 1 7 0; +#X connect 22 0 1 0; +#X connect 22 1 2 0; +#X connect 23 0 8 0; +#X connect 23 1 8 1; +#X connect 25 0 1 0; +#X connect 25 1 2 0; +#X connect 25 2 19 1; +#X restore 232 235 pd \$0-main-loop; +#X text 51 25 Sort a list of numbers using a quicksort.; +#X obj 205 138 t f f; +#X msg 72 144 1; +#X connect 0 0 12 0; +#X connect 2 0 4 0; +#X connect 3 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 4 0; +#X connect 5 1 4 1; +#X connect 7 0 1 0; +#X connect 7 1 18 0; +#X connect 7 2 17 0; +#X connect 8 0 1 0; +#X connect 9 0 10 0; +#X connect 10 0 8 0; +#X connect 12 0 7 0; +#X connect 14 0 15 0; +#X connect 17 0 9 0; +#X connect 17 1 14 0; +#X connect 18 0 9 0; diff --git a/list-abs/list-random-help.pd b/list-abs/list-random-help.pd new file mode 100755 index 0000000..d06266f --- /dev/null +++ b/list-abs/list-random-help.pd @@ -0,0 +1,69 @@ +#N canvas 0 31 634 420 10; +#N canvas 435 477 293 176 show 0; +#X obj 77 36 inlet; +#X obj 77 109 outlet; +#X obj 77 60 list prepend set; +#X obj 77 85 list trim; +#X connect 0 0 2 0; +#X connect 2 0 3 0; +#X connect 3 0 1 0; +#X restore 105 331 pd show; +#X msg 105 194 bang; +#X msg 150 194 seed 123; +#X floatatom 148 243 5 0 0 2 range - -; +#X floatatom 191 243 5 0 0 2 length - -; +#X text 63 26 [list-random]; +#X obj 105 265 list-random 5; +#X text 101 119 A seed-message is used to seed the random number generator. +; +#X obj 172 140 random; +#X text 103 141 Also see:; +#X text 103 55 generates a list of pseudorandom integers from 0 to +N-1 \, where N is the first creation argument. The second creation +argument specifies the length of the list (minimum and default length +is 1).; +#N canvas 435 477 293 176 show 0; +#X obj 77 36 inlet; +#X obj 77 109 outlet; +#X obj 77 60 list prepend set; +#X obj 77 85 list trim; +#X connect 0 0 2 0; +#X connect 2 0 3 0; +#X connect 3 0 1 0; +#X restore 289 331 pd show; +#X msg 289 351; +#X msg 289 194 bang; +#X msg 334 194 seed 123; +#X floatatom 346 243 5 0 0 2 range - -; +#X floatatom 403 243 5 0 0 2 length - -; +#X obj 289 265 list-random 10 20; +#X msg 114 307 bang; +#X msg 297 308 bang; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 155 AUTHOR Frank Barknecht; +#X text 12 175 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION generates a list of pseudorandom integers +from 0 to N-1 \, where N is the first creation argument; +#X text 12 5 KEYWORDS control list_op random; +#X text 12 75 INLET_0 bang seed; +#X text 12 95 INLET_1 float; +#X text 12 115 INLET_2 float; +#X text 12 135 OUTLET_0 list float; +#X restore 567 386 pd META; +#X msg 105 351; +#X connect 0 0 21 0; +#X connect 1 0 6 0; +#X connect 2 0 6 0; +#X connect 3 0 6 1; +#X connect 4 0 6 2; +#X connect 6 0 0 0; +#X connect 11 0 12 0; +#X connect 13 0 17 0; +#X connect 14 0 17 0; +#X connect 15 0 17 1; +#X connect 16 0 17 2; +#X connect 17 0 11 0; +#X connect 18 0 0 0; +#X connect 19 0 11 0; diff --git a/list-abs/list-random.pd b/list-abs/list-random.pd new file mode 100755 index 0000000..d2cb9cf --- /dev/null +++ b/list-abs/list-random.pd @@ -0,0 +1,39 @@ +#N canvas 253 175 513 548 10; +#X obj 73 55 inlet; +#X msg 73 111 seed \$1; +#X obj 161 290 random \$1; +#X obj 161 352 list prepend; +#X obj 254 353 t a; +#X obj 161 256 until; +#X obj 138 109 t b b b; +#X obj 138 373 list; +#X obj 219 53 inlet; +#X obj 292 54 inlet; +#X obj 292 133 f \$2; +#X obj 303 105 loadbang; +#X obj 73 86 route seed; +#X obj 138 406 outlet; +#X text 73 29 seed/bang; +#X text 220 31 range; +#X text 293 30 length; +#X obj 161 235 f 1; +#X obj 292 153 max 1; +#X connect 0 0 12 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 3 0 7 1; +#X connect 4 0 3 1; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 6 1 17 0; +#X connect 6 2 3 1; +#X connect 7 0 13 0; +#X connect 8 0 2 1; +#X connect 9 0 10 0; +#X connect 10 0 18 0; +#X connect 11 0 10 0; +#X connect 12 0 1 0; +#X connect 12 1 6 0; +#X connect 17 0 5 0; +#X connect 18 0 17 1; diff --git a/list-abs/list-rdrip-help.pd b/list-abs/list-rdrip-help.pd new file mode 100755 index 0000000..88fb832 --- /dev/null +++ b/list-abs/list-rdrip-help.pd @@ -0,0 +1,22 @@ +#N canvas 0 31 565 316 10; +#X msg 100 79 1 2 3 a b c; +#X obj 100 137 print; +#X obj 181 133 bng 15 250 50 0 empty empty end 0 -6 0 8 -262144 -1 +-1; +#X text 70 18 list-rdrip: drips or serializes a list in reverse.; +#X obj 100 106 list-rdrip; +#X text 141 44 Last element will be first to output.; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 65 INLET_0 anything; +#X text 12 45 DESCRIPTION drips or serializes a list in reverse; +#X text 12 105 OUTLET_1 bang; +#X text 12 85 OUTLET_0 float symbol pointer; +#X text 12 5 KEYWORDS control list_op conversion; +#X text 12 125 AUTHOR Frank Barknecht \, Mathieu Bouchard; +#X restore 455 266 pd META; +#X connect 0 0 4 0; +#X connect 4 0 1 0; +#X connect 4 1 2 0; diff --git a/list-abs/list-rdrip.pd b/list-abs/list-rdrip.pd new file mode 100755 index 0000000..94ddfb3 --- /dev/null +++ b/list-abs/list-rdrip.pd @@ -0,0 +1,39 @@ +#N canvas 218 94 842 634 10; +#X obj 123 97 t a a; +#X obj 123 254 spigot; +#X obj 162 162 bang; +#X obj 162 181 1; +#X obj 283 162 route bang; +#X obj 243 163 bang; +#X obj 243 182 0; +#X obj 162 127 list split 2; +#X obj 48 387 list split; +#X obj 115 339 list length; +#X obj 115 364 >> 1; +#X obj 91 32 inlet; +#X obj 350 188 outlet; +#X obj 91 66 t b a; +#X obj 459 150 outlet; +#X text 514 152 signal end of list; +#X obj 123 273 t a a; +#X text 155 29 Copyright 2009 by Mathieu Bouchard/Frank Barknecht; +#X connect 0 0 1 0; +#X connect 0 1 7 0; +#X connect 1 0 16 0; +#X connect 2 0 3 0; +#X connect 3 0 1 1; +#X connect 4 1 12 0; +#X connect 5 0 6 0; +#X connect 6 0 1 1; +#X connect 7 0 2 0; +#X connect 7 2 4 0; +#X connect 7 2 5 0; +#X connect 8 0 0 0; +#X connect 8 1 0 0; +#X connect 9 0 10 0; +#X connect 10 0 8 1; +#X connect 11 0 13 0; +#X connect 13 0 14 0; +#X connect 13 1 0 0; +#X connect 16 0 8 0; +#X connect 16 1 9 0; diff --git a/list-abs/list-reduce-help.pd b/list-abs/list-reduce-help.pd new file mode 100755 index 0000000..f308a8e --- /dev/null +++ b/list-abs/list-reduce-help.pd @@ -0,0 +1,180 @@ +#N canvas 0 31 619 643 10; +#X floatatom 128 286 5 0 0 0 - - -; +#X msg 137 126 bang; +#X obj 179 281 print TWO_ITEMS; +#X obj 107 311 print RESULT; +#X msg 144 150 1; +#X msg 152 196 1 2 3; +#X msg 149 172 1 2; +#X msg 155 219 1 2 3 4; +#X text 182 127 redo last list; +#X text 73 12 [list-reduce]; +#X text 188 151 list with only one item will pass unchanged.; +#X symbolatom 101 416 15 0 0 0 - - -; +#X msg 196 385 \$2-\$1; +#X obj 102 584 list-reduce; +#X msg 102 557 1 2 3 4 5 6 7 8; +#X msg 197 583 \$2 \$1; +#N canvas 209 220 605 355 more-info 0; +#X msg 84 101 bang; +#X obj 126 236 print TWO_ITEMS; +#X obj 54 266 print RESULT; +#X msg 91 125 1; +#X msg 99 171 1 2 3; +#X msg 96 147 1 2; +#X text 36 42 If nothing is connected to the right inlet \, [list-reduce] +will act like the left and right outlets of [list split 2] reversed. +; +#X obj 54 203 list-reduce; +#X msg 342 100 bang; +#X obj 385 244 print TWO_ITEMS; +#X obj 312 265 print RESULT; +#X msg 349 124 1; +#X msg 357 170 1 2 3; +#X msg 354 146 1 2; +#X obj 312 202 list split 2; +#X text 178 202 equal to this:; +#X connect 0 0 7 0; +#X connect 3 0 7 0; +#X connect 4 0 7 0; +#X connect 5 0 7 0; +#X connect 7 0 2 0; +#X connect 7 1 1 0; +#X connect 8 0 14 0; +#X connect 11 0 14 0; +#X connect 12 0 14 0; +#X connect 13 0 14 0; +#X connect 14 0 9 0; +#X connect 14 2 10 0; +#X restore 101 457 pd more-info; +#X obj 102 612 print REVERSE?; +#X obj 101 386 list-reduce; +#X text 93 39 [list-reduce] returns a single value constructed by calling +the user-defined objects connected to the right outlet on the first +two items of the sequence \, then on the result (if it comes in through +the right inlet) and the next item of the original list \, and so on. +; +#X obj 107 248 list-reduce; +#X text 99 487 It's important \, that there will be only one element +coming back in through the right inlet. Lists with more than one item +will be shortened automatically to avoid stack overflows.; +#X text 251 582 <-- two items == bad idea; +#X msg 101 359 a b c d e; +#X obj 329 250 list-reduce; +#X obj 416 250 min; +#N canvas 0 0 450 300 randlist 0; +#X obj 254 138 random 100; +#X obj 254 116 until; +#X msg 366 138 set; +#X msg 232 61 10; +#X msg 254 160 add2 \$1; +#X obj 232 88 t b f b; +#X obj 255 236 outlet; +#X obj 232 38 inlet; +#X connect 0 0 4 0; +#X connect 1 0 0 0; +#X connect 2 0 6 0; +#X connect 3 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 6 0; +#X connect 5 1 1 0; +#X connect 5 2 2 0; +#X connect 7 0 3 0; +#X restore 329 197 pd randlist; +#X msg 329 223 27 92 42 82 48 52 74 33 52 71; +#X msg 329 177 bang; +#X obj 382 276 list-reduce; +#X floatatom 382 300 5 0 0 3 max - -; +#X obj 469 276 max; +#X floatatom 329 301 5 0 0 3 min - -; +#X obj 196 248 +; +#X obj 328 422 list-reduce; +#X floatatom 328 445 5 0 0 0 - - -; +#X msg 328 392 22 31 47 86; +#N canvas 0 0 701 458 compare-two 0; +#X obj 99 12 inlet; +#X obj 99 318 outlet; +#X obj 164 162 abs; +#X obj 99 161 abs; +#X obj 99 41 unpack f f; +#X obj 99 90 t a a; +#X obj 99 272 f; +#X obj 164 90 t a a; +#X obj 131 272 f; +#X obj 99 247 select 1 0; +#X text 178 276 send number with smaller distance back to reduce; +#X text 215 151 calculate distances; +#X obj 99 192 <; +#X obj 217 91 inlet; +#X obj 164 139 -; +#X obj 99 138 -; +#X connect 0 0 4 0; +#X connect 2 0 12 1; +#X connect 3 0 12 0; +#X connect 4 0 5 0; +#X connect 4 1 7 0; +#X connect 5 0 15 0; +#X connect 5 1 6 1; +#X connect 6 0 1 0; +#X connect 7 0 14 0; +#X connect 7 1 8 1; +#X connect 8 0 1 0; +#X connect 9 0 6 0; +#X connect 9 1 8 0; +#X connect 12 0 9 0; +#X connect 13 0 14 1; +#X connect 13 0 15 1; +#X connect 14 0 2 0; +#X connect 15 0 3 0; +#X restore 414 422 pd compare-two; +#X floatatom 507 403 5 0 0 0 - - -; +#X msg 507 380 45; +#X obj 507 357 loadbang; +#X text 325 355 Find closest element:; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 145 AUTHOR Frank Barknecht; +#X text 12 165 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION; +#X text 12 5 KEYWORDS control list_op; +#X text 12 65 INLET_0 bang float list; +#X text 12 105 OUTLET_0 float; +#X text 12 125 OUTLET_1 list; +#X text 12 85 INLET_1 float; +#X restore 557 611 pd META; +#X connect 1 0 20 0; +#X connect 4 0 20 0; +#X connect 5 0 20 0; +#X connect 6 0 20 0; +#X connect 7 0 20 0; +#X connect 12 0 18 1; +#X connect 13 0 17 0; +#X connect 13 1 15 0; +#X connect 14 0 13 0; +#X connect 15 0 13 1; +#X connect 18 0 11 0; +#X connect 18 1 12 0; +#X connect 20 0 0 0; +#X connect 20 0 3 0; +#X connect 20 1 2 0; +#X connect 20 1 33 0; +#X connect 23 0 18 0; +#X connect 24 0 32 0; +#X connect 24 1 25 0; +#X connect 25 0 24 1; +#X connect 26 0 27 0; +#X connect 27 0 24 0; +#X connect 27 0 29 0; +#X connect 28 0 26 0; +#X connect 29 0 30 0; +#X connect 29 1 31 0; +#X connect 31 0 29 1; +#X connect 33 0 20 1; +#X connect 34 0 35 0; +#X connect 34 1 37 0; +#X connect 36 0 34 0; +#X connect 37 0 34 1; +#X connect 38 0 37 1; +#X connect 39 0 38 0; +#X connect 40 0 39 0; diff --git a/list-abs/list-reduce.pd b/list-abs/list-reduce.pd new file mode 100755 index 0000000..689ccdf --- /dev/null +++ b/list-abs/list-reduce.pd @@ -0,0 +1,33 @@ +#N canvas 238 102 593 526 10; +#X obj 86 33 inlet; +#X obj 275 52 inlet; +#X obj 151 352 outlet; +#X obj 205 353 outlet; +#X obj 86 58 route bang; +#X obj 86 83 b; +#X obj 151 84 t b a; +#X obj 151 124 list; +#X obj 151 233 list split 2; +#X obj 151 155 t a b; +#X obj 275 189 list append; +#X text 53 386 [list-reduce]; +#X text 55 423 [list-reduce] returns a single value constructed by +calling the user-defined objects connected to the right outlet on the +first two items of the sequence \, then on the result (if it comes +in through the right inlet) and the next item \, and so on.; +#X obj 275 124 list split 1; +#X connect 0 0 4 0; +#X connect 1 0 13 0; +#X connect 4 0 5 0; +#X connect 4 1 6 0; +#X connect 5 0 7 0; +#X connect 6 0 7 0; +#X connect 6 1 7 1; +#X connect 7 0 9 0; +#X connect 8 0 3 0; +#X connect 8 1 10 1; +#X connect 8 2 2 0; +#X connect 9 0 8 0; +#X connect 9 1 10 1; +#X connect 10 0 8 0; +#X connect 13 0 10 0; diff --git a/list-abs/list-replace-help.pd b/list-abs/list-replace-help.pd new file mode 100755 index 0000000..755767e --- /dev/null +++ b/list-abs/list-replace-help.pd @@ -0,0 +1,37 @@ +#N canvas 0 31 583 391 10; +#X msg 287 266 0 1 2 3 4 5; +#X obj 194 343 print RESULT; +#X obj 240 244 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1 +-1 0; +#X floatatom 240 265 5 0 0 0 - - -; +#X obj 194 298 list-replace 2; +#X text 50 32 list-replace: Replace the list starting at position POS +with a new list \, overwriting the old elements.; +#X text 49 92 POS is zerobased and can be negative \, in which case +it is taken from the end of the orig. list.; +#X text 49 67 Argument: default POS; +#X text 49 129 If POS exceeds the length of the original list in whatever +direction \, is is prepended resp. appended to the orig. list.; +#X msg 194 190 list aa bb; +#X msg 194 216 list aa bb cc dd ee ff gg; +#X msg 194 167 aa; +#N canvas 472 161 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 155 AUTHOR Frank Barknecht; +#X text 12 175 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 75 INLET_0 anything; +#X text 12 95 INLET_1 float; +#X text 12 115 INLET_2 list; +#X text 12 135 OUTLET_0 list; +#X text 12 45 DESCRIPTION replace the list starting at position POS +with a new list \, overwriting the old elements; +#X restore 523 358 pd META; +#X connect 0 0 4 2; +#X connect 2 0 3 0; +#X connect 3 0 4 1; +#X connect 4 0 1 0; +#X connect 9 0 4 0; +#X connect 10 0 4 0; +#X connect 11 0 4 0; diff --git a/list-abs/list-replace.pd b/list-abs/list-replace.pd new file mode 100755 index 0000000..0c07013 --- /dev/null +++ b/list-abs/list-replace.pd @@ -0,0 +1,62 @@ +#N canvas 281 128 614 631 10; +#X obj 164 224 list; +#X obj 327 98 inlet; +#X obj 250 98 inlet; +#X text 331 72 orig; +#X text 256 74 pos; +#X text 77 70 list to insert; +#X obj 85 94 inlet; +#X obj 164 254 list-splat \$1; +#X obj 272 231 list-len; +#X obj 207 281 list split; +#X obj 85 526 list; +#X obj 85 598 outlet; +#X obj 85 317 list prepend; +#X obj 85 120 t a b a b; +#X obj 85 430 list prepend 0; +#X obj 250 125 t f f; +#X obj 207 524 list prepend; +#X obj 85 469 route 0 1; +#X obj 316 347 f; +#X obj 286 282 t a b; +#X obj 316 377 > 0; +#X obj 122 358 r \$0-init; +#X obj 122 377 0; +#X obj 300 524 r \$0-init; +#X obj 176 317 r \$0-init; +#X obj 118 527 r \$0-init; +#X obj 159 131 s \$0-init; +#X text 47 25 list-replace: Replace the list starting at position POS +with a new list \, overwriting the old elements.; +#X connect 0 0 7 0; +#X connect 1 0 0 1; +#X connect 2 0 15 0; +#X connect 6 0 13 0; +#X connect 7 0 12 1; +#X connect 7 1 9 0; +#X connect 7 2 19 0; +#X connect 8 0 9 1; +#X connect 9 1 10 1; +#X connect 9 1 16 1; +#X connect 10 0 11 0; +#X connect 12 0 14 0; +#X connect 13 0 12 0; +#X connect 13 1 0 0; +#X connect 13 2 8 0; +#X connect 13 3 26 0; +#X connect 14 0 17 0; +#X connect 15 0 7 1; +#X connect 15 1 18 1; +#X connect 16 0 11 0; +#X connect 17 0 10 0; +#X connect 17 1 16 0; +#X connect 18 0 20 0; +#X connect 19 0 16 1; +#X connect 19 0 10 1; +#X connect 19 1 18 0; +#X connect 20 0 14 1; +#X connect 21 0 22 0; +#X connect 22 0 14 1; +#X connect 23 0 16 1; +#X connect 24 0 12 1; +#X connect 25 0 10 1; diff --git a/list-abs/list-rev-help.pd b/list-abs/list-rev-help.pd new file mode 100755 index 0000000..1d234bf --- /dev/null +++ b/list-abs/list-rev-help.pd @@ -0,0 +1,23 @@ +#N canvas 0 31 464 309 10; +#X msg 156 76 1 2 3 4; +#X obj 184 109 print Original; +#X obj 156 199 list-rev; +#X obj 184 164 print Reversed; +#X obj 183 230 print Rev_again; +#X text 127 35 list-rev: reverse a list's order.; +#X obj 156 131 list-rev; +#N canvas 472 161 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 105 AUTHOR Frank Barknecht; +#X text 12 125 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 65 INLET_0 anything; +#X text 12 85 OUTLET_0 list; +#X text 12 45 DESCRIPTION reverse a list's order; +#X restore 393 268 pd META; +#X connect 0 0 1 0; +#X connect 0 0 6 0; +#X connect 2 0 4 0; +#X connect 6 0 2 0; +#X connect 6 0 3 0; diff --git a/list-abs/list-rev.pd b/list-abs/list-rev.pd new file mode 100755 index 0000000..d2ea242 --- /dev/null +++ b/list-abs/list-rev.pd @@ -0,0 +1,21 @@ +#N canvas 575 449 566 351 10; +#X obj 92 29 inlet; +#X obj 148 141 t l; +#X obj 92 141 list; +#X obj 152 210 list; +#X obj 152 262 outlet; +#X text 174 95 drip list; +#X text 190 213 intermediate store \, bang'd on list end.; +#X text 178 140 repack in reverse order; +#X obj 92 54 t a b b; +#X obj 92 94 list-drip; +#X connect 0 0 8 0; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 2 0 3 1; +#X connect 3 0 4 0; +#X connect 8 0 9 0; +#X connect 8 1 2 1; +#X connect 8 2 3 1; +#X connect 9 0 2 0; +#X connect 9 1 3 0; diff --git a/list-abs/list-rot-help.pd b/list-abs/list-rot-help.pd new file mode 100755 index 0000000..13869f8 --- /dev/null +++ b/list-abs/list-rot-help.pd @@ -0,0 +1,24 @@ +#N canvas 0 31 479 301 10; +#X msg 136 118 0 1 2 3 4 5 6 7; +#X floatatom 201 151 5 0 0 0 ROT# - -; +#X obj 136 230 print; +#X obj 136 183 list-rot 3; +#X text 124 33 list-rot; +#X text 64 61 Rotate a list (move ROT# elements from front to back) +; +#X text 63 81 Negative ROT# will rotate elements from back to front. +; +#N canvas 472 161 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 65 INLET_0 anything; +#X text 12 45 DESCRIPTION rotate the elements of a list; +#X text 12 105 OUTLET_0 list; +#X text 12 85 INLET_1 float; +#X restore 413 268 pd META; +#X connect 0 0 3 0; +#X connect 1 0 3 1; +#X connect 3 0 2 0; diff --git a/list-abs/list-rot.pd b/list-abs/list-rot.pd new file mode 100755 index 0000000..978a9d8 --- /dev/null +++ b/list-abs/list-rot.pd @@ -0,0 +1,28 @@ +#N canvas 336 258 575 357 10; +#X obj 170 253 list prepend; +#X obj 151 44 inlet; +#X obj 256 47 inlet; +#X text 257 25 how often to rotate; +#X obj 151 280 list; +#X text 146 24 list to rotate; +#X obj 151 310 outlet; +#X text 278 232 move right part of list to left.; +#X obj 256 174 mod \$1; +#X obj 256 152 f \$1; +#X obj 170 212 list split \$1; +#X obj 151 70 t b a b b a; +#X obj 293 153 list-len; +#X connect 0 0 4 1; +#X connect 1 0 11 0; +#X connect 2 0 9 0; +#X connect 4 0 6 0; +#X connect 8 0 10 1; +#X connect 9 0 8 0; +#X connect 10 0 0 0; +#X connect 10 1 0 1; +#X connect 11 0 4 0; +#X connect 11 1 10 0; +#X connect 11 2 0 1; +#X connect 11 3 9 0; +#X connect 11 4 12 0; +#X connect 12 0 8 1; diff --git a/list-abs/list-round-help.pd b/list-abs/list-round-help.pd new file mode 100755 index 0000000..55bb1b0 --- /dev/null +++ b/list-abs/list-round-help.pd @@ -0,0 +1,71 @@ +#N canvas 0 31 625 414 10; +#N canvas 448 238 450 300 show 0; +#X obj 41 39 inlet; +#X obj 186 36 inlet; +#X obj 41 124 outlet; +#X msg 186 76 set; +#X obj 41 59 list prepend set; +#X obj 41 83 list trim; +#X connect 0 0 4 0; +#X connect 1 0 3 0; +#X connect 3 0 2 0; +#X connect 4 0 5 0; +#X connect 5 0 2 0; +#X restore 368 293 pd show; +#X msg 368 318; +#X obj 412 274 bng 15 250 50 1 empty empty clear 0 -6 0 8 -262144 -1 +-1; +#X msg 394 170 1.2 3 4.5 6.7 eight 9; +#X msg 368 144 1.2 3 4.5 6.7 8.9; +#N canvas 448 238 450 300 show 0; +#X obj 41 39 inlet; +#X obj 186 36 inlet; +#X obj 41 124 outlet; +#X msg 186 76 set; +#X obj 41 59 list prepend set; +#X obj 41 83 list trim; +#X connect 0 0 4 0; +#X connect 1 0 3 0; +#X connect 3 0 2 0; +#X connect 4 0 5 0; +#X connect 5 0 2 0; +#X restore 65 289 pd show; +#X msg 65 314; +#X obj 109 270 bng 15 250 50 1 empty empty clear 0 -6 0 8 -262144 -1 +-1; +#X msg 91 166 1.2 3 4.5 6.7 eight 9; +#X msg 62 136 1.2 3 4.5 6.7 8.9; +#X text 56 34 round all numbers in a list to nearest multiple of first +argument or number in second inlet. Using 0 as argument (or no argumement) +will round to 1 (integer round).; +#X text 44 15 list-round; +#X obj 65 225 list-round; +#X text 62 113 simple integer round; +#X obj 368 229 list-round 3; +#X floatatom 130 200 5 0 0 2 round-to? - -; +#X floatatom 447 205 5 0 0 2 round-to? - -; +#X text 154 224 == [list-round 1]; +#N canvas 472 161 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 135 AUTHOR Frank Barknecht; +#X text 12 155 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 115 OUTLET_0 list; +#X text 12 45 DESCRIPTION round all numbers in a list to nearest multiple +of first argument or number in second inlet; +#X text 12 75 INLET_0 list; +#X text 12 95 INLET_1 float; +#X restore 563 378 pd META; +#X connect 0 0 1 0; +#X connect 2 0 0 1; +#X connect 3 0 14 0; +#X connect 4 0 14 0; +#X connect 5 0 6 0; +#X connect 7 0 5 1; +#X connect 8 0 12 0; +#X connect 9 0 12 0; +#X connect 12 0 5 0; +#X connect 14 0 0 0; +#X connect 15 0 12 1; +#X connect 16 0 14 1; diff --git a/list-abs/list-round.pd b/list-abs/list-round.pd new file mode 100755 index 0000000..64acc41 --- /dev/null +++ b/list-abs/list-round.pd @@ -0,0 +1,37 @@ +#N canvas 402 152 538 563 10; +#X obj 74 453 list; +#X obj 97 409 list prepend; +#X obj 74 104 t b a b; +#X text 172 135 "Drip" (serialize) the list; +#X text 121 450 Final result is built here; +#X obj 74 35 inlet; +#X obj 74 484 outlet; +#X text 255 413 Repack the list; +#X obj 193 410 t a; +#X obj 97 134 list-drip; +#X obj 97 230 route float; +#X text 298 308 round it; +#X obj 281 166 inlet; +#X obj 281 232 f \$1; +#X obj 294 201 loadbang; +#X obj 281 254 select 0; +#X msg 281 274 1; +#X obj 97 306 expr int(0.5 + $f1/$f2)*$f2; +#X connect 0 0 6 0; +#X connect 1 0 0 1; +#X connect 1 0 8 0; +#X connect 2 0 0 0; +#X connect 2 1 9 0; +#X connect 2 2 1 1; +#X connect 5 0 2 0; +#X connect 8 0 1 1; +#X connect 9 0 10 0; +#X connect 10 0 17 0; +#X connect 10 1 1 0; +#X connect 12 0 13 0; +#X connect 13 0 15 0; +#X connect 14 0 13 0; +#X connect 15 0 16 0; +#X connect 15 1 17 1; +#X connect 16 0 17 1; +#X connect 17 0 1 0; diff --git a/list-abs/list-sect-help.pd b/list-abs/list-sect-help.pd new file mode 100755 index 0000000..876c619 --- /dev/null +++ b/list-abs/list-sect-help.pd @@ -0,0 +1,61 @@ +#N canvas 0 31 576 432 10; +#X text 78 26 list-sect; +#N canvas 269 263 450 300 sbow 0; +#X obj 120 85 list prepend set; +#X obj 120 109 list trim; +#X obj 120 63 inlet; +#X obj 120 131 outlet; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 2 0 0 0; +#X restore 114 236 pd sbow; +#X obj 114 120 t b b; +#X obj 114 101 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 114 196 list-sect; +#X obj 123 218 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X msg 172 167 5 4 foo 3 2; +#X msg 114 144 1 2 3 4 foo bar 2; +#X obj 114 318 list-unique; +#N canvas 269 263 450 300 sbow 0; +#X obj 120 85 list prepend set; +#X obj 120 109 list trim; +#X obj 120 63 inlet; +#X obj 120 131 outlet; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 2 0 0 0; +#X restore 114 361 pd sbow; +#X obj 123 343 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X msg 114 382; +#X text 113 49 outputs the elements that are common to both input lists. +Left inlet determines order and number of items in result. Duplicates +are kept!; +#X text 127 292 To remove duplicates use [list-unique]; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 135 AUTHOR Frank Barknecht; +#X text 12 155 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION outputs the elements that are common to both +input lists; +#X text 12 5 KEYWORDS control list_op; +#X text 12 75 INLET_0 anything; +#X text 12 95 INLET_1 anything; +#X text 12 115 OUTLET_0 list float bang symbol pointer; +#X restore 514 400 pd META; +#X msg 114 261; +#X connect 1 0 15 0; +#X connect 2 0 7 0; +#X connect 2 1 6 0; +#X connect 3 0 2 0; +#X connect 4 0 1 0; +#X connect 5 0 1 0; +#X connect 6 0 4 1; +#X connect 7 0 4 0; +#X connect 8 0 9 0; +#X connect 9 0 11 0; +#X connect 10 0 9 0; +#X connect 15 0 8 0; diff --git a/list-abs/list-sect.pd b/list-abs/list-sect.pd new file mode 100755 index 0000000..bbccd7a --- /dev/null +++ b/list-abs/list-sect.pd @@ -0,0 +1,34 @@ +#N canvas 384 285 600 467 10; +#X obj 126 173 list-find; +#X obj 184 194 > 0; +#X obj 184 215 select 1; +#X obj 126 117 list-drip; +#X obj 126 142 t a a; +#X obj 204 58 inlet; +#X obj 184 242 list; +#X obj 107 58 inlet; +#X obj 183 265 list prepend; +#X obj 278 265 t a; +#X obj 107 327 list; +#X obj 107 83 t b a b b; +#X obj 107 353 outlet; +#X text 97 18 list-sect; +#X text 134 34 outputs the elements that are common to both input lists: +; +#X connect 0 1 1 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 0 0; +#X connect 4 1 6 1; +#X connect 5 0 0 1; +#X connect 6 0 8 0; +#X connect 7 0 11 0; +#X connect 8 0 9 0; +#X connect 8 0 10 1; +#X connect 9 0 8 1; +#X connect 10 0 12 0; +#X connect 11 0 10 0; +#X connect 11 1 3 0; +#X connect 11 2 10 1; +#X connect 11 3 8 1; diff --git a/list-abs/list-seek-help.pd b/list-abs/list-seek-help.pd new file mode 100755 index 0000000..ca6389b --- /dev/null +++ b/list-abs/list-seek-help.pd @@ -0,0 +1,128 @@ +#N canvas 0 31 666 505 10; +#X msg 139 267 list one two three four; +#X obj 139 365 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 +-1 -1; +#X text 160 366 bang when done or index out of range; +#X floatatom 98 151 5 0 0 0 - - -; +#X msg 81 104 bang; +#N canvas 0 0 450 300 show 0; +#X obj 47 38 inlet; +#X obj 47 115 outlet; +#X obj 47 62 list prepend set; +#X obj 47 85 list trim; +#X connect 0 0 2 0; +#X connect 2 0 3 0; +#X connect 3 0 1 0; +#X restore 81 403 pd show; +#X msg 89 381 bang; +#X msg 165 312 0 1 2 3 4 5 6 7 8 9; +#X msg 151 290 twenty three 23; +#X text 322 267 Set list to seek (will also do a rewind); +#X text 75 45 walk through a list element by element - similar to [textfile] +and [qlist].; +#X text 142 149 output item by index number (zero-based \, only positive) +; +#X text 63 461 2007 Hans-Christoph Steiner \, Frank Barknecht; +#X msg 129 221 set; +#X msg 121 200 set \$1; +#X floatatom 121 180 5 0 0 0 - - -; +#X text 175 223 just "set" is "set 0" (rewind); +#X text 173 200 set start position without output; +#X obj 81 334 list-seek; +#X text 130 103 output one item and move to the next (takes off \, +where the last float \, set or bang message was); +#X text 63 19 [list-seek]; +#N canvas 324 88 739 396 example 0; +#X msg 203 170 0; +#X obj 145 140 list-seek; +#X obj 63 152 delay; +#X obj 78 184 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 203 196 spigot; +#X obj 240 26 tgl 32 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 145 71 select 1; +#X obj 145 92 t b b; +#X obj 63 333 dac~; +#X obj 64 309 *~ 0; +#X obj 101 309 dbtorms; +#X obj 104 286 hsl 128 15 0 100 0 0 empty empty empty -2 -8 0 10 -262144 +-1 -1 0 1; +#X text 261 171 Caution: may generate stack overflows when [list-seek] +is uninitialized!; +#X obj 219 141 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X floatatom 93 105 5 0 0 0 - - -; +#N canvas 0 0 397 287 plong~ 0; +#X obj 112 142 vline~; +#X obj 112 221 *~; +#X obj 112 245 outlet~; +#X obj 112 54 inlet; +#X obj 127 200 osc~ 220; +#X obj 113 168 *~; +#X msg 112 113 1 3 \, 0 100 20; +#X obj 112 78 t b a; +#X obj 215 112 mtof; +#X connect 0 0 5 0; +#X connect 0 0 5 1; +#X connect 1 0 2 0; +#X connect 3 0 7 0; +#X connect 4 0 1 1; +#X connect 5 0 1 0; +#X connect 6 0 0 0; +#X connect 7 0 6 0; +#X connect 7 1 8 0; +#X connect 8 0 4 0; +#X restore 63 263 pd plong~; +#X obj 63 130 * 120; +#X msg 63 240 60; +#X msg 203 115 0 2 2 1 2 2 2 1; +#X connect 0 0 4 0; +#X connect 1 0 16 0; +#X connect 1 1 0 0; +#X connect 1 1 13 0; +#X connect 2 0 3 0; +#X connect 2 0 1 0; +#X connect 2 0 17 0; +#X connect 4 0 1 0; +#X connect 5 0 4 1; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 7 0 1 0; +#X connect 7 1 18 0; +#X connect 9 0 8 0; +#X connect 9 0 8 1; +#X connect 10 0 9 1; +#X connect 11 0 10 0; +#X connect 14 0 16 1; +#X connect 15 0 9 0; +#X connect 16 0 2 0; +#X connect 17 0 15 0; +#X connect 18 0 1 1; +#X restore 265 407 pd example; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 175 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION walk through a list element by element - +similar to [textfile] and [qlist]; +#X text 12 5 KEYWORDS control list_op storage; +#X text 12 75 INLET_0 bang float set; +#X text 12 95 INLET_1 anything; +#X text 12 115 OUTLET_0 symbol float pointer; +#X text 12 135 OUTLET_1 bang; +#X text 12 155 AUTHOR Frank Barknecht \, Hans-Christoph Steiner; +#X restore 602 471 pd META; +#X msg 81 424; +#X connect 0 0 18 1; +#X connect 3 0 18 0; +#X connect 4 0 18 0; +#X connect 5 0 23 0; +#X connect 6 0 5 0; +#X connect 7 0 18 1; +#X connect 8 0 18 1; +#X connect 13 0 18 0; +#X connect 14 0 18 0; +#X connect 15 0 14 0; +#X connect 18 0 5 0; +#X connect 18 1 1 0; diff --git a/list-abs/list-seek.pd b/list-abs/list-seek.pd new file mode 100755 index 0000000..5da1b93 --- /dev/null +++ b/list-abs/list-seek.pd @@ -0,0 +1,46 @@ +#N canvas 443 126 634 604 10; +#X obj 105 76 inlet; +#X obj 300 74 inlet; +#X obj 135 501 outlet; +#X obj 300 500 outlet; +#X text 349 72 list to manipulate; +#X text 298 523 bang when done or index out of range; +#X text 134 522 output value; +#X obj 135 416 list; +#X obj 300 438 bang; +#X obj 135 317 moses; +#X obj 127 239 + 1; +#X msg 105 191 0; +#X obj 165 294 list-len; +#X obj 135 440 list-idx; +#X obj 135 391 t b a; +#X obj 89 239 f; +#X obj 89 317 moses; +#X obj 300 103 t b a a; +#X obj 105 109 route set; +#X obj 105 139 route bang; +#X text 31 23 bang for next item \, float for index or set for no-output. +; +#X connect 0 0 18 0; +#X connect 1 0 17 0; +#X connect 7 0 13 0; +#X connect 8 0 3 0; +#X connect 9 0 14 0; +#X connect 9 1 8 0; +#X connect 10 0 15 1; +#X connect 11 0 15 1; +#X connect 12 0 9 1; +#X connect 13 0 2 0; +#X connect 14 0 7 0; +#X connect 14 1 13 1; +#X connect 15 0 10 0; +#X connect 15 0 16 0; +#X connect 16 0 8 0; +#X connect 16 1 9 0; +#X connect 17 0 11 0; +#X connect 17 1 12 0; +#X connect 17 2 7 1; +#X connect 18 0 19 0; +#X connect 18 1 15 0; +#X connect 19 0 11 0; +#X connect 19 1 15 1; diff --git a/list-abs/list-shellsort-help.pd b/list-abs/list-shellsort-help.pd new file mode 100755 index 0000000..2e68dde --- /dev/null +++ b/list-abs/list-shellsort-help.pd @@ -0,0 +1,52 @@ +#N canvas 0 31 681 593 10; +#X text 59 525 2008 Matt Barber; +#X obj 188 357 hradio 15 1 0 2 empty empty empty 0 -8 0 10 -262144 +-1 -1 0; +#X msg 232 357 asc; +#X msg 270 357 desc; +#X obj 93 205 list-random 100 10; +#X obj 125 256 prepent set; +#X msg 93 179 bang; +#X obj 93 230 t b a; +#X msg 93 291 72 65 75 88 61 50 93 18 88 80; +#X text 279 324 non-floats are removed with a warning.; +#X msg 135 324 100 2 wrong type 3; +#X obj 93 441 prepent set; +#X text 66 80 Inlets: 1) list to sort; +#X text 66 134 Argument:; +#X text 137 134 +; +#X text 65 40 Sort a list of floats into ascending order using a Shell +sort. Non-numbers are dropped.; +#X obj 355 541 list-sort; +#X text 299 510 Alternative implementation available in:; +#X text 121 98 2) direction: 0 or asc for ascending \, 1 or desc for +descending (default asc); +#X obj 35 11 list-shellsort; +#X obj 93 396 list-shellsort; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 155 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION sort a list of floats into ascending order +using a Shell sort. Non-numbers are dropped; +#X text 12 5 KEYWORDS control list_op; +#X text 12 75 INLET_0 list; +#X text 12 95 INLET_1 float asc desc; +#X text 12 135 AUTHOR Matt Barber; +#X text 12 115 OUTLET_0 list; +#X restore 611 564 pd META; +#X msg 93 470; +#X obj 430 541 list-quicksort; +#X connect 1 0 20 1; +#X connect 2 0 20 1; +#X connect 3 0 20 1; +#X connect 4 0 7 0; +#X connect 5 0 8 0; +#X connect 6 0 4 0; +#X connect 7 0 8 0; +#X connect 7 1 5 0; +#X connect 8 0 20 0; +#X connect 10 0 20 0; +#X connect 11 0 22 0; +#X connect 20 0 11 0; diff --git a/list-abs/list-shellsort.pd b/list-abs/list-shellsort.pd new file mode 100755 index 0000000..6e8d5ba --- /dev/null +++ b/list-abs/list-shellsort.pd @@ -0,0 +1,238 @@ +#N canvas 631 361 591 470 10; +#X obj 26 -25 inlet; +#X obj 26 296 outlet; +#N canvas 658 194 260 268 \$0-gap-loop 0; +#X obj 96 66 / 2; +#X obj 96 89 int; +#X obj 34 122 until; +#X obj 34 49 t b f; +#X obj 148 105 sel 0; +#X obj 96 142 t f f; +#X obj 59 159 f; +#X obj 34 26 inlet; +#X obj 59 183 outlet; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 2 0 6 0; +#X connect 3 0 2 0; +#X connect 3 1 0 0; +#X connect 4 0 2 1; +#X connect 5 0 6 1; +#X connect 5 1 4 0; +#X connect 6 0 0 0; +#X connect 6 0 8 0; +#X connect 7 0 3 0; +#X restore 95 150 pd \$0-gap-loop; +#X obj 49 65 list-len; +#N canvas 584 66 450 300 \$0-increment-loop 0; +#X obj 40 26 inlet; +#X obj 163 27 inlet; +#X obj 40 83 until; +#X obj 40 53 t b f; +#X obj 99 100 f; +#X obj 130 101 + 1; +#X obj 136 157 moses; +#X obj 214 175 t b; +#X obj 136 193 outlet; +#X connect 0 0 3 0; +#X connect 1 0 6 1; +#X connect 2 0 4 0; +#X connect 3 0 2 0; +#X connect 3 1 4 1; +#X connect 4 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 4 1; +#X connect 6 0 8 0; +#X connect 6 1 7 0; +#X connect 7 0 2 1; +#X restore 95 195 pd \$0-increment-loop; +#X obj 95 125 t f f; +#X obj 95 173 t f f; +#N canvas 147 172 708 735 \$0-test-swap-loop 0; +#X obj 102 40 inlet; +#X obj 319 46 inlet; +#X obj 102 63 -; +#X obj 101 444 list-idx; +#X obj 162 444 list-idx; +#X obj 304 124 +; +#X obj 101 494 >; +#X obj 101 518 sel 0 1; +#X obj 332 564 f; +#X obj 365 564 f; +#X obj 297 593 list-swap; +#X obj 297 563 list; +#X obj 427 646 list; +#X obj 102 159 until; +#X obj 164 222 moses 0; +#X obj 164 197 f; +#X obj 197 197 -; +#X obj 102 84 t b f; +#X obj 164 265 t b b; +#X obj 191 287 s \$0-stop-loop; +#X obj 165 126 r \$0-stop-loop; +#X obj 164 307 s \$0-bang-list; +#X obj 101 582 t b b; +#X obj 128 604 s \$0-stop-loop; +#X obj 101 625 s \$0-bang-list; +#X obj 427 576 r \$0-bang-list; +#X obj 427 669 outlet; +#X obj 277 499 t b b; +#X obj 102 180 t b b; +#X obj 102 381 list; +#X obj 102 400 t a a; +#X obj 448 599 r \$0-list-init; +#X obj 318 474 r \$0-list-init; +#X obj 123 331 r \$0-list-init; +#X text 316 25 gap; +#X obj 203 244 s \$0-idx; +#X obj 331 85 r \$0-idx; +#X obj 347 498 r \$0-idx; +#X obj 146 382 r \$0-idx; +#X obj 304 145 s \$0-idx+gap; +#X obj 380 531 r \$0-idx+gap; +#X obj 207 407 r \$0-idx+gap; +#X obj 466 620 r \$0-list-swap; +#X obj 297 621 s \$0-list-swap; +#X obj 137 355 r \$0-list-swap; +#N canvas 468 185 584 529 swap? 0; +#X obj 40 52 inlet; +#X obj 153 52 inlet; +#X obj 361 50 inlet; +#X obj 40 272 spigot 1; +#X obj 256 272 spigot; +#X obj 361 224 unpack 0 0; +#X msg 361 178 1 0; +#X msg 412 196 0 1; +#X obj 463 93 select 0; +#X obj 361 71 select asc desc; +#X obj 40 437 outlet; +#X obj 153 437 outlet; +#X obj 256 300 swap; +#X obj 153 271 spigot 1; +#X obj 317 273 spigot; +#X connect 0 0 3 0; +#X connect 0 0 4 0; +#X connect 1 0 13 0; +#X connect 1 0 14 0; +#X connect 2 0 9 0; +#X connect 3 0 10 0; +#X connect 4 0 12 0; +#X connect 5 0 3 1; +#X connect 5 0 13 1; +#X connect 5 1 4 1; +#X connect 5 1 14 1; +#X connect 6 0 5 0; +#X connect 7 0 5 0; +#X connect 8 0 6 0; +#X connect 8 1 7 0; +#X connect 9 0 6 0; +#X connect 9 1 7 0; +#X connect 9 2 8 0; +#X connect 12 0 10 0; +#X connect 12 1 11 0; +#X connect 13 0 11 0; +#X connect 14 0 12 1; +#X restore 101 471 pd swap?; +#X obj 164 470 r \$0-direction; +#X connect 0 0 2 0; +#X connect 1 0 2 1; +#X connect 1 0 5 1; +#X connect 1 0 16 1; +#X connect 2 0 17 0; +#X connect 3 0 45 0; +#X connect 4 0 45 1; +#X connect 5 0 39 0; +#X connect 6 0 7 0; +#X connect 7 0 22 0; +#X connect 7 1 27 0; +#X connect 7 2 22 0; +#X connect 8 0 10 1; +#X connect 9 0 10 2; +#X connect 10 0 11 1; +#X connect 10 0 43 0; +#X connect 11 0 10 0; +#X connect 12 0 26 0; +#X connect 13 0 28 0; +#X connect 14 0 18 0; +#X connect 14 1 35 0; +#X connect 15 0 16 0; +#X connect 15 0 14 0; +#X connect 16 0 15 1; +#X connect 17 0 13 0; +#X connect 17 1 15 1; +#X connect 18 0 21 0; +#X connect 18 1 19 0; +#X connect 20 0 13 1; +#X connect 22 0 24 0; +#X connect 22 1 23 0; +#X connect 25 0 12 0; +#X connect 27 0 11 0; +#X connect 27 1 9 0; +#X connect 27 1 8 0; +#X connect 28 0 29 0; +#X connect 28 1 15 0; +#X connect 29 0 30 0; +#X connect 30 0 3 0; +#X connect 30 1 4 0; +#X connect 31 0 12 1; +#X connect 32 0 11 1; +#X connect 33 0 29 1; +#X connect 36 0 5 0; +#X connect 37 0 8 1; +#X connect 38 0 3 1; +#X connect 40 0 9 1; +#X connect 41 0 4 1; +#X connect 42 0 12 1; +#X connect 44 0 29 1; +#X connect 45 0 6 0; +#X connect 45 1 6 1; +#X connect 46 0 45 2; +#X restore 95 221 pd \$0-test-swap-loop; +#X obj 26 274 list; +#X obj 49 103 sel 0 1; +#X obj 72 43 s \$0-list-init; +#X obj 99 242 r \$0-list-init; +#X obj 26 22 t b a a; +#X obj 26 -1 list-filter; +#N canvas 0 0 677 293 \$0-checknum 0; +#X obj 131 95 route float; +#X msg 131 116 1; +#X obj 205 149 print; +#X msg 205 119 list-sort: Warning: dropped a non-number from list; +#X obj 131 70 inlet; +#X obj 131 149 outlet; +#X connect 0 0 1 0; +#X connect 0 1 3 0; +#X connect 1 0 5 0; +#X connect 3 0 2 0; +#X connect 4 0 0 0; +#X restore 115 -1 pd \$0-checknum; +#X text 46 343 2008 Matt Barber; +#X obj 452 140 loadbang; +#X obj 387 52 inlet; +#X obj 387 201 list append \$1; +#X obj 387 171 t b a; +#X obj 387 229 s \$0-direction; +#X connect 0 0 13 0; +#X connect 2 0 6 0; +#X connect 3 0 9 0; +#X connect 4 0 7 0; +#X connect 5 0 2 0; +#X connect 5 1 4 1; +#X connect 6 0 4 0; +#X connect 6 1 7 1; +#X connect 7 0 8 1; +#X connect 8 0 1 0; +#X connect 9 2 5 0; +#X connect 11 0 8 1; +#X connect 12 0 8 0; +#X connect 12 1 3 0; +#X connect 12 2 10 0; +#X connect 13 0 12 0; +#X connect 13 1 14 0; +#X connect 14 0 13 1; +#X connect 16 0 18 0; +#X connect 17 0 19 0; +#X connect 18 0 20 0; +#X connect 19 0 18 0; +#X connect 19 1 18 1; diff --git a/list-abs/list-sieve-help.pd b/list-abs/list-sieve-help.pd new file mode 100755 index 0000000..ae0ebdc --- /dev/null +++ b/list-abs/list-sieve-help.pd @@ -0,0 +1,103 @@ +#N canvas 0 31 566 348 10; +#X floatatom 132 121 5 0 10 0 - - -; +#X obj 132 174 list-sieve; +#X obj 199 209 print MISS; +#X obj 132 233 print FOUND; +#X text 61 30 list-sieve; +#X text 73 55 Look up occurence of incoming floats in a list. If found +\, pass them along \, if not \, signal the miss in second outlet.; +#X obj 306 157 tgl 15 0 empty empty try_me! 0 -6 0 8 -262144 -1 -1 +0 1; +#N canvas 500 266 524 502 gameboy-player 0; +#X obj 173 50 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X obj 173 105 random 12; +#X obj 173 144 list-sieve; +#X obj 269 61 loadbang; +#X obj 173 176 + 48; +#X obj 260 143 t b; +#N canvas 0 0 597 521 gameboy 0; +#X obj 136 165 mtof; +#X obj 137 291 *~; +#X obj 224 255 vline~; +#X obj 275 130 / 127; +#X obj 136 84 inlet; +#X obj 224 53 inlet; +#X obj 135 326 dac~; +#X obj 224 96 select 0; +#X obj 274 152 t f f; +#X obj 274 180 pack 0 0; +#X obj 225 285 *~; +#X obj 224 312 *~; +#X obj 325 156 * 0.8; +#X obj 136 223 phasor~; +#X obj 137 257 lop~ 18000; +#X msg 224 118 0 80; +#X msg 274 202 \$1 30 \, \$2 100 30; +#X connect 0 0 13 0; +#X connect 1 0 6 0; +#X connect 1 0 6 1; +#X connect 2 0 10 0; +#X connect 2 0 10 1; +#X connect 3 0 8 0; +#X connect 4 0 0 0; +#X connect 5 0 7 0; +#X connect 7 0 15 0; +#X connect 7 1 3 0; +#X connect 8 0 9 0; +#X connect 8 1 12 0; +#X connect 9 0 16 0; +#X connect 10 0 11 0; +#X connect 10 0 11 1; +#X connect 11 0 1 1; +#X connect 12 0 9 1; +#X connect 13 0 14 0; +#X connect 14 0 1 0; +#X connect 15 0 2 0; +#X connect 16 0 2 0; +#X restore 173 274 pd gameboy; +#X obj 75 104 select 1; +#X msg 75 134 \; pd dsp 1; +#X msg 269 84 0 2 4 5 7 9 11; +#X msg 269 105 0 2 3 5 7 9 10; +#X obj 173 27 inlet; +#X obj 173 72 metro 200; +#X obj 173 210 makenote 100 100; +#X text 296 144 careful with stack overflows!!; +#X connect 0 0 7 0; +#X connect 0 0 12 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 2 1 5 0; +#X connect 3 0 9 0; +#X connect 4 0 13 0; +#X connect 5 0 1 0; +#X connect 7 0 8 0; +#X connect 9 0 2 1; +#X connect 10 0 2 1; +#X connect 11 0 0 0; +#X connect 12 0 1 0; +#X connect 13 0 6 0; +#X connect 13 1 6 1; +#X restore 306 178 pd gameboy-player; +#X obj 199 119 loadbang; +#X msg 199 143 0 2 3 5 7 10; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 165 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION look up occurence of incoming floats in a +list; +#X text 12 65 INLET_0 float; +#X text 12 85 INLET_1 list; +#X text 12 105 OUTLET_0 float; +#X text 12 125 OUTLET_1 float; +#X text 12 145 AUTHOR Frank Barknecht; +#X restore 495 312 pd META; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 1 1 2 0; +#X connect 6 0 7 0; +#X connect 8 0 9 0; +#X connect 9 0 1 1; diff --git a/list-abs/list-sieve.pd b/list-abs/list-sieve.pd new file mode 100755 index 0000000..a50d6dc --- /dev/null +++ b/list-abs/list-sieve.pd @@ -0,0 +1,46 @@ +#N canvas 421 357 511 459 10; +#X obj 100 19 inlet; +#X obj 190 115 list; +#X obj 190 137 list-drip; +#X obj 35 297 select; +#X obj 35 355 f; +#X obj 213 67 inlet; +#X obj 35 239 f; +#X obj 35 379 outlet; +#X obj 100 46 t b a b; +#X obj 248 351 spigot 1; +#X obj 35 326 t b b; +#X obj 248 374 outlet; +#X obj 159 67 s \$0-s; +#X obj 299 326 r \$0-s; +#X obj 81 349 s \$0-s; +#X msg 159 42 1; +#X msg 81 325 0; +#X obj 51 161 route float; +#X obj 190 177 route float; +#X obj 248 324 f; +#X obj 35 211 t b f f f; +#X connect 0 0 8 0; +#X connect 1 0 2 0; +#X connect 2 0 18 0; +#X connect 2 1 19 0; +#X connect 3 0 10 0; +#X connect 4 0 7 0; +#X connect 5 0 1 1; +#X connect 6 0 3 0; +#X connect 8 0 1 0; +#X connect 8 1 17 0; +#X connect 8 2 15 0; +#X connect 9 0 11 0; +#X connect 10 0 4 0; +#X connect 10 1 16 0; +#X connect 13 0 9 1; +#X connect 15 0 12 0; +#X connect 16 0 14 0; +#X connect 17 0 6 1; +#X connect 17 0 19 1; +#X connect 18 0 20 0; +#X connect 19 0 9 0; +#X connect 20 0 6 0; +#X connect 20 1 3 1; +#X connect 20 2 4 1; diff --git a/list-abs/list-sort-help.pd b/list-abs/list-sort-help.pd new file mode 100755 index 0000000..9da4521 --- /dev/null +++ b/list-abs/list-sort-help.pd @@ -0,0 +1,55 @@ +#N canvas 0 31 672 619 10; +#X obj 188 357 hradio 15 1 0 2 empty empty empty 0 -8 0 10 -262144 +-1 -1 0; +#X msg 232 357 asc; +#X msg 270 357 desc; +#X obj 93 205 list-random 100 10; +#X obj 125 256 prepent set; +#X msg 93 179 bang; +#X obj 93 230 t b a; +#X msg 93 291 91 35 78 70 85 46 64 10 93 83; +#X text 279 324 non-floats are removed with a warning.; +#X msg 135 324 100 2 wrong type 3; +#X obj 93 441 prepent set; +#X obj 93 396 list-sort desc; +#X text 66 80 Inlets: 1) list to sort; +#X text 66 134 Argument:; +#X text 121 98 2) direction: 0 or asc for ascending \, 1 or desc for +descending; +#X text 137 134 +; +#X text 65 40 Sort an incoming list of values in ascending or descending +order. Non-numbers are dropped.; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION sort an incoming list of values in ascending +or descending order; +#X text 12 75 INLET_0 list; +#X text 12 95 INLET_1 float asc desc; +#X text 12 115 OUTLET_0 list; +#X text 12 165 HELP_PATCH_AUTHORS Michal Seta (orig. version) \, Frank +Barknecht. "pd meta" information added by Jonathan Wilkes for Pd version +0.42.; +#X text 12 135 AUTHOR Frank Barknecht (DS version) \, Michal Seta (orig. +version); +#X restore 571 544 pd META; +#X msg 93 470; +#X text 311 452 Alternative implementations available in:; +#X obj 435 482 list-shellsort; +#X obj 321 482 list-quicksort; +#X text 75 529 2011 Frank Barknecht; +#X obj 35 11 list-sort; +#X text 298 510 [list-sort] currently is the fastest version.; +#X connect 0 0 11 1; +#X connect 1 0 11 1; +#X connect 2 0 11 1; +#X connect 3 0 6 0; +#X connect 4 0 7 0; +#X connect 5 0 3 0; +#X connect 6 0 7 0; +#X connect 6 1 4 0; +#X connect 7 0 11 0; +#X connect 9 0 11 0; +#X connect 10 0 18 0; +#X connect 11 0 10 0; diff --git a/list-abs/list-sort.pd b/list-abs/list-sort.pd new file mode 100755 index 0000000..22719f2 --- /dev/null +++ b/list-abs/list-sort.pd @@ -0,0 +1,133 @@ +#N struct 1009-f float x; +#N canvas 327 79 766 758 10; +#N canvas 0 0 450 300 \$0-f 0; +#X obj 59 51 struct \$0-f float x; +#X restore 453 61 pd \$0-f; +#N canvas 0 0 450 300 \$0-sort 0; +#X scalar 1009-f 161 \;; +#X scalar 1009-f 481 \;; +#X scalar 1009-f 509 \;; +#X scalar 1009-f 645 \;; +#X scalar 1009-f 695 \;; +#X scalar 1009-f 760 \;; +#X scalar 1009-f 770 \;; +#X scalar 1009-f 907 \;; +#X scalar 1009-f 994 \;; +#X scalar 1009-f 1212 \;; +#X restore 453 91 pd \$0-sort; +#X obj 211 238 pointer; +#X msg 211 214 traverse \$1 \, bang; +#X obj 123 263 append \$0-f x; +#X msg 365 180 clear; +#X obj 365 205 s pd-\$0-sort; +#X obj 318 384 s pd-\$0-sort; +#X msg 318 364 sort; +#X obj 103 53 inlet; +#X obj 211 190 symbol pd-\$0-sort; +#X obj 128 443 pointer; +#X obj 176 364 symbol pd-\$0-sort; +#X obj 128 566 list prepend; +#X obj 223 566 t a; +#X obj 128 494 get \$0-f x; +#X obj 103 650 list; +#X msg 128 408 next; +#X obj 103 675 outlet; +#X text 460 673 2011 Frank Barknecht; +#X obj 357 566 t a; +#X obj 655 107 loadbang; +#X obj 593 59 inlet; +#X obj 593 168 list append \$1; +#X obj 593 138 t b a; +#X obj 593 196 s \$0-direction; +#X obj 262 566 list append; +#N canvas 0 0 552 424 direction 0; +#X obj 40 52 inlet; +#X obj 255 49 inlet; +#X obj 40 266 spigot 1; +#X obj 153 266 spigot; +#X obj 255 223 unpack 0 0; +#X msg 255 177 1 0; +#X msg 306 195 0 1; +#X obj 357 92 select 0; +#X obj 255 70 select asc desc; +#X obj 40 317 outlet; +#X obj 153 322 outlet; +#X connect 0 0 2 0; +#X connect 0 0 3 0; +#X connect 1 0 8 0; +#X connect 2 0 9 0; +#X connect 3 0 10 0; +#X connect 4 0 2 1; +#X connect 4 1 3 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 5 0; +#X connect 7 1 6 0; +#X connect 8 0 5 0; +#X connect 8 1 6 0; +#X connect 8 2 7 0; +#X restore 128 530 pd direction; +#X obj 209 508 r \$0-direction; +#X obj 123 189 list-rdrip; +#N canvas 0 0 626 259 filter-f 0; +#X obj 171 142 print; +#X obj 171 86 b; +#X obj 97 35 inlet; +#X obj 97 57 route float; +#X msg 171 112 list-sort: Warning: dropped a non-number from list; +#X obj 97 87 outlet; +#X connect 1 0 4 0; +#X connect 2 0 3 0; +#X connect 3 0 5 0; +#X connect 3 1 1 0; +#X connect 4 0 0 0; +#X restore 123 214 pd filter-f; +#X text 306 630 This list-sorting algorithm uses a data structure subpatch +to sort the list.; +#X obj 103 294 list length; +#X obj 103 138 t a a b b; +#X obj 128 365 until; +#X msg 176 388 traverse \$1; +#X obj 103 328 t b f b b b b b b; +#X connect 2 0 4 1; +#X connect 3 0 2 0; +#X connect 5 0 6 0; +#X connect 8 0 7 0; +#X connect 9 0 33 0; +#X connect 10 0 3 0; +#X connect 11 0 15 0; +#X connect 11 1 34 1; +#X connect 12 0 35 0; +#X connect 13 0 14 0; +#X connect 13 0 16 1; +#X connect 14 0 13 1; +#X connect 15 0 27 0; +#X connect 16 0 18 0; +#X connect 17 0 11 0; +#X connect 20 0 26 1; +#X connect 21 0 23 0; +#X connect 22 0 24 0; +#X connect 23 0 25 0; +#X connect 24 0 23 0; +#X connect 24 1 23 1; +#X connect 26 0 20 0; +#X connect 26 0 16 1; +#X connect 27 0 13 0; +#X connect 27 1 26 0; +#X connect 28 0 27 1; +#X connect 29 0 30 0; +#X connect 30 0 4 0; +#X connect 32 0 36 0; +#X connect 33 0 32 0; +#X connect 33 1 29 0; +#X connect 33 2 10 0; +#X connect 33 3 5 0; +#X connect 33 3 16 1; +#X connect 34 0 17 0; +#X connect 35 0 11 0; +#X connect 36 0 16 0; +#X connect 36 1 34 0; +#X connect 36 2 12 0; +#X connect 36 5 13 1; +#X connect 36 6 26 1; +#X connect 36 7 8 0; diff --git a/list-abs/list-splat-help.pd b/list-abs/list-splat-help.pd new file mode 100755 index 0000000..a7a25aa --- /dev/null +++ b/list-abs/list-splat-help.pd @@ -0,0 +1,55 @@ +#N canvas 0 31 583 340 10; +#X floatatom 197 104 5 0 0 0 - - -; +#X msg 118 105 0 1 2 3 4; +#X obj 197 163 print shorter; +#N canvas 130 18 600 416 rot 0; +#X obj 173 193 list prepend; +#X obj 151 44 inlet; +#X obj 252 115 inlet; +#X text 304 115 how often to rotate; +#X obj 151 220 list; +#X text 198 43 list to rotate; +#X obj 151 250 outlet; +#X obj 151 70 t b l b; +#X text 267 194 move right part of list to left.; +#X obj 173 152 list-splat 1; +#X connect 0 0 4 1; +#X connect 1 0 7 0; +#X connect 2 0 9 1; +#X connect 4 0 6 0; +#X connect 7 0 4 0; +#X connect 7 1 9 0; +#X connect 7 2 0 1; +#X connect 9 0 0 0; +#X connect 9 1 0 1; +#X restore 374 156 pd rot; +#X msg 374 126 0 1 2 3 4; +#X floatatom 456 127 5 0 0 0 - - -; +#X obj 374 184 print; +#X obj 118 138 list-splat 2; +#X text 72 37 list-splat: an advanced [list split] which also accepts +negative indices to split of elements from the back of a list.; +#X obj 118 219 print head; +#X obj 157 192 print tail; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 195 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION an advanced [list split] which also accepts +negative indices to split elements from the back of a list; +#X text 12 75 INLET_0 anything; +#X text 12 95 INLET_1 float; +#X text 12 115 OUTLET_0 list float symbol pointer; +#X text 12 135 OUTLET_1 list float symbol pointer; +#X text 12 155 OUTLET_2 list float symbol pointer; +#X text 12 175 AUTHOR Frank Barknecht; +#X restore 521 311 pd META; +#X connect 0 0 7 1; +#X connect 1 0 7 0; +#X connect 3 0 6 0; +#X connect 4 0 3 0; +#X connect 5 0 3 1; +#X connect 7 0 9 0; +#X connect 7 1 10 0; +#X connect 7 2 2 0; diff --git a/list-abs/list-splat.pd b/list-abs/list-splat.pd new file mode 100755 index 0000000..22e3827 --- /dev/null +++ b/list-abs/list-splat.pd @@ -0,0 +1,73 @@ +#N canvas 628 149 479 392 10; +#X obj 84 29 inlet; +#X obj 162 29 inlet; +#X obj 84 226 outlet; +#X obj 171 227 outlet; +#X obj 267 228 outlet; +#N canvas 309 114 692 535 negatives 0; +#X obj 213 50 inlet; +#X obj 289 121 inlet; +#X obj 213 447 outlet; +#X obj 245 407 outlet; +#X obj 278 376 outlet; +#X obj 213 325 list split; +#X obj 243 95 list-len; +#X text 80 20 This will only get called \, if the index is negative. +; +#X obj 213 74 t a a; +#X obj 273 148 +; +#X obj 273 171 moses; +#X obj 243 121 t f f; +#X msg 273 193 1; +#X obj 227 257 +; +#X text 66 258 this is a hack: ==>; +#X connect 0 0 8 0; +#X connect 1 0 9 1; +#X connect 5 0 2 0; +#X connect 5 1 3 0; +#X connect 5 2 4 0; +#X connect 6 0 11 0; +#X connect 8 0 5 0; +#X connect 8 1 6 0; +#X connect 9 0 10 0; +#X connect 10 0 12 0; +#X connect 10 1 5 1; +#X connect 11 0 13 1; +#X connect 11 1 9 0; +#X connect 12 0 13 0; +#X connect 13 0 5 1; +#X restore 188 169 pd negatives; +#X obj 135 113 < 0; +#N canvas 235 272 450 300 route 0; +#X obj 76 76 inlet; +#X obj 155 74 inlet; +#X obj 76 123 list prepend; +#X obj 76 158 route 0 1; +#X obj 76 231 outlet; +#X obj 105 192 outlet; +#X connect 0 0 2 0; +#X connect 1 0 2 1; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 3 1 5 0; +#X restore 84 137 pd route; +#X obj 162 63 f \$1; +#X obj 210 29 loadbang; +#X obj 162 85 t f f f; +#X obj 84 168 list split; +#X connect 0 0 7 0; +#X connect 1 0 8 0; +#X connect 5 0 2 0; +#X connect 5 1 3 0; +#X connect 5 2 4 0; +#X connect 6 0 7 1; +#X connect 7 0 11 0; +#X connect 7 1 5 0; +#X connect 8 0 10 0; +#X connect 9 0 8 0; +#X connect 10 0 6 0; +#X connect 10 1 11 1; +#X connect 10 2 5 1; +#X connect 11 0 2 0; +#X connect 11 1 3 0; +#X connect 11 2 4 0; diff --git a/list-abs/list-stddev-help.pd b/list-abs/list-stddev-help.pd new file mode 100755 index 0000000..fc35a83 --- /dev/null +++ b/list-abs/list-stddev-help.pd @@ -0,0 +1,26 @@ +#N canvas 0 0 565 344 10; +#X obj 110 105 list-random 100 10; +#X msg 215 155 11 17 21 9 43 28 2 50 72 12; +#N canvas 0 0 450 300 show 0; +#X obj 41 39 inlet; +#X obj 186 36 inlet; +#X obj 41 124 outlet; +#X msg 186 76 set; +#X obj 41 59 list prepend set; +#X obj 41 83 list trim; +#X connect 0 0 4 0; +#X connect 1 0 3 0; +#X connect 3 0 2 0; +#X connect 4 0 5 0; +#X connect 5 0 2 0; +#X restore 215 135 pd show; +#X msg 110 84 bang; +#X obj 110 135 list-stddev; +#X floatatom 110 158 5 0 0 3 std_deviation - -; +#X text 66 41 list-stddev - calculate the standard deviation of a float +list; +#X connect 0 0 2 0; +#X connect 0 0 4 0; +#X connect 2 0 1 0; +#X connect 3 0 0 0; +#X connect 4 0 5 0; diff --git a/list-abs/list-stddev.pd b/list-abs/list-stddev.pd new file mode 100755 index 0000000..1182ce2 --- /dev/null +++ b/list-abs/list-stddev.pd @@ -0,0 +1,36 @@ +#N canvas 259 173 646 615 10; +#X obj 168 29 inlet; +#X obj 168 379 sqrt; +#X obj 168 400 outlet; +#X obj 361 160 list length; +#X obj 168 358 /; +#X obj 186 185 -; +#X obj 186 230 t f f; +#X obj 186 252 *; +#X obj 186 159 list-drip; +#X obj 186 279 +; +#X obj 217 280 f; +#X msg 242 256 0; +#X obj 168 318 f; +#X obj 168 57 t b a a a b; +#X obj 283 160 list-mean; +#X connect 0 0 13 0; +#X connect 1 0 2 0; +#X connect 3 0 4 1; +#X connect 4 0 1 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 6 1 7 1; +#X connect 7 0 9 0; +#X connect 8 0 5 0; +#X connect 9 0 10 0; +#X connect 9 0 12 1; +#X connect 10 0 9 1; +#X connect 11 0 9 1; +#X connect 12 0 4 0; +#X connect 13 0 12 0; +#X connect 13 1 8 0; +#X connect 13 2 14 0; +#X connect 13 3 3 0; +#X connect 13 4 11 0; +#X connect 14 0 5 1; diff --git a/list-abs/list-sub-help.pd b/list-abs/list-sub-help.pd new file mode 100755 index 0000000..49133ef --- /dev/null +++ b/list-abs/list-sub-help.pd @@ -0,0 +1,20 @@ +#N canvas 0 31 450 300 10; +#X obj 145 177 list-sub; +#X msg 145 116 5 5 5 NOPE 5; +#X obj 145 217 print; +#X msg 196 141 1 2 3 0 -1; +#X text 108 67 Substract two lists element by element; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION substract two lists element by element; +#X text 12 65 INLET_0 list; +#X text 12 85 INLET_1 list; +#X text 12 105 OUTLET_0 list; +#X text 12 125 AUTHOR Frank Barknecht; +#X restore 389 266 pd META; +#X connect 0 0 2 0; +#X connect 1 0 0 0; +#X connect 3 0 0 1; diff --git a/list-abs/list-sub.pd b/list-abs/list-sub.pd new file mode 100755 index 0000000..9cd944f --- /dev/null +++ b/list-abs/list-sub.pd @@ -0,0 +1,8 @@ +#N canvas 256 135 500 518 10; +#X obj 59 31 inlet; +#X obj 138 34 inlet; +#X obj 59 117 outlet; +#X obj 59 85 list-emath -; +#X connect 0 0 3 0; +#X connect 1 0 3 1; +#X connect 3 0 2 0; diff --git a/list-abs/list-swap-help.pd b/list-abs/list-swap-help.pd new file mode 100755 index 0000000..733a304 --- /dev/null +++ b/list-abs/list-swap-help.pd @@ -0,0 +1,30 @@ +#N canvas 0 31 574 354 10; +#X msg 57 84 0 1 2 3 4 5 6 7 8 9 10 11; +#X floatatom 145 148 5 0 0 0 - - -; +#X floatatom 101 146 5 0 0 0 - - -; +#X obj 57 190 list-swap 2 5; +#X text 49 19 [list-swap] - swap two elements of a list at given indices. +Index values can be negative. If an index value is out of range \, +the list is passed with no change.; +#X msg 75 114 list a b c d e f g h i j k; +#X obj 57 216 prepent set; +#X msg 57 241 a c b; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 165 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 65 INLET_0 anything; +#X text 12 145 AUTHOR Frank Barknecht; +#X text 12 45 DESCRIPTION swap two elements of a list at given indices +; +#X text 12 85 INLET_1 float; +#X text 12 105 INLET_2 flaot; +#X text 12 125 OUTLET_0 list; +#X restore 512 322 pd META; +#X connect 0 0 3 0; +#X connect 1 0 3 2; +#X connect 2 0 3 1; +#X connect 3 0 6 0; +#X connect 5 0 3 0; +#X connect 6 0 7 0; diff --git a/list-abs/list-swap.pd b/list-abs/list-swap.pd new file mode 100755 index 0000000..0facb5f --- /dev/null +++ b/list-abs/list-swap.pd @@ -0,0 +1,82 @@ +#N canvas 401 249 706 675 10; +#X obj 32 27 inlet; +#X obj 98 546 outlet; +#X obj 217 48 inlet; +#X obj 355 59 inlet; +#X obj 260 429 list-replace; +#X obj 113 400 list-idx; +#X obj 260 385 list-idx; +#X obj 196 101 f \$1; +#X obj 334 105 f \$2; +#X obj 113 446 list-replace; +#X obj 224 126 s \$0-idx-1; +#X obj 358 165 s \$0-idx-2; +#X obj 275 323 r \$0-idx-1; +#X obj 158 333 r \$0-idx-2; +#N canvas 229 564 450 300 \$0-test-range 0; +#X obj 46 38 inlet; +#X obj 181 48 inlet; +#X obj 307 44 inlet; +#X obj 46 69 list-len; +#X obj 185 119 abs; +#X obj 323 121 abs; +#X obj 185 95 moses 0; +#X obj 323 96 moses 0; +#X obj 224 119 + 1; +#X obj 362 121 + 1; +#X obj 76 118 t f f; +#X obj 231 217 &&; +#X obj 326 171 >=; +#X obj 183 175 >=; +#X obj 235 252 outlet; +#X connect 0 0 3 0; +#X connect 1 0 6 0; +#X connect 2 0 7 0; +#X connect 3 0 10 0; +#X connect 4 0 13 1; +#X connect 5 0 12 1; +#X connect 6 0 4 0; +#X connect 6 1 8 0; +#X connect 7 0 5 0; +#X connect 7 1 9 0; +#X connect 8 0 13 1; +#X connect 9 0 12 1; +#X connect 10 0 13 0; +#X connect 10 1 12 0; +#X connect 11 0 14 0; +#X connect 12 0 11 1; +#X connect 13 0 11 0; +#X restore 150 170 pd \$0-test-range; +#X obj 85 228 == 0; +#X obj 52 253 spigot; +#X obj 159 227 spigot; +#X obj 32 49 t a a b; +#X obj 162 250 t a a a; +#X connect 0 0 18 0; +#X connect 2 0 7 1; +#X connect 3 0 8 1; +#X connect 4 0 9 2; +#X connect 5 0 9 0; +#X connect 6 0 4 0; +#X connect 7 0 14 1; +#X connect 7 0 10 0; +#X connect 8 0 14 2; +#X connect 8 0 11 0; +#X connect 9 0 1 0; +#X connect 12 0 6 1; +#X connect 12 0 9 1; +#X connect 13 0 5 1; +#X connect 13 0 4 1; +#X connect 14 0 15 0; +#X connect 14 0 17 1; +#X connect 15 0 16 1; +#X connect 16 0 1 0; +#X connect 17 0 19 0; +#X connect 18 0 17 0; +#X connect 18 0 16 0; +#X connect 18 1 14 0; +#X connect 18 2 8 0; +#X connect 18 2 7 0; +#X connect 19 0 5 0; +#X connect 19 1 6 0; +#X connect 19 2 4 2; diff --git a/list-abs/list-tabdump-help.pd b/list-abs/list-tabdump-help.pd new file mode 100755 index 0000000..b922ff3 --- /dev/null +++ b/list-abs/list-tabdump-help.pd @@ -0,0 +1,64 @@ +#N canvas 0 31 881 635 10; +#X msg 618 57 0 1 2 3 4 5 6 7 8 9 10; +#X obj 618 34 loadbang; +#X msg 39 126 bang; +#X obj 39 384 print dump; +#X obj 619 142 loadbang; +#X msg 619 165 0 10 20 30 40 50 60 70 80 90 100; +#X obj 619 187 s y-dump; +#X obj 619 213 table y-dump 10; +#X obj 618 104 table x-dump 10; +#X obj 618 79 s x-dump; +#X floatatom 46 188 5 0 0 0 - - -; +#X msg 55 279 list x-dump 3 4; +#X msg 55 223 list x-dump 3; +#X msg 56 307 list y-dump 1 3; +#X obj 89 497 expr size("$s1"); +#X floatatom 104 523 5 0 0 0 - - -; +#X obj 36 465 t a a; +#X obj 36 545 pack s 0; +#X msg 36 443 symbol y-dump; +#X text 213 495 gets size of array; +#X text 21 23 list-tabdump: get a table's content as a list.; +#X text 172 187 float : set to and do a dump; +#X text 33 58 Arguments: ; +#X text 174 223 list : set and +and do a dump.; +#X text 174 291 list : set \, + and position and do a dump.; +#X text 171 124 bang: dump contents of table as specified by
+\, and .
\, and can be set by +arguments or with the following messages.; +#X obj 39 349 list-tabdump x-dump; +#X text 33 91 Inlet methods:; +#X obj 36 603 print dump; +#X obj 36 568 list-tabdump y-dump; +#X text 34 412 Hint: You can use [expr] to get the size of a table +if you want to dump everything:; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 105 AUTHOR Frank Barknecht; +#X text 12 125 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION get a table's content as a list; +#X text 12 65 INLET_0 bang float list; +#X text 12 85 OUTLET_0 list; +#X restore 817 602 pd META; +#X connect 0 0 9 0; +#X connect 1 0 0 0; +#X connect 2 0 26 0; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 10 0 26 0; +#X connect 11 0 26 0; +#X connect 12 0 26 0; +#X connect 13 0 26 0; +#X connect 14 0 15 0; +#X connect 14 0 17 1; +#X connect 16 0 17 0; +#X connect 16 1 14 0; +#X connect 17 0 29 0; +#X connect 18 0 16 0; +#X connect 26 0 3 0; +#X connect 29 0 28 0; diff --git a/list-abs/list-tabdump.pd b/list-abs/list-tabdump.pd new file mode 100755 index 0000000..00472b1 --- /dev/null +++ b/list-abs/list-tabdump.pd @@ -0,0 +1,83 @@ +#N canvas 288 81 555 678 10; +#X obj 68 19 inlet; +#X obj 68 602 outlet; +#X obj 88 285 f \$2; +#X obj 146 406 until; +#X obj 185 446 + 1; +#X obj 146 497 tabread \$1; +#X obj 215 444 symbol \$1; +#X msg 215 465 set \$1; +#X obj 106 256 unpack 0 0 s; +#X obj 153 49 s \$0-reset; +#X obj 225 496 r \$0-reset; +#X obj 194 406 f \$3; +#X obj 146 446 f; +#X obj 194 359 r \$0-reset; +#X obj 88 326 moses; +#X obj 88 118 list prepend; +#X obj 88 146 route 0 1 2 3; +#X obj 131 180 list append 0; +#X obj 68 51 t b a a b; +#N canvas 0 0 450 300 rot1 0; +#X obj 173 193 list prepend; +#X obj 151 44 inlet; +#X obj 259 115 inlet; +#X text 311 115 how often to rotate; +#X obj 151 220 list; +#X text 198 43 list to rotate; +#X obj 151 250 outlet; +#X text 267 194 move right part of list to left.; +#X obj 151 70 t b a b; +#X obj 174 152 list split 1; +#X connect 0 0 4 1; +#X connect 1 0 8 0; +#X connect 2 0 9 1; +#X connect 4 0 6 0; +#X connect 8 0 4 0; +#X connect 8 1 9 0; +#X connect 8 2 0 1; +#X connect 9 0 0 0; +#X connect 9 1 0 1; +#X restore 131 225 pd rot1; +#X msg 146 517 add2 \$1; +#X msg 225 518 set; +#N canvas 0 0 575 324 msgbox 0; +#X obj 94 113 inlet; +#X msg 166 148; +#X obj 88 193 outlet; +#X text 163 108 hidden msgbox to not clutter the main patch; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 68 568 pd msgbox; +#X obj 168 91 list length; +#X connect 0 0 18 0; +#X connect 2 0 14 0; +#X connect 3 0 12 0; +#X connect 4 0 12 1; +#X connect 5 0 20 0; +#X connect 6 0 7 0; +#X connect 7 0 5 0; +#X connect 8 0 2 0; +#X connect 8 1 11 0; +#X connect 8 2 6 0; +#X connect 10 0 21 0; +#X connect 11 0 12 1; +#X connect 12 0 4 0; +#X connect 12 0 5 0; +#X connect 13 0 11 0; +#X connect 14 1 3 0; +#X connect 15 0 16 0; +#X connect 16 0 2 0; +#X connect 16 1 2 0; +#X connect 16 2 17 0; +#X connect 16 3 19 0; +#X connect 17 0 19 0; +#X connect 18 0 22 0; +#X connect 18 1 15 0; +#X connect 18 2 23 0; +#X connect 18 3 9 0; +#X connect 19 0 8 0; +#X connect 20 0 22 0; +#X connect 21 0 22 0; +#X connect 22 0 1 0; +#X connect 23 0 15 1; diff --git a/list-abs/list-unique-help.pd b/list-abs/list-unique-help.pd new file mode 100755 index 0000000..b13b2cc --- /dev/null +++ b/list-abs/list-unique-help.pd @@ -0,0 +1,47 @@ +#N canvas 0 31 543 489 10; +#X msg 93 366; +#N canvas 0 0 450 300 show 0; +#X obj 41 39 inlet; +#X obj 41 124 outlet; +#X obj 41 59 list prepend set; +#X obj 41 83 list trim; +#X connect 0 0 2 0; +#X connect 2 0 3 0; +#X connect 3 0 1 0; +#X restore 93 336 pd show; +#X msg 105 307 bang; +#X text 90 415 2007 Frank Barknecht; +#X text 208 246 number of allowed repetitions (default 1); +#X obj 93 270 list-unique; +#X floatatom 165 246 5 0 0 0 - - -; +#X msg 112 100 1 1 1 1 1 1 1 1; +#X msg 93 78 1 2 3 2 1; +#X text 56 27 [list-unique] - remove duplicates from a list; +#X text 90 57 list to uniquify; +#X obj 120 144 hradio 15 1 0 3 empty empty empty 0 -8 0 10 -262144 +-1 -1 0; +#X obj 150 212 + 1; +#X obj 120 162 t b a; +#X msg 120 183 list H e l l o - W o r l d; +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION remove duplicates from a list; +#X text 12 65 INLET_0 anything; +#X text 12 85 INLET_1 float; +#X text 12 105 OUTLET_0 list; +#X text 12 5 KEYWORDS control list_op filter; +#X restore 474 450 pd META; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X connect 5 0 1 0; +#X connect 6 0 5 1; +#X connect 7 0 5 0; +#X connect 8 0 5 0; +#X connect 11 0 13 0; +#X connect 12 0 6 0; +#X connect 13 0 14 0; +#X connect 13 1 12 0; +#X connect 14 0 5 0; diff --git a/list-abs/list-unique.pd b/list-abs/list-unique.pd new file mode 100755 index 0000000..42c371d --- /dev/null +++ b/list-abs/list-unique.pd @@ -0,0 +1,41 @@ +#N canvas 197 380 791 465 10; +#X obj 131 240 list-find; +#X obj 309 270 t a; +#X obj 217 269 list prepend; +#X obj 131 187 t a a; +#X obj 217 240 list; +#X obj 131 162 list-drip; +#X obj 109 315 list; +#X obj 109 105 t b a b; +#X text 156 314 result list; +#X text 108 412 2007 Frank Barknecht; +#X obj 217 196 < 1; +#X obj 217 217 select 1; +#X obj 233 76 inlet; +#X obj 109 72 inlet; +#X obj 109 343 outlet; +#X text 235 53 number of allowed repetitions (default 1); +#X text 84 51 list to uniquify; +#X text 355 232 If current item is found less often than the allowed +number of repetitions (default 1) \, then store it in [list-find] and +in result list. Else discard it.; +#X obj 254 240 t b b; +#X connect 0 1 10 0; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 2 0 0 1; +#X connect 2 0 6 1; +#X connect 3 0 0 0; +#X connect 3 1 4 1; +#X connect 4 0 2 0; +#X connect 5 0 3 0; +#X connect 6 0 14 0; +#X connect 7 0 6 0; +#X connect 7 1 5 0; +#X connect 7 2 18 0; +#X connect 10 0 11 0; +#X connect 11 0 4 0; +#X connect 12 0 10 1; +#X connect 13 0 7 0; +#X connect 18 0 2 0; +#X connect 18 1 2 1; diff --git a/list-abs/list-unitvec-help.pd b/list-abs/list-unitvec-help.pd new file mode 100755 index 0000000..6bdeaca --- /dev/null +++ b/list-abs/list-unitvec-help.pd @@ -0,0 +1,26 @@ +#N canvas 0 0 450 300 10; +#X obj 141 197 list-unitvec; +#X obj 141 229 print; +#X msg 158 163 1 1 0; +#X msg 153 140 1 0 0; +#X msg 149 108 0 2 2; +#X msg 141 84 0 2 a 0; +#X text 34 28 list-unitvec; +#X text 52 48 make a unit vector out of any list \, ignoring non-float +elements (i.e. normalize a list geometrically); +#N canvas 506 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 115 AUTHOR Frank Barknecht; +#X text 12 135 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 95 OUTLET_0 list; +#X text 12 45 DESCRIPTION make a unit vector out of any list \, ignoring +non-float elements (i.e. normalize a list geometrically); +#X text 12 75 INLET_0 list; +#X restore 385 265 pd META; +#X connect 0 0 1 0; +#X connect 2 0 0 0; +#X connect 3 0 0 0; +#X connect 4 0 0 0; +#X connect 5 0 0 0; diff --git a/list-abs/list-unitvec.pd b/list-abs/list-unitvec.pd new file mode 100755 index 0000000..f822cd4 --- /dev/null +++ b/list-abs/list-unitvec.pd @@ -0,0 +1,19 @@ +#N canvas 344 49 431 402 10; +#X obj 221 167 s \$0-reset; +#X obj 213 296 expr 1/sqrt($f1); +#X obj 141 366 outlet; +#X obj 141 145 inlet; +#X obj 141 334 list-math *; +#X obj 213 261 list-dotprod; +#X obj 141 168 t a a a b; +#X text 20 58 list-unitvec; +#X text 38 78 make a unit vector out of any list \, ignoring non-float +elements (i.e. normalize a list geometrically); +#X connect 1 0 4 1; +#X connect 3 0 6 0; +#X connect 4 0 2 0; +#X connect 5 0 1 0; +#X connect 6 0 4 0; +#X connect 6 1 5 0; +#X connect 6 2 5 1; +#X connect 6 3 0 0; diff --git a/list-abs/list-wrandom-help.pd b/list-abs/list-wrandom-help.pd new file mode 100755 index 0000000..5c7ab2a --- /dev/null +++ b/list-abs/list-wrandom-help.pd @@ -0,0 +1,145 @@ +#N canvas 0 31 682 622 10; +#X msg 167 312 bang; +#X floatatom 133 407 5 0 0 0 - - -; +#X obj 125 478 tabread \$0-rand; +#X obj 125 456 t a a; +#X obj 125 311 until; +#X obj 125 503 + 0.001; +#X obj 125 527 tabwrite \$0-rand; +#X msg 251 247 bang; +#X obj 251 273 list-random 10 10; +#X msg 125 285 1000; +#X msg 168 336 seed 12123; +#X floatatom 204 406 5 0 0 1 length - -; +#N canvas 0 0 450 300 (subpatch) 0; +#X array \$0-rand 10 float 0; +#X coords 0 1 9 0 200 140 1; +#X restore 310 409 graph; +#N canvas 0 0 450 300 (subpatch) 0; +#X array \$0-dist 10 float 0; +#X coords 0 1 9 0 200 140 1; +#X restore 310 409 graph; +#X obj 251 336 t a a; +#X msg 317 304 3 8 0 2 3 5 1 4 7 2; +#X msg 259 304 1 0 0 1; +#N canvas 0 0 450 300 write-to-tables 0; +#X obj 227 103 list-len; +#X obj 308 180 s \$0-rand; +#X obj 115 103 list prepend 0; +#X obj 115 128 s \$0-dist; +#X obj 93 256 s \$0-dist; +#X msg 308 158 resize \$1 \, const 0; +#X msg 93 155 normalize 1; +#X msg 227 159 resize \$1; +#X obj 93 55 t b a a; +#X obj 93 33 inlet; +#X connect 0 0 7 0; +#X connect 0 0 5 0; +#X connect 2 0 3 0; +#X connect 5 0 1 0; +#X connect 6 0 4 0; +#X connect 7 0 4 0; +#X connect 8 0 6 0; +#X connect 8 1 2 0; +#X connect 8 2 0 0; +#X connect 9 0 8 0; +#X restore 281 363 pd write-to-tables; +#X text 79 20 [list-wrandom]; +#X msg 464 304 10 20 70; +#X msg 164 286 100; +#X text 113 44 Use a list as a probability table for weighted random +numbers.; +#X obj 125 379 list-wrandom; +#X text 112 87 Inlets; +#X text 132 142 1: list of random weights. The weigths are used as +probabilities for their positions (zero-based); +#X text 111 179 Outlets:; +#X text 127 199 0: random number; +#X text 127 214 1: size of probability table (for convenience); +#X text 131 109 0: connected to [random] internally. "bang" to make +random choice \, "seed X" to seed; +#N canvas 262 240 530 406 markov-example 0; +#X text 32 19 Simple markov chain; +#X obj 77 208 list-wrandom; +#X obj 170 208 list-wrandom; +#X obj 263 208 list-wrandom; +#X obj 77 172 select 0 1 2; +#X obj 77 150 f; +#X obj 93 127 r \$0-state; +#X obj 77 279 s \$0-state; +#X obj 170 279 s \$0-state; +#X obj 263 277 s \$0-state; +#X obj 163 328 hradio 32 1 0 3 empty \$0-state state 0 -8 1 10 -262144 +-1 -1 0; +#X obj 239 98 loadbang; +#X obj 77 97 bng 24 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X floatatom 91 242 5 0 0 0 - - -; +#X obj 91 259 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X floatatom 185 240 5 0 0 0 - - -; +#X obj 185 257 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X floatatom 277 239 5 0 0 0 - - -; +#X obj 277 256 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 37 74 metro 200; +#X obj 37 55 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 +; +#X msg 239 125 s0 10 20 70 \, s1 80 10 10 \, s2 50 25 25; +#X obj 239 159 route s0 s1 s2; +#X connect 1 0 7 0; +#X connect 1 0 13 0; +#X connect 2 0 8 0; +#X connect 2 0 15 0; +#X connect 3 0 9 0; +#X connect 3 0 17 0; +#X connect 4 0 1 0; +#X connect 4 1 2 0; +#X connect 4 2 3 0; +#X connect 5 0 4 0; +#X connect 6 0 5 1; +#X connect 11 0 21 0; +#X connect 12 0 5 0; +#X connect 13 0 14 0; +#X connect 15 0 16 0; +#X connect 17 0 18 0; +#X connect 19 0 5 0; +#X connect 20 0 19 0; +#X connect 21 0 22 0; +#X connect 22 0 1 1; +#X connect 22 1 2 1; +#X connect 22 2 3 1; +#X restore 125 563 pd markov-example; +#N canvas 520 99 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 155 AUTHOR Frank Barknecht; +#X text 12 175 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 45 DESCRIPTION use a list as a probability table for weighted +random numbers; +#X text 12 75 INLET_0 bang seed; +#X text 12 95 INLET_1 list; +#X text 12 115 OUTLET_0 float; +#X text 12 135 OUTLET_1 float; +#X restore 622 568 pd META; +#X connect 0 0 22 0; +#X connect 2 0 5 0; +#X connect 3 0 2 0; +#X connect 3 1 6 1; +#X connect 4 0 22 0; +#X connect 5 0 6 0; +#X connect 7 0 8 0; +#X connect 8 0 14 0; +#X connect 9 0 4 0; +#X connect 10 0 22 0; +#X connect 14 0 22 1; +#X connect 14 1 17 0; +#X connect 15 0 14 0; +#X connect 16 0 14 0; +#X connect 19 0 14 0; +#X connect 20 0 4 0; +#X connect 22 0 1 0; +#X connect 22 0 3 0; +#X connect 22 1 11 0; diff --git a/list-abs/list-wrandom.pd b/list-abs/list-wrandom.pd new file mode 100755 index 0000000..bedea28 --- /dev/null +++ b/list-abs/list-wrandom.pd @@ -0,0 +1,79 @@ +#N canvas 417 418 656 550 10; +#X obj 102 44 inlet; +#X obj 472 418 table \$0-weights; +#X obj 202 229 s \$0-weights; +#X obj 202 176 change -1; +#X msg 202 201 resize \$1; +#X obj 124 226 f; +#X obj 124 251 until; +#X obj 102 373 f; +#X obj 124 316 f 0; +#X obj 150 316 + 1; +#X obj 175 347 tabread \$0-weights; +#X msg 140 290 0; +#X obj 102 166 t b b b a; +#X obj 102 442 outlet; +#X obj 172 201 + 1; +#X obj 175 377 <=; +#X obj 155 407 select 0; +#X obj 202 151 r \$0-len; +#X obj 102 112 random 10000; +#X obj 102 136 * 0.0001; +#X obj 319 44 inlet; +#X msg 451 112 0; +#X obj 319 69 t a b a; +#X obj 319 219 f 0; +#X obj 347 219 + 1; +#X obj 319 306 s \$0-weights; +#X msg 452 219 normalize 1; +#X obj 544 131 s \$0-len; +#X obj 535 158 outlet; +#X obj 535 105 list length; +#X obj 379 219 +; +#X obj 410 219 f; +#X obj 319 251 pack 0 0; +#X obj 319 171 t b a; +#X obj 319 146 list-drip; +#X connect 0 0 18 0; +#X connect 3 0 4 0; +#X connect 3 0 14 0; +#X connect 4 0 2 0; +#X connect 5 0 6 0; +#X connect 6 0 8 0; +#X connect 7 0 13 0; +#X connect 8 0 10 0; +#X connect 8 0 7 1; +#X connect 8 0 9 0; +#X connect 9 0 8 1; +#X connect 10 0 15 0; +#X connect 11 0 8 1; +#X connect 12 0 7 0; +#X connect 12 1 5 0; +#X connect 12 2 11 0; +#X connect 12 3 15 1; +#X connect 14 0 5 1; +#X connect 15 0 16 0; +#X connect 16 0 6 1; +#X connect 17 0 3 0; +#X connect 18 0 19 0; +#X connect 19 0 12 0; +#X connect 20 0 22 0; +#X connect 21 0 23 1; +#X connect 21 0 30 1; +#X connect 22 0 34 0; +#X connect 22 1 21 0; +#X connect 22 2 29 0; +#X connect 23 0 24 0; +#X connect 23 0 32 0; +#X connect 24 0 23 1; +#X connect 26 0 25 0; +#X connect 29 0 27 0; +#X connect 29 0 28 0; +#X connect 30 0 31 0; +#X connect 30 0 32 1; +#X connect 31 0 30 1; +#X connect 32 0 25 0; +#X connect 33 0 23 0; +#X connect 33 1 30 0; +#X connect 34 0 33 0; +#X connect 34 1 26 0; diff --git a/list-abs/prepent-help.pd b/list-abs/prepent-help.pd new file mode 100755 index 0000000..5d3d1a2 --- /dev/null +++ b/list-abs/prepent-help.pd @@ -0,0 +1,56 @@ +#N canvas 0 31 639 361 10; +#X obj 429 170 prepent set; +#X msg 429 225; +#X floatatom 429 92 5 0 0 0 - - -; +#X msg 501 142 set; +#X msg 531 142 add2; +#X msg 439 204 set; +#X floatatom 49 67 5 0 0 0 - - -; +#X obj 49 127 prepent x; +#X obj 233 131 list prepend x; +#X obj 233 240 print prepend_x; +#X obj 49 241 print prepent_x; +#X text 43 15 [prepent] is a shortcut for [list prepend]--[list trim] +; +#X obj 233 267 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 49 267 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 231 105 Without trim:; +#X obj 233 167 route x list; +#X obj 272 196 print prepend_list; +#X obj 49 168 route x list; +#X obj 88 198 print prepent_list; +#X obj 272 216 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 88 218 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#N canvas 465 89 494 396 META 0; +#X text 12 5 KEYWORDS control list_op; +#X text 12 25 LICENSE SIBSD; +#X text 12 125 AUTHOR Frank Barknecht; +#X text 12 145 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 65 INLET_0 anything; +#X text 12 105 OUTLET_0 anything; +#X text 12 45 DESCRIPTION a shortcut for [list prepend]--[list trim] +; +#X text 12 85 INLET_1 anything; +#X restore 552 320 pd META; +#X connect 0 0 1 0; +#X connect 2 0 0 0; +#X connect 3 0 0 1; +#X connect 4 0 0 1; +#X connect 5 0 1 0; +#X connect 6 0 7 0; +#X connect 6 0 8 0; +#X connect 7 0 17 0; +#X connect 8 0 15 0; +#X connect 15 0 9 0; +#X connect 15 0 12 0; +#X connect 15 1 16 0; +#X connect 15 1 19 0; +#X connect 17 0 10 0; +#X connect 17 0 13 0; +#X connect 17 1 18 0; +#X connect 17 1 20 0; diff --git a/list-abs/prepent.pd b/list-abs/prepent.pd new file mode 100755 index 0000000..a093d53 --- /dev/null +++ b/list-abs/prepent.pd @@ -0,0 +1,10 @@ +#N canvas 0 0 450 300 10; +#X obj 90 88 inlet; +#X obj 90 205 outlet; +#X obj 90 132 list prepend \$1; +#X obj 90 157 list trim; +#X obj 190 87 inlet; +#X connect 0 0 2 0; +#X connect 2 0 3 0; +#X connect 3 0 1 0; +#X connect 4 0 2 1; diff --git a/list-abs/sroute-help.pd b/list-abs/sroute-help.pd new file mode 100755 index 0000000..fb59249 --- /dev/null +++ b/list-abs/sroute-help.pd @@ -0,0 +1,43 @@ +#N canvas 0 0 658 332 10; +#X obj 127 156 sroute 1; +#X obj 178 124 hradio 15 1 0 3 empty empty empty 0 -6 0 8 -262144 -1 +-1 0; +#X msg 127 72 1 1 1; +#X msg 78 72 0 0 0; +#X msg 176 72 2 2 2; +#X text 84 29 sroute: settable route; +#X obj 444 126 hradio 15 1 0 3 empty empty bad 0 -6 0 8 -262144 -1 +-1 0; +#X symbolatom 414 96 10 0 0 2 good - -; +#X obj 127 235 print SR1; +#X obj 335 235 print SR2; +#X msg 351 99 b b b; +#X msg 335 72 a a a; +#X text 401 61 type "a" or "b"; +#X obj 335 156 sroute a; +#X obj 178 207 print SR1-miss; +#X obj 386 203 print SR2-miss; +#N canvas 520 226 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 145 AUTHOR Frank Barknecht; +#X text 12 165 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION settable route; +#X text 12 65 INLET_0 anything; +#X text 12 85 INLET_1 float symbol; +#X text 12 105 OUTLET_0 anything; +#X text 12 125 OUTLET_1 anything; +#X restore 595 300 pd META; +#X connect 0 0 8 0; +#X connect 0 1 14 0; +#X connect 1 0 0 1; +#X connect 2 0 0 0; +#X connect 3 0 0 0; +#X connect 4 0 0 0; +#X connect 6 0 13 1; +#X connect 7 0 13 1; +#X connect 10 0 13 0; +#X connect 11 0 13 0; +#X connect 13 0 9 0; +#X connect 13 1 15 0; diff --git a/list-abs/sroute.pd b/list-abs/sroute.pd new file mode 100755 index 0000000..edfa63d --- /dev/null +++ b/list-abs/sroute.pd @@ -0,0 +1,18 @@ +#N canvas 0 0 450 300 10; +#X obj 148 99 inlet; +#X obj 90 54 list split 1; +#X obj 90 31 inlet; +#X obj 90 188 outlet; +#X obj 90 124 select \$1; +#X obj 90 154 list; +#X obj 148 188 outlet; +#X obj 148 156 list; +#X connect 0 0 4 1; +#X connect 1 0 4 0; +#X connect 1 1 5 1; +#X connect 1 1 7 1; +#X connect 2 0 1 0; +#X connect 4 0 5 0; +#X connect 4 1 7 0; +#X connect 5 0 3 0; +#X connect 7 0 6 0; diff --git a/list-abs/take-two-help.pd b/list-abs/take-two-help.pd new file mode 100755 index 0000000..0aa6f7e --- /dev/null +++ b/list-abs/take-two-help.pd @@ -0,0 +1,21 @@ +#N canvas 0 31 578 344 10; +#X obj 68 133 take-two; +#X obj 68 176 print; +#X msg 68 77 1 2 3 4; +#X msg 130 76 list a b c d e f g h; +#X text 146 126 take a list as input and print all combinations of +length two without repetition.; +#N canvas 520 226 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 115 AUTHOR Frank Barknecht; +#X text 12 135 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 45 DESCRIPTION take a list as input and print all combinations +of length two without repetition; +#X text 12 75 INLET_0 list; +#X text 12 95 OUTLET_0 list; +#X restore 494 302 pd META; +#X connect 0 0 1 0; +#X connect 2 0 0 0; +#X connect 3 0 0 0; diff --git a/list-abs/take-two.pd b/list-abs/take-two.pd new file mode 100755 index 0000000..c5281ff --- /dev/null +++ b/list-abs/take-two.pd @@ -0,0 +1,27 @@ +#N canvas 444 190 497 465 10; +#X obj 206 267 list split 1; +#X obj 206 330 list; +#X obj 206 389 list; +#X obj 206 300 t b a; +#X obj 206 233 list; +#X obj 206 200 until; +#X obj 256 174 b; +#X obj 206 85 inlet; +#X obj 206 415 outlet; +#X obj 206 152 t b a; +#X obj 206 355 list-drip; +#X connect 0 0 3 0; +#X connect 0 1 1 1; +#X connect 0 1 4 1; +#X connect 0 2 6 0; +#X connect 1 0 10 0; +#X connect 2 0 8 0; +#X connect 3 0 1 0; +#X connect 3 1 2 1; +#X connect 4 0 0 0; +#X connect 5 0 4 0; +#X connect 6 0 5 1; +#X connect 7 0 9 0; +#X connect 9 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 2 0; diff --git a/list-abs/triple-scale-help.pd b/list-abs/triple-scale-help.pd new file mode 100755 index 0000000..6765131 --- /dev/null +++ b/list-abs/triple-scale-help.pd @@ -0,0 +1,41 @@ +#N canvas 0 33 515 437 10; +#X obj 112 74 hsl 128 15 0 1 0 0 empty empty factor_(0-1) -2 -6 0 10 +-262144 -1 -1 0 0; +#X obj 109 187 triple-scale; +#X text 61 29 interpolate linearily between two points (x \, y \, z) +; +#X obj 109 216 unpack 0 0 0; +#X obj 109 264 vsl 15 128 0 10 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 148 264 vsl 15 128 0 10 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 188 264 vsl 15 128 0 10 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X floatatom 109 238 5 0 0 0 - - -; +#X floatatom 148 238 5 0 0 0 - - -; +#X floatatom 188 238 5 0 0 0 - - -; +#X msg 148 132 5 1 9; +#X msg 188 160 8 2 1; +#N canvas 362 181 494 396 META 0; +#X text 12 25 LICENSE SIBSD; +#X text 12 155 AUTHOR Frank Barknecht; +#X text 12 175 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information +added by Jonathan Wilkes for Pd version 0.42.; +#X text 12 5 KEYWORDS control list_op; +#X text 12 135 OUTLET_0 list; +#X text 12 45 DESCRIPTION interpolate linearily between two points +(x \, y \, z); +#X text 12 75 INLET_0 float; +#X text 12 95 INLET_1 list; +#X text 12 115 INLET_2 list; +#X restore 458 408 pd META; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 3 0 7 0; +#X connect 3 1 8 0; +#X connect 3 2 9 0; +#X connect 7 0 4 0; +#X connect 8 0 5 0; +#X connect 9 0 6 0; +#X connect 10 0 1 1; +#X connect 11 0 1 2; diff --git a/list-abs/triple-scale.pd b/list-abs/triple-scale.pd new file mode 100755 index 0000000..cfe24ef --- /dev/null +++ b/list-abs/triple-scale.pd @@ -0,0 +1,33 @@ +#N canvas 146 135 849 526 10; +#X obj 224 150 unpack 0 0 0; +#X obj 224 117 inlet; +#X obj 189 312 pack 0 0 0; +#X obj 189 333 outlet; +#X obj 382 150 unpack 0 0 0; +#X obj 382 117 inlet; +#X obj 134 118 inlet; +#X obj 134 146 t f f f; +#X obj 133 207 expr $f1*($f3-$f2) + $f2; +#X obj 221 234 expr $f1*($f3-$f2) + $f2; +#X obj 311 255 expr $f1*($f3-$f2) + $f2; +#X text 178 41 interpolate linearily between to points (x \, y \, z) +; +#X text 455 118 point 2; +#X text 280 117 point 1; +#X text 142 99 0-1; +#X connect 0 0 8 1; +#X connect 0 1 9 1; +#X connect 0 2 10 1; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 4 0 8 2; +#X connect 4 1 9 2; +#X connect 4 2 10 2; +#X connect 5 0 4 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 7 1 9 0; +#X connect 7 2 10 0; +#X connect 8 0 2 0; +#X connect 9 0 2 1; +#X connect 10 0 2 2; diff --git a/masheen.pd b/masheen.pd new file mode 100644 index 0000000..9361b48 --- /dev/null +++ b/masheen.pd @@ -0,0 +1,146 @@ +#N canvas 0 23 1680 1005 12; +#X obj 74 53 bartoa; +#X obj 74 83 deegaj; +#X obj 74 143 johnsz2; +#X obj 74 173 martse; +#X obj 74 203 mucelj; +#X obj 74 263 nik; +#X obj 74 293 novaa; +#X obj 74 323 ortegm3; +#X obj 74 353 persow; +#X obj 74 383 plancs; +#X obj 74 413 quarlm; +#X obj 74 443 rothgj; +#X obj 74 473 schans2; +#X obj 74 503 sheny13; +#X obj 74 533 smithd32; +#X obj 74 563 takakh; +#X obj 74 593 villan2; +#X obj 74 623 zhaox10; +#X obj 74 653 zhuy16; +#X text 24 21 [ARTS 2020] SUMMER 2020 "MASHEEN"; +#X obj 74 683 hamilr4; +#N canvas 585 56 479 747 tempo_sender 0; +#X obj 89 687 s hamilr4_tempo; +#X obj 89 13 inlet; +#X obj 113 657 s houchl_tempo; +#X obj 123 627 s zhuy16_tempo; +#X obj 133 597 s zhaox10_tempo; +#X obj 143 567 s villan2_tempo; +#X obj 153 537 s takakh_tempo; +#X obj 163 507 s smithd32_tempo; +#X obj 173 477 s sheny13_tempo; +#X obj 183 447 s schans2_tempo; +#X obj 193 417 s rothgj_tempo; +#X obj 203 387 s quarlm_tempo; +#X obj 213 357 s plancs_tempo; +#X obj 223 327 s persow_tempo; +#X obj 233 297 s ortegm3_tempo; +#X obj 243 267 s novaa_tempo; +#X obj 253 237 s nik_tempo; +#X obj 263 207 s mucelj_tempo; +#X obj 273 177 s martse_tempo; +#X obj 283 147 s johnsz2_tempo; +#X obj 293 117 s deegaj_tempo; +#X obj 303 87 s bartoa_tempo; +#X connect 1 0 0 0; +#X connect 1 0 2 0; +#X connect 1 0 3 0; +#X connect 1 0 4 0; +#X connect 1 0 5 0; +#X connect 1 0 6 0; +#X connect 1 0 7 0; +#X connect 1 0 8 0; +#X connect 1 0 9 0; +#X connect 1 0 10 0; +#X connect 1 0 11 0; +#X connect 1 0 12 0; +#X connect 1 0 13 0; +#X connect 1 0 14 0; +#X connect 1 0 15 0; +#X connect 1 0 16 0; +#X connect 1 0 17 0; +#X connect 1 0 18 0; +#X connect 1 0 19 0; +#X connect 1 0 20 0; +#X connect 1 0 21 0; +#X restore 358 169 pd tempo_sender; +#X obj 358 110 metro 500; +#X obj 358 140 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 358 85 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 +1; +#X obj 608 82 send hamilr4_control; +#X msg 607 25 1 2 3 4 5; +#X obj 4 721 mixer; +#X obj 74 233 nelsoc5; +#X obj 74 113 houchl; +#X obj 1751 3 master_outs_stereo; +#N canvas 0 23 553 467 masheen_assignment_1 0; +#X text 40 52 1 Create a subpatch saved with the filename as your RCS +id; +#X text 40 92 2 In your patch create two inlets and two outlets; +#X text 95 169 e.g.; +#X text 95 239 e.g.; +#X text 40 132 3 Add a "Receive" object named with your RCS ID_tempo +; +#X obj 149 169 receive hamilr4_tempo; +#X obj 149 239 receive hamilr4_control; +#X text 40 202 4 Add a "Receive" object named with your RCS ID_control +; +#X text 40 282 5 Make your patch _do something_ with a metro beat (coming +in from the _tempo receive) and spit out audio from your left outlet. +DO NOT INCLUDE A [DAC~] OBJECT IN YOUR PATCH \, just pass audio out +the outlet for now.; +#X text 40 362 6 Send Rob your patch on Sunday.; +#X restore 1580 5 pd masheen_assignment_1; +#X obj 1580 24 utilities; +#X obj 418 52 bpmtoms; +#X floatatom 418 23 5 0 0 0 - - -; +#N canvas 0 23 450 300 init 0; +#X obj 41 99 s init; +#X obj 41 59 loadbang; +#X text 27 24 Initialize values; +#X obj 120 111 v global_solo_count; +#X msg 120 88 0; +#X connect 1 0 0 0; +#X connect 1 0 4 0; +#X connect 4 0 3 0; +#X restore 1580 43 pd init; +#N canvas 913 66 450 300 solo 0; +#X floatatom 87 93 5 0 0 0 - - -; +#X obj 87 69 r solo_mode; +#X obj 87 194 +; +#X obj 120 194 i; +#X floatatom 120 218 5 0 0 0 - - -; +#X obj 120 257 v global_solo_count; +#X obj 186 25 r init; +#X msg 186 95 0; +#X obj 239 23 r solo_all; +#X obj 239 47 select 0; +#X obj 186 125 t f f f f; +#X connect 0 0 2 0; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 3 0 2 1; +#X connect 3 0 4 0; +#X connect 4 0 5 0; +#X connect 6 0 7 0; +#X connect 7 0 10 0; +#X connect 8 0 9 0; +#X connect 9 0 7 0; +#X connect 10 0 2 0; +#X connect 10 1 5 0; +#X connect 10 2 2 1; +#X connect 10 3 3 1; +#X restore 1636 43 pd solo; +#X obj 1751 645 recorder_controls; +#X msg 1139 18 \; pd dsp 0; +#X msg 1208 18 \; pd dsp 1; +#X text 1283 25 <-- Turn DSP on by clicking here; +#X connect 22 0 23 0; +#X connect 23 0 21 0; +#X connect 24 0 22 0; +#X connect 26 0 25 0; +#X connect 33 0 22 1; +#X connect 34 0 33 0; diff --git a/masheen.zip b/masheen.zip new file mode 100644 index 0000000..f501b7a Binary files /dev/null and b/masheen.zip differ diff --git a/master_outs_stereo.pd b/master_outs_stereo.pd new file mode 100644 index 0000000..07bba47 --- /dev/null +++ b/master_outs_stereo.pd @@ -0,0 +1,103 @@ +#N canvas 0 23 755 747 12; +#X obj 11 70 cnv 15 160 640 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 109 105 vu 30 480 masheen_meter_text empty -1 -8 0 10 -66577 +-1 1 0; +#X obj 45 105 vsl 30 480 1 101 1 0 empty empty empty 0 -9 0 10 -262144 +-1 -1 24900 1; +#X floatatom 79 596 5 0 0 0 - - -; +#X obj 461 303 *~; +#X obj 479 266 line~; +#X msg 479 242 \$1 20; +#X floatatom 479 220 5 0 0 0 - - -; +#X obj 401 32 inlet~; +#X obj 516 335 outlet~; +#X floatatom 461 391 5 0 0 0 - - -; +#X obj 461 364 env~ 16384 8192; +#X obj 479 171 - 1; +#X obj 479 196 / 100; +#X floatatom 341 391 5 0 0 0 - - -; +#X obj 341 364 env~ 16384 8192; +#X obj 341 419 - 103; +#X obj 461 419 - 103; +#X obj 77 105 vu 30 480 masheen_meter_text empty -1 -8 0 10 -66577 +-1 0 0; +#X obj 341 32 inlet~; +#X floatatom 39 596 5 0 0 0 - - -; +#X obj 16 82 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 +; +#X text 35 81 Link; +#X obj 16 26 spigot; +#X obj 15 105 vsl 30 480 1 101 1 0 empty empty empty 0 -9 0 10 -262144 +-1 -1 24900 1; +#X obj 341 303 *~; +#X obj 359 266 line~; +#X msg 359 242 \$1 20; +#X floatatom 359 220 5 0 0 0 - - -; +#X obj 396 335 outlet~; +#X obj 359 171 - 1; +#X obj 359 196 / 100; +#X obj 665 322 dac~ 1 2; +#X obj 575 43 catch~ main_out_left; +#X obj 595 73 catch~ main_out_right; +#X obj 40 669 tgl 20 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 40 647 tgl 20 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 +1; +#X obj 40 625 tgl 20 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 192 645 s solo all; +#X obj 192 667 s mute all; +#X obj 192 689 s rec all; +#X text 62 626 Solo All; +#X text 62 648 Mute All; +#X text 62 670 Record All; +#X obj 279 645 v global_solo_count; +#X msg 279 610 0; +#X text 315 611 Catch any stragglers; +#X obj 279 586 select 0; +#X obj 420 644 s solo_mode; +#X obj 595 322 recorder; +#X connect 2 0 12 0; +#X connect 4 0 9 0; +#X connect 4 0 11 0; +#X connect 4 0 32 1; +#X connect 4 0 49 1; +#X connect 5 0 4 1; +#X connect 6 0 5 0; +#X connect 7 0 6 0; +#X connect 7 0 3 0; +#X connect 8 0 4 0; +#X connect 10 0 17 0; +#X connect 11 0 10 0; +#X connect 12 0 13 0; +#X connect 13 0 7 0; +#X connect 14 0 16 0; +#X connect 15 0 14 0; +#X connect 16 0 18 0; +#X connect 17 0 1 0; +#X connect 19 0 25 0; +#X connect 21 0 23 1; +#X connect 23 0 2 0; +#X connect 24 0 23 0; +#X connect 24 0 30 0; +#X connect 25 0 29 0; +#X connect 25 0 15 0; +#X connect 25 0 32 0; +#X connect 25 0 49 0; +#X connect 26 0 25 1; +#X connect 27 0 26 0; +#X connect 28 0 27 0; +#X connect 28 0 20 0; +#X connect 30 0 31 0; +#X connect 31 0 28 0; +#X connect 33 0 25 0; +#X connect 34 0 4 0; +#X connect 35 0 40 0; +#X connect 36 0 39 0; +#X connect 37 0 38 0; +#X connect 37 0 47 0; +#X connect 45 0 44 0; +#X connect 45 0 48 0; +#X connect 47 0 45 0; +#X coords 0 -1 1 1 163 642 1 9 69; diff --git a/mixer.pd b/mixer.pd new file mode 100644 index 0000000..0b14587 --- /dev/null +++ b/mixer.pd @@ -0,0 +1,434 @@ +#N canvas 0 68 1680 606 12; +#X obj 1 101 cnv 15 1908 392 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 22 100 channel; +#X obj 111 100 channel; +#X obj 22 21 inlet~; +#X obj 111 21 inlet~; +#X obj 200 100 channel; +#X obj 289 100 channel; +#X obj 200 21 inlet~; +#X obj 289 21 inlet~; +#X obj 378 100 channel; +#X obj 467 100 channel; +#X obj 378 21 inlet~; +#X obj 467 21 inlet~; +#X obj 556 100 channel; +#X obj 645 100 channel; +#X obj 556 21 inlet~; +#X obj 645 21 inlet~; +#X obj 734 100 channel; +#X obj 823 100 channel; +#X obj 734 21 inlet~; +#X obj 823 21 inlet~; +#X obj 912 100 channel; +#X obj 1001 100 channel; +#X obj 912 21 inlet~; +#X obj 1001 21 inlet~; +#X obj 1090 100 channel; +#X obj 1179 100 channel; +#X obj 1090 21 inlet~; +#X obj 1179 21 inlet~; +#X obj 1268 100 channel; +#X obj 1357 100 channel; +#X obj 1268 21 inlet~; +#X obj 1357 21 inlet~; +#X obj 1446 100 channel; +#X obj 1533 100 channel; +#X obj 1446 21 inlet~; +#X obj 1533 21 inlet~; +#X obj 1622 100 channel; +#X obj 1711 100 channel; +#X obj 1622 21 inlet~; +#X obj 1711 19 inlet~; +#X obj 1800 100 channel; +#X obj 1800 19 inlet~; +#X text 118 331 deegaj; +#X text 208 331 houchl; +#X text 298 331 johnsz2; +#X text 387 331 martse; +#X text 479 331 mucelj; +#X text 565 331 nelsoc5; +#X text 666 331 nik; +#X text 747 331 novaa; +#X text 831 331 ortegm3; +#X text 925 331 persow; +#X text 1012 331 plancs; +#X text 1100 331 quarlm; +#X text 1190 331 rothgj; +#X text 1278 331 schans2; +#X text 1367 331 sheny13; +#X text 1450 331 smithd32; +#X text 1543 331 takakh; +#X text 1630 331 villan2; +#X text 1720 333 zhaox10; +#X text 1809 333 zhuy16; +#X obj 12 -131 catch~ bartoa_audio_1; +#X obj 32 -109 catch~ deegaj_audio_1; +#X obj 52 -87 catch~ houchl_audio_1; +#X obj 72 -65 catch~ johnsz2_audio_1; +#X obj 92 -43 catch~ martse_audio_1; +#X obj 112 -22 catch~ mucelj_audio_1; +#X obj 542 -131 catch~ nelsoc5_audio_1; +#X obj 562 -109 catch~ nik_audio_1; +#X obj 582 -87 catch~ novaa_audio_1; +#X obj 602 -65 catch~ ortegm3_audio_1; +#X obj 622 -44 catch~ persow_audio_1; +#X obj 642 -22 catch~ plancs_audio_1; +#X obj 1082 -131 catch~ quarlm_audio_1; +#X obj 1102 -109 catch~ rothgj_audio_1; +#X obj 1122 -87 catch~ schans2_audio_1; +#X obj 1142 -65 catch~ sheny13_audio_1; +#X obj 1182 -22 catch~ takakh_audio_1; +#X obj 1642 -87 catch~ zhuy16_audio_1; +#X obj 1622 -109 catch~ zhaox10_audio_1; +#X obj 1602 -131 catch~ villan2_audio_1; +#X text 34 331 bartoa; +#N canvas 0 23 1920 443 submixer................................................. +0; +#X obj 151 52 inlet~; +#X obj 51 52 inlet~; +#X obj 351 52 inlet~; +#X obj 251 52 inlet~; +#X obj 551 52 inlet~; +#X obj 451 52 inlet~; +#X obj 751 52 inlet~; +#X obj 651 52 inlet~; +#X obj 951 52 inlet~; +#X obj 851 52 inlet~; +#X obj 1151 52 inlet~; +#X obj 1051 52 inlet~; +#X obj 1351 52 inlet~; +#X obj 1251 52 inlet~; +#X obj 1551 52 inlet~; +#X obj 1451 52 inlet~; +#X obj 1751 52 inlet~; +#X obj 1651 52 inlet~; +#X obj 1951 52 inlet~; +#X obj 1851 52 inlet~; +#X obj 2051 52 inlet~; +#X obj 97 52 inlet~; +#X obj 197 52 inlet~; +#X obj 297 52 inlet~; +#X obj 397 52 inlet~; +#X obj 497 52 inlet~; +#X obj 597 52 inlet~; +#X obj 697 52 inlet~; +#X obj 797 52 inlet~; +#X obj 897 52 inlet~; +#X obj 997 52 inlet~; +#X obj 1097 52 inlet~; +#X obj 1197 52 inlet~; +#X obj 1297 52 inlet~; +#X obj 1397 52 inlet~; +#X obj 1497 52 inlet~; +#X obj 1597 52 inlet~; +#X obj 1697 52 inlet~; +#X obj 1797 52 inlet~; +#X obj 1897 52 inlet~; +#X obj 1997 52 inlet~; +#X obj 2097 52 inlet~; +#X obj 51 473 throw~ channel_1_L; +#X obj 61 454 throw~ channel_1_R; +#X obj 150 420 throw~ channel_2_L; +#X obj 160 401 throw~ channel_2_R; +#X obj 250 379 throw~ channel_3_L; +#X obj 260 360 throw~ channel_3_R; +#X obj 350 337 throw~ channel_4_L; +#X obj 360 318 throw~ channel_4_R; +#X obj 450 295 throw~ channel_5_L; +#X obj 460 276 throw~ channel_5_R; +#X obj 550 243 throw~ channel_6_L; +#X obj 560 224 throw~ channel_6_R; +#X obj 650 201 throw~ channel_7_L; +#X obj 660 182 throw~ channel_7_R; +#X obj 751 158 throw~ channel_8_L; +#X obj 761 139 throw~ channel_8_R; +#X obj 852 473 throw~ channel_9_L; +#X obj 862 454 throw~ channel_9_R; +#X obj 951 431 throw~ channel_10_L; +#X obj 961 412 throw~ channel_10_R; +#X obj 1051 389 throw~ channel_11_L; +#X obj 1061 370 throw~ channel_11_R; +#X obj 1151 347 throw~ channel_12_L; +#X obj 1161 328 throw~ channel_12_R; +#X obj 1251 305 throw~ channel_13_L; +#X obj 1261 286 throw~ channel_13_R; +#X obj 1351 263 throw~ channel_14_L; +#X obj 1361 244 throw~ channel_14_R; +#X obj 1451 221 throw~ channel_15_L; +#X obj 1461 201 throw~ channel_15_R; +#X obj 1552 178 throw~ channel_16_L; +#X obj 1562 159 throw~ channel_16_R; +#X obj 1652 353 throw~ channel_17_L; +#X obj 1662 334 throw~ channel_17_R; +#X obj 1751 311 throw~ channel_18_L; +#X obj 1761 292 throw~ channel_18_R; +#X obj 1851 269 throw~ channel_19_L; +#X obj 1861 250 throw~ channel_19_R; +#X obj 1951 227 throw~ channel_20_L; +#X obj 1961 208 throw~ channel_20_R; +#X obj 2051 185 throw~ channel_21_L; +#X obj 2061 166 throw~ channel_21_R; +#X connect 0 0 44 0; +#X connect 1 0 42 0; +#X connect 2 0 48 0; +#X connect 3 0 46 0; +#X connect 4 0 52 0; +#X connect 5 0 50 0; +#X connect 6 0 56 0; +#X connect 7 0 54 0; +#X connect 8 0 60 0; +#X connect 9 0 58 0; +#X connect 10 0 64 0; +#X connect 11 0 62 0; +#X connect 12 0 68 0; +#X connect 13 0 66 0; +#X connect 14 0 72 0; +#X connect 15 0 70 0; +#X connect 16 0 76 0; +#X connect 17 0 74 0; +#X connect 18 0 80 0; +#X connect 19 0 78 0; +#X connect 20 0 82 0; +#X connect 21 0 43 0; +#X connect 22 0 45 0; +#X connect 23 0 47 0; +#X connect 24 0 49 0; +#X connect 25 0 51 0; +#X connect 26 0 53 0; +#X connect 27 0 55 0; +#X connect 28 0 57 0; +#X connect 29 0 59 0; +#X connect 30 0 61 0; +#X connect 31 0 63 0; +#X connect 32 0 65 0; +#X connect 33 0 67 0; +#X connect 34 0 69 0; +#X connect 35 0 71 0; +#X connect 36 0 73 0; +#X connect 37 0 75 0; +#X connect 38 0 77 0; +#X connect 39 0 79 0; +#X connect 40 0 81 0; +#X connect 41 0 83 0; +#X restore 809 491 pd submixer................................................. +; +#N canvas 0 23 838 530 submixer_busses 0; +#X obj 1003 417 throw~ main_out_left; +#X obj 1149 417 throw~ main_out_right; +#X obj 988 265 catch~ channel_1; +#X obj 976 246 catch~ channel_2; +#X obj 964 227 catch~ channel_3; +#X obj 951 208 catch~ channel_4; +#X obj 938 189 catch~ channel_5; +#X obj 928 170 catch~ channel_6; +#X obj 910 151 catch~ channel_7; +#X obj 899 132 catch~ channel_8; +#X obj 1168 265 catch~ channel_11; +#X obj 1156 246 catch~ channel_12; +#X obj 1144 227 catch~ channel_13; +#X obj 1131 208 catch~ channel_14; +#X obj 1118 189 catch~ channel_15; +#X obj 1108 170 catch~ channel_16; +#X obj 1090 151 catch~ channel_17; +#X obj 1079 132 catch~ channel_18; +#X obj 887 113 catch~ channel_9; +#X obj 876 94 catch~ channel_10; +#X obj 1056 94 catch~ channel_20; +#X obj 1067 113 catch~ channel_19; +#X obj 175 404 throw~ main_out_left; +#X text 215 43 Simple hard-coded left/right channel routing to stereo +bus; +#X obj 160 252 catch~ channel_1_L; +#X obj 328 233 catch~ channel_12_L; +#X obj 340 252 catch~ channel_11_L; +#X obj 316 214 catch~ channel_13_L; +#X obj 303 195 catch~ channel_14_L; +#X obj 290 176 catch~ channel_15_L; +#X obj 280 157 catch~ channel_16_L; +#X obj 262 138 catch~ channel_17_L; +#X obj 251 119 catch~ channel_18_L; +#X obj 239 100 catch~ channel_19_L; +#X obj 228 81 catch~ channel_20_L; +#X obj 48 81 catch~ channel_10_L; +#X obj 59 100 catch~ channel_9_L; +#X obj 71 119 catch~ channel_8_L; +#X obj 82 138 catch~ channel_7_L; +#X obj 100 157 catch~ channel_6_L; +#X obj 110 175 catch~ channel_5_L; +#X obj 123 195 catch~ channel_4_L; +#X obj 136 214 catch~ channel_3_L; +#X obj 148 233 catch~ channel_2_L; +#X obj 699 404 throw~ main_out_right; +#X obj 321 404 throw~ main_out_left; +#X obj 545 404 throw~ main_out_right; +#X obj 418 81 catch~ channel_10_R; +#X obj 429 100 catch~ channel_9_R; +#X obj 441 119 catch~ channel_8_R; +#X obj 452 138 catch~ channel_7_R; +#X obj 470 157 catch~ channel_6_R; +#X obj 480 175 catch~ channel_5_R; +#X obj 493 195 catch~ channel_4_R; +#X obj 506 214 catch~ channel_3_R; +#X obj 518 233 catch~ channel_2_R; +#X obj 530 252 catch~ channel_1_R; +#X obj 598 81 catch~ channel_20_R; +#X obj 609 100 catch~ channel_19_R; +#X obj 621 119 catch~ channel_18_R; +#X obj 632 138 catch~ channel_17_R; +#X obj 650 157 catch~ channel_16_R; +#X obj 660 176 catch~ channel_15_R; +#X obj 673 195 catch~ channel_14_R; +#X obj 686 214 catch~ channel_13_R; +#X obj 698 233 catch~ channel_12_R; +#X obj 710 252 catch~ channel_11_R; +#X text 870 39 DEPRECATED: Simple hard-coded left/right channel routing +to stereo bus; +#X connect 2 0 0 0; +#X connect 3 0 1 0; +#X connect 4 0 0 0; +#X connect 5 0 1 0; +#X connect 6 0 0 0; +#X connect 7 0 1 0; +#X connect 8 0 0 0; +#X connect 9 0 1 0; +#X connect 10 0 0 0; +#X connect 11 0 1 0; +#X connect 12 0 0 0; +#X connect 13 0 1 0; +#X connect 14 0 0 0; +#X connect 15 0 1 0; +#X connect 16 0 0 0; +#X connect 17 0 1 0; +#X connect 18 0 0 0; +#X connect 19 0 1 0; +#X connect 20 0 1 0; +#X connect 21 0 0 0; +#X connect 24 0 22 0; +#X connect 25 0 45 0; +#X connect 26 0 22 0; +#X connect 27 0 22 0; +#X connect 28 0 45 0; +#X connect 29 0 22 0; +#X connect 30 0 45 0; +#X connect 31 0 22 0; +#X connect 32 0 45 0; +#X connect 33 0 22 0; +#X connect 34 0 45 0; +#X connect 35 0 45 0; +#X connect 36 0 22 0; +#X connect 37 0 45 0; +#X connect 38 0 22 0; +#X connect 39 0 45 0; +#X connect 40 0 22 0; +#X connect 41 0 45 0; +#X connect 42 0 22 0; +#X connect 43 0 45 0; +#X connect 47 0 44 0; +#X connect 48 0 46 0; +#X connect 49 0 44 0; +#X connect 50 0 46 0; +#X connect 51 0 44 0; +#X connect 52 0 46 0; +#X connect 53 0 44 0; +#X connect 54 0 46 0; +#X connect 55 0 44 0; +#X connect 56 0 46 0; +#X connect 57 0 44 0; +#X connect 58 0 46 0; +#X connect 59 0 44 0; +#X connect 60 0 46 0; +#X connect 61 0 44 0; +#X connect 62 0 46 0; +#X connect 63 0 44 0; +#X connect 64 0 46 0; +#X connect 65 0 44 0; +#X connect 66 0 46 0; +#X restore 809 512 pd submixer_busses; +#X obj 1162 -44 catch~ smithd32_audio_1; +#X connect 1 0 84 0; +#X connect 1 1 84 1; +#X connect 2 0 84 2; +#X connect 2 1 84 3; +#X connect 3 0 1 0; +#X connect 4 0 2 0; +#X connect 5 0 84 4; +#X connect 5 1 84 5; +#X connect 6 0 84 6; +#X connect 6 1 84 7; +#X connect 7 0 5 0; +#X connect 8 0 6 0; +#X connect 9 0 84 8; +#X connect 9 1 84 9; +#X connect 10 0 84 10; +#X connect 10 1 84 11; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 13 0 84 12; +#X connect 13 1 84 13; +#X connect 14 0 84 14; +#X connect 14 1 84 15; +#X connect 15 0 13 0; +#X connect 16 0 14 0; +#X connect 17 0 84 16; +#X connect 17 1 84 17; +#X connect 18 0 84 18; +#X connect 18 1 84 19; +#X connect 19 0 17 0; +#X connect 20 0 18 0; +#X connect 21 0 84 20; +#X connect 21 1 84 21; +#X connect 22 0 84 22; +#X connect 22 1 84 23; +#X connect 23 0 21 0; +#X connect 24 0 22 0; +#X connect 25 0 84 24; +#X connect 25 1 84 25; +#X connect 26 0 84 26; +#X connect 26 1 84 27; +#X connect 27 0 25 0; +#X connect 28 0 26 0; +#X connect 29 0 84 28; +#X connect 29 1 84 29; +#X connect 30 0 84 30; +#X connect 30 1 84 31; +#X connect 31 0 29 0; +#X connect 32 0 30 0; +#X connect 33 0 84 32; +#X connect 33 1 84 33; +#X connect 34 0 84 34; +#X connect 34 1 84 35; +#X connect 35 0 33 0; +#X connect 36 0 34 0; +#X connect 37 0 84 36; +#X connect 37 1 84 37; +#X connect 38 0 84 38; +#X connect 38 1 84 39; +#X connect 39 0 37 0; +#X connect 40 0 38 0; +#X connect 41 0 84 40; +#X connect 41 1 84 41; +#X connect 42 0 41 0; +#X connect 63 0 1 0; +#X connect 64 0 2 0; +#X connect 65 0 5 0; +#X connect 66 0 6 0; +#X connect 67 0 9 0; +#X connect 68 0 10 0; +#X connect 69 0 13 0; +#X connect 70 0 14 0; +#X connect 71 0 17 0; +#X connect 72 0 18 0; +#X connect 73 0 21 0; +#X connect 74 0 22 0; +#X connect 75 0 25 0; +#X connect 76 0 26 0; +#X connect 77 0 29 0; +#X connect 78 0 30 0; +#X connect 79 0 34 0; +#X connect 80 0 41 0; +#X connect 81 0 38 0; +#X connect 82 0 37 0; +#X connect 86 0 33 0; +#X coords 0 -1 1 1 1910 394 2 0 100; diff --git a/mucelj.pd b/mucelj.pd new file mode 100644 index 0000000..caf9fb4 --- /dev/null +++ b/mucelj.pd @@ -0,0 +1,47 @@ +#N canvas 765 186 915 842 12; +#X obj 113 40 inlet; +#X obj 51 39 inlet~; +#X obj 260 492 outlet~; +#X obj 235 92 receive mucelj_tempo; +#X obj 242 125 receive mucelj_control; +#X obj 213 54 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 297 186 + 1; +#X floatatom 238 233 5 0 0 0 - - -; +#X obj 239 183 f; +#N canvas -8 -8 3440 1357 (subpatch) 0; +#X array array1 16 float 3; +#A 0 42.0337 44.2078 45.21 47.0451 44.2373 44.2373 40.2204 40.2208 +42.1737 44.2593 45.1803 47.2148 44.2078 44.1935 40.3463 40.4053; +#X coords 0 40 16 50 200 140 1 0 0; +#X restore 22 141 graph; +#X obj 295 211 mod 16; +#X obj 249 333 mtof; +#X floatatom 251 365 5 0 0 0 - - -; +#X obj 254 396 osc~; +#X obj 241 265 tabread array1; +#X floatatom 246 302 5 0 0 0 - - -; +#X obj 254 435 *~ 0.3; +#X obj 432 113 metro 500; +#X obj 428 72 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 318 306 + 20; +#X obj 328 519 throw~ mucelj_audio_1; +#X connect 3 0 5 0; +#X connect 3 0 8 0; +#X connect 6 0 8 1; +#X connect 6 0 10 0; +#X connect 7 0 14 0; +#X connect 8 0 6 0; +#X connect 8 0 7 0; +#X connect 10 0 8 1; +#X connect 11 0 12 0; +#X connect 12 0 13 0; +#X connect 13 0 16 0; +#X connect 14 0 15 0; +#X connect 15 0 19 0; +#X connect 16 0 2 0; +#X connect 16 0 20 0; +#X connect 17 0 8 0; +#X connect 18 0 17 0; +#X connect 19 0 11 0; diff --git a/mute.pd b/mute.pd new file mode 100644 index 0000000..289eaa9 --- /dev/null +++ b/mute.pd @@ -0,0 +1,10 @@ +#N canvas 0 23 450 300 12; +#X obj 126 42 inlet; +#X obj 76 42 inlet~; +#X obj 75 144 gate~; +#X obj 74 181 outlet~; +#X obj 134 181 outlet~; +#X connect 0 0 2 1; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 4 0; diff --git a/novaa.pd b/novaa.pd new file mode 100644 index 0000000..d3b9145 --- /dev/null +++ b/novaa.pd @@ -0,0 +1,82 @@ +#N canvas 711 23 712 766 12; +#X obj 73 49 inlet; +#X obj 19 49 inlet~; +#X obj 43 599 outlet~; +#X obj 101 599 outlet; +#X obj 166 141 receive novaa_tempo; +#X obj 259 275 receive novaa_control; +#X obj 166 225 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 282 300 list prepend set; +#X obj 282 323 list trim; +#X msg 282 345 1 2 3 4 5 6 7; +#X obj 260 399 unpack f f f f f f f; +#X floatatom 315 566 5 0 0 0 - - -; +#X floatatom 330 542 5 0 0 0 - - -; +#X floatatom 343 522 5 0 0 0 - - -; +#X floatatom 357 498 5 0 0 0 - - -; +#X floatatom 373 475 5 0 0 0 - - -; +#X floatatom 387 452 5 0 0 0 - - -; +#X floatatom 401 430 5 0 0 0 - - -; +#X obj 487 414 osc~; +#X obj 487 450 *~; +#X msg 533 413 0; +#X msg 565 413 0.3; +#X floatatom 486 380 5 0 0 0 - - -; +#X obj 486 315 random 1000; +#X obj 486 339 + 40; +#N canvas 0 22 450 278 (subpatch) 0; +#X array newbeat 8 float 3; +#A 0 64 67 86 94 77 83 65 52; +#X coords 0 127 8 0 200 140 1 0 0; +#X restore 330 37 graph; +#X msg 331 194 \; newbeat 0 64 67 86 94 77 83 65 52; +#X obj 43 388 tabread newbeat; +#X floatatom 43 412 5 0 0 0 - - -; +#X obj 43 435 mtof; +#X floatatom 43 459 5 0 0 0 - - -; +#X obj 43 482 osc~ 440; +#X obj 43 540 *~; +#X obj 68 315 + 1; +#X obj 42 315 f; +#X floatatom 43 362 5 0 0 0 - - -; +#X obj 42 339 % 8; +#X obj 124 494 line~; +#X obj 124 444 loadbang; +#X msg 124 468 1; +#X text 467 481 old code to generate random sound; +#X obj 166 600 throw~ novaa_audio_1; +#X connect 4 0 6 0; +#X connect 5 0 7 0; +#X connect 5 0 10 0; +#X connect 6 0 34 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 10 0 11 0; +#X connect 10 1 12 0; +#X connect 10 2 13 0; +#X connect 10 3 14 0; +#X connect 10 4 15 0; +#X connect 10 5 16 0; +#X connect 10 6 17 0; +#X connect 18 0 19 0; +#X connect 20 0 19 1; +#X connect 21 0 19 1; +#X connect 22 0 18 0; +#X connect 23 0 24 0; +#X connect 24 0 22 0; +#X connect 27 0 28 0; +#X connect 28 0 29 0; +#X connect 29 0 30 0; +#X connect 30 0 31 0; +#X connect 31 0 32 0; +#X connect 32 0 2 0; +#X connect 32 0 41 0; +#X connect 33 0 34 1; +#X connect 34 0 33 0; +#X connect 34 0 36 0; +#X connect 35 0 27 0; +#X connect 36 0 35 0; +#X connect 37 0 32 1; +#X connect 38 0 39 0; +#X connect 39 0 37 0; diff --git a/panner.pd b/panner.pd new file mode 100644 index 0000000..8a05e3f --- /dev/null +++ b/panner.pd @@ -0,0 +1,44 @@ +#N canvas 981 184 770 589 12; +#X obj 104 101 hsl 66 15 0 1 0 0 empty empty empty -2 -6 0 10 -262144 +-1 -1 6500 1; +#X floatatom -42 211 5 0 0 0 - - -; +#X obj -60 401 *~; +#X obj 0 401 *~; +#X obj -60 440 outlet~; +#X obj 0 440 outlet~; +#X obj 81 360 line~; +#X msg 80 326 \$1 10; +#X obj -41 360 line~; +#X msg -42 326 \$1 10; +#X obj -68 8 inlet~; +#X obj 101 116 nbx 7 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 +-262144 -1 -1 1 256; +#X text -117 -54 Simple panner; +#X obj 101 50 r init; +#X msg 101 74 0.5; +#X obj 70 442 outlet; +#X obj 120 442 outlet; +#X obj -40 153 expr 1 - $f1; +#X floatatom 81 275 5 0 0 0 - - -; +#X msg 107 247 0; +#X connect 0 0 11 0; +#X connect 1 0 9 0; +#X connect 2 0 4 0; +#X connect 3 0 5 0; +#X connect 6 0 3 1; +#X connect 7 0 6 0; +#X connect 7 0 16 0; +#X connect 8 0 2 1; +#X connect 9 0 8 0; +#X connect 9 0 15 0; +#X connect 10 0 2 0; +#X connect 10 0 3 0; +#X connect 11 0 18 0; +#X connect 11 0 17 0; +#X connect 13 0 14 0; +#X connect 14 0 0 0; +#X connect 17 0 1 0; +#X connect 18 0 7 0; +#X connect 19 0 18 0; +#X connect 19 0 1 0; +#X coords 0 -1 1 1 73 31 1 100 100; diff --git a/plancs.pd b/plancs.pd new file mode 100644 index 0000000..cfa4b83 --- /dev/null +++ b/plancs.pd @@ -0,0 +1,92 @@ +#N canvas 288 23 1392 965 12; +#X obj 54 38 inlet~; +#X obj 110 38 inlet; +#X obj 110 658 outlet; +#X obj 54 658 outlet~; +#X obj 239 38 receive plancs_tempo; +#X obj 484 38 receive plancs_control; +#X obj 239 547 *~; +#X floatatom 365 374 5 0 0 0 - - -; +#X obj 365 436 osc~ 400; +#N canvas 0 50 450 250 (subpatch) 0; +#X array melody 15 float 3; +#A 0 60 0 64 62 60 0 64 62 60 0 64 62 60 0 55; +#X coords 0 127 15 0 200 140 1 0 0; +#X restore 1041 173 graph; +#X obj 239 130 float; +#X obj 278 130 + 1; +#X floatatom 239 161 5 0 0 0 - - -; +#X floatatom 239 222 5 0 0 0 - - -; +#X obj 365 282 tabread melody; +#X floatatom 365 313 5 0 0 0 - - -; +#X obj 460 527 line~; +#X obj 365 343 mtof; +#X msg 529 498 0.1 100; +#X msg 460 498 0 100; +#N canvas 0 50 450 250 (subpatch) 0; +#X array bassline 15 float 3; +#A 0 30 0 0 35 30 0 0 35 30 0 0 35 30 0 25; +#X coords 0 127 15 0 200 140 1 0 0; +#X restore 831 173 graph; +#X obj 239 191 % 16; +#X obj 239 282 tabread bassline; +#X floatatom 239 374 5 0 0 0 - - -; +#X floatatom 239 313 5 0 0 0 - - -; +#X obj 239 343 mtof; +#X msg 831 69 \; melody 0 60 0 64 62 60 0 64 62 60 0 64 62 60 0 55 +; +#X obj 239 436 osc~ 400; +#X msg 831 116 \; bassline 0 30 0 0 35 30 0 0 35 30 0 0 35 30 0 25 +; +#N canvas 0 50 450 250 (subpatch) 0; +#X array highs 15 float 3; +#A 0 0 90 0 90 0 90 0 90 0 90 0 90 0 90 95; +#X coords 0 127 15 0 200 140 1 0 0; +#X restore 831 333 graph; +#X floatatom 127 374 5 0 0 0 - - -; +#X floatatom 127 313 5 0 0 0 - - -; +#X obj 127 343 mtof; +#X obj 127 436 osc~ 400; +#X obj 127 282 tabread highs; +#X msg 831 22 \; highs 0 0 90 0 90 0 90 0 90 0 90 0 90 0 90 95; +#X obj 365 467 *~ 1; +#X text 458 480 off; +#X text 527 480 on; +#X obj 239 467 *~ 1.25; +#X obj 127 467 *~ 0.05; +#X obj 450 608 throw~ plancs_audio_1; +#X obj 602 450 loadbang; +#X text 535 419 ROB - need to loadbang your volume on; +#X connect 4 0 10 0; +#X connect 6 0 3 0; +#X connect 6 0 41 0; +#X connect 7 0 8 0; +#X connect 8 0 36 0; +#X connect 10 0 11 0; +#X connect 10 0 12 0; +#X connect 11 0 10 1; +#X connect 12 0 21 0; +#X connect 13 0 14 0; +#X connect 13 0 22 0; +#X connect 13 0 34 0; +#X connect 14 0 15 0; +#X connect 15 0 17 0; +#X connect 16 0 6 1; +#X connect 17 0 7 0; +#X connect 18 0 16 0; +#X connect 19 0 16 0; +#X connect 21 0 13 0; +#X connect 22 0 24 0; +#X connect 23 0 27 0; +#X connect 24 0 25 0; +#X connect 25 0 23 0; +#X connect 27 0 39 0; +#X connect 30 0 33 0; +#X connect 31 0 32 0; +#X connect 32 0 30 0; +#X connect 33 0 40 0; +#X connect 34 0 31 0; +#X connect 36 0 6 0; +#X connect 39 0 6 0; +#X connect 40 0 6 0; +#X connect 42 0 18 0; diff --git a/quarlm.pd b/quarlm.pd new file mode 100644 index 0000000..e1bed1f --- /dev/null +++ b/quarlm.pd @@ -0,0 +1,68 @@ +#N canvas 648 153 904 680 12; +#X obj 180 36 receive quarlm_tempo; +#X obj 335 36 receive quarlm_control; +#X obj 85 36 inlet; +#X obj 94 577 outlet; +#X obj 29 36 inlet~; +#X obj 34 577 outlet~; +#N canvas 0 50 450 250 (subpatch) 0; +#X array melody 11 float 3; +#A 0 72 71 67 72 71 67 64 60 59 60 65; +#X coords 0 127 11 0 200 140 1 0 0; +#X restore 572 35 graph; +#X obj 33 129 f; +#X obj 79 129 + 1; +#X floatatom 33 153 5 0 0 0 - - -; +#X obj 33 228 tabread melody; +#X floatatom 33 252 10 0 0 0 - - -; +#X floatatom 33 200 5 0 0 0 - - -; +#X msg 92 105 0; +#X obj 132 346 line~; +#X obj 33 387 *~; +#X msg 186 297 0 50; +#X obj 33 275 mtof; +#X floatatom 33 299 10 0 0 0 - - -; +#X obj 33 348 osc~; +#X msg 132 297 0.5 50; +#X obj 378 66 list prepend set; +#X obj 378 93 list trim; +#X msg 378 122 1 2 3 4 5; +#X obj 335 165 unpack f f f f f; +#X floatatom 335 230 5 0 0 0 - - -; +#X floatatom 382 230 5 0 0 0 - - -; +#X floatatom 430 230 5 0 0 0 - - -; +#X floatatom 478 230 5 0 0 0 - - -; +#X floatatom 527 230 5 0 0 0 - - -; +#X obj 33 176 % 11; +#X msg 571 179 \; melody 0 72 71 67 72 71 67 64 60 59 60 65; +#X obj 64 445 throw~ quarlm_audio_1; +#X obj 267 295 loadbang; +#X text 337 295 ROB - need to start with a volume; +#X connect 0 0 7 0; +#X connect 1 0 21 0; +#X connect 1 0 24 0; +#X connect 7 0 9 0; +#X connect 7 0 8 0; +#X connect 8 0 7 1; +#X connect 9 0 30 0; +#X connect 10 0 11 0; +#X connect 11 0 17 0; +#X connect 12 0 10 0; +#X connect 13 0 7 1; +#X connect 14 0 15 1; +#X connect 15 0 5 0; +#X connect 15 0 32 0; +#X connect 16 0 14 0; +#X connect 17 0 18 0; +#X connect 18 0 19 0; +#X connect 19 0 15 0; +#X connect 20 0 14 0; +#X connect 21 0 22 0; +#X connect 22 0 23 0; +#X connect 24 0 25 0; +#X connect 24 1 26 0; +#X connect 24 2 27 0; +#X connect 24 3 28 0; +#X connect 24 4 29 0; +#X connect 30 0 12 0; +#X connect 33 0 20 0; diff --git a/recorder.pd b/recorder.pd new file mode 100644 index 0000000..55ffe45 --- /dev/null +++ b/recorder.pd @@ -0,0 +1,11 @@ +#N canvas 1000 203 450 300 12; +#X obj 280 255 writesf~ 2; +#X obj 297 220 inlet~; +#X obj 347 220 inlet~; +#X obj 279 193 r recorder; +#X msg 31 167 start; +#X msg 33 193 stop; +#X msg 22 83 open /tmp/foo.wav; +#X connect 1 0 0 0; +#X connect 2 0 0 1; +#X connect 3 0 0 0; diff --git a/recorder_controls.pd b/recorder_controls.pd new file mode 100644 index 0000000..759339a --- /dev/null +++ b/recorder_controls.pd @@ -0,0 +1,21 @@ +#N canvas 0 23 450 300 12; +#X obj 100 196 s recorder; +#X obj -33 143 savepanel; +#X msg -33 167 open \$1.wav; +#X msg 146 132 stop; +#X msg 99 132 start; +#X obj 95 71 bng 15 250 50 0 empty empty Open_File... 22 7 0 10 -262144 +-1 -1; +#X obj 95 93 bng 15 250 50 0 empty empty Start 22 7 0 10 -262144 -1 +-1; +#X obj 155 93 bng 15 250 50 0 empty empty Stop 22 7 0 10 -262144 -1 +-1; +#X text 75 46 Record Main Outs; +#X connect 1 0 2 0; +#X connect 2 0 0 0; +#X connect 3 0 0 0; +#X connect 4 0 0 0; +#X connect 5 0 1 0; +#X connect 6 0 4 0; +#X connect 7 0 3 0; +#X coords 0 -1 1 1 163 76 2 70 40; diff --git a/sheny13.pd b/sheny13.pd new file mode 100644 index 0000000..20e4395 --- /dev/null +++ b/sheny13.pd @@ -0,0 +1,94 @@ +#N canvas 460 23 1220 1005 12; +#X obj 134 40 inlet; +#X obj 74 40 inlet~; +#X obj 72 829 outlet~; +#X obj 138 829 outlet; +#X obj 213 41 receive sheny13_tempo; +#X obj 382 41 receive sheny13_control; +#X obj 72 342 metro 1000; +#X obj 72 389 f; +#X obj 112 389 + 1; +#X floatatom 72 413 5 0 0 0 - - -; +#X floatatom 72 523 5 0 0 0 - - -; +#X floatatom 72 460 5 0 0 0 - - -; +#X floatatom 139 310 5 0 0 0 - - -; +#X msg 162 356 0; +#X obj 201 676 line~; +#X obj 72 703 *~; +#X msg 235 628 0 50; +#X obj 72 546 mtof; +#X floatatom 72 570 10 0 0 0 - - -; +#X msg 162 627 0.2 50; +#X floatatom 139 231 5 0 0 0 - - -; +#X floatatom 139 169 5 0 0 0 - - -; +#X obj 72 648 osc~ 440; +#X obj 203 482 send coolbang; +#X obj 139 135 receive coolbang; +#X obj 139 262 * 150; +#X obj 72 436 % 13; +#X obj 72 99 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 72 308 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X floatatom 335 394 5 0 0 0 - - -; +#X floatatom 402 468 5 0 0 0 - - -; +#X obj 335 471 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 368 471 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 335 433 select 0 1; +#X obj 186 459 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 72 492 tabread note; +#X obj 139 197 tabread duration; +#X msg 516 348 \; note 60 64 69 60 64 69 64 59 64 69 59 64 67; +#X msg 516 392 \; duration 3 3 3 5 3 3 3 3 3 3 5 3 3; +#N canvas 0 50 450 250 (subpatch) 0; +#X array note 16 float 3; +#A 0 59.8716 65.3143 68.9429 60 64 68.9429 65.3141 59 64 69 59 64 67 +78 79 80; +#X coords 0 127 16 0 200 70 1 0 0; +#X restore 462 213 graph; +#N canvas 0 50 450 250 (subpatch) 0; +#X array duration 16 float 3; +#A 0 3 3 3 3 3 5 3 3 3 3 3 3 5 3 3 3; +#X coords 0 10 16 0 200 70 1 0 0; +#X restore 690 212 graph; +#X obj 197 782 throw~ sheny13_audio_1; +#X connect 4 0 27 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 7 1; +#X connect 9 0 26 0; +#X connect 10 0 17 0; +#X connect 11 0 23 0; +#X connect 11 0 35 0; +#X connect 12 0 6 1; +#X connect 13 0 7 1; +#X connect 13 0 34 0; +#X connect 14 0 15 1; +#X connect 15 0 2 0; +#X connect 15 0 41 0; +#X connect 16 0 14 0; +#X connect 17 0 18 0; +#X connect 18 0 22 0; +#X connect 19 0 14 0; +#X connect 20 0 25 0; +#X connect 21 0 36 0; +#X connect 22 0 15 0; +#X connect 24 0 21 0; +#X connect 25 0 12 0; +#X connect 26 0 11 0; +#X connect 27 0 28 0; +#X connect 28 0 6 0; +#X connect 28 0 29 0; +#X connect 29 0 33 0; +#X connect 31 0 16 0; +#X connect 32 0 13 0; +#X connect 33 0 31 0; +#X connect 33 1 32 0; +#X connect 33 2 30 0; +#X connect 34 0 19 0; +#X connect 35 0 10 0; +#X connect 36 0 20 0; diff --git a/sine_synth.pd b/sine_synth.pd new file mode 100755 index 0000000..335b6d5 --- /dev/null +++ b/sine_synth.pd @@ -0,0 +1,30 @@ +#N canvas 742 231 841 578 12; +#X obj 57 166 osc~ 440; +#X obj 156 185 line~; +#X obj 57 205 *~; +#X obj 57 93 mtof; +#X floatatom 57 117 10 0 0 0 - - -; +#X obj 156 73 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 218 103 delay 1000; +#X obj 57 15 inlet; +#X obj 156 15 inlet; +#X obj 285 14 inlet; +#X obj 57 272 outlet~; +#X msg 218 137 0 100; +#X obj 57 231 *~ 2; +#X msg 155 137 0.1 1000; +#X connect 0 0 2 0; +#X connect 1 0 2 1; +#X connect 2 0 12 0; +#X connect 3 0 4 0; +#X connect 4 0 0 0; +#X connect 5 0 6 0; +#X connect 5 0 13 0; +#X connect 6 0 11 0; +#X connect 7 0 3 0; +#X connect 8 0 5 0; +#X connect 9 0 6 1; +#X connect 11 0 1 0; +#X connect 12 0 10 0; +#X connect 13 0 1 0; diff --git a/smithd32.pd b/smithd32.pd new file mode 100755 index 0000000..0192e4a --- /dev/null +++ b/smithd32.pd @@ -0,0 +1,506 @@ +#N canvas 0 23 1680 976 12; +#X floatatom 861 60 5 0 0 0 - - -; +#X obj 861 88 * 12; +#X floatatom 861 114 5 0 0 0 - - -; +#X obj 350 3 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 +; +#X obj 350 31 metro 1000; +#X obj 394 284 route 1 2 3 4 5 6; +#X obj 304 325 s I; +#X obj 355 325 s II; +#X obj 412 325 s III; +#X obj 476 325 s IV; +#X obj 163 12 r I; +#X obj 163 75 s chord; +#X msg 163 42 48 52 55; +#X obj 163 178 s chord; +#X obj 163 289 s chord; +#X msg 163 145 50 53 57; +#X msg 163 256 53 57 60; +#X obj 163 394 s chord; +#X obj 163 497 s chord; +#X obj 163 608 s chord; +#X msg 163 361 55 59 62; +#X msg 163 575 59 62 65; +#X obj 710 114 r chord; +#X msg 163 464 57 60 64; +#X obj 710 183 list prepend set; +#X obj 710 206 list trim; +#X msg 710 229 67 71 74; +#X obj 163 115 r II; +#X obj 163 226 r III; +#X obj 163 331 r IV; +#X obj 533 325 s V; +#X obj 585 325 s VI; +#X obj 163 434 r V; +#N canvas 1002 29 678 460 diatonic_harmony 0; +#X obj 273 11 inlet; +#X text 154 11 current chord in; +#X obj 273 64 sel 1 2 3 4 5 6; +#X obj 176 119 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X floatatom 313 316 5 0 0 0 - - -; +#X msg 244 142 5; +#X obj 244 118 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 281 118 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X msg 281 142 6; +#X obj 316 119 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 316 142 random 2; +#X obj 316 170 sel 0 1; +#X msg 301 203 1; +#X msg 334 203 5; +#X obj 396 118 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 433 118 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X msg 396 142 1; +#X msg 433 142 2; +#X obj 313 353 outlet; +#X text 16 116 Diatonic Harmony; +#X text 16 144 1 - ANY; +#X text 16 163 2 - 5; +#X text 16 181 3 - 6; +#X text 16 199 4 - 1 or 5; +#X text 16 216 5 - 1; +#X text 16 234 6 - 2; +#X obj 176 142 random 5; +#X obj 176 170 + 2; +#X connect 0 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 6 0; +#X connect 2 2 7 0; +#X connect 2 3 9 0; +#X connect 2 4 14 0; +#X connect 2 5 15 0; +#X connect 3 0 26 0; +#X connect 4 0 18 0; +#X connect 5 0 4 0; +#X connect 6 0 5 0; +#X connect 7 0 8 0; +#X connect 8 0 4 0; +#X connect 9 0 10 0; +#X connect 10 0 11 0; +#X connect 11 0 12 0; +#X connect 11 1 13 0; +#X connect 12 0 4 0; +#X connect 13 0 4 0; +#X connect 14 0 16 0; +#X connect 15 0 17 0; +#X connect 16 0 4 0; +#X connect 17 0 4 0; +#X connect 26 0 27 0; +#X connect 27 0 4 0; +#X restore 394 224 pd diatonic_harmony; +#X msg 316 135 1; +#X obj 348 234 f; +#X floatatom 394 247 5 0 0 0 - - -; +#X obj 286 327 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 334 327 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 391 327 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 456 327 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 513 327 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 564 327 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X text 443 247 << current chord; +#X text 729 60 Select octave >> (base -1 from center C), f 17; +#X text 18 246 C major scale; +#X text 18 266 I - CEG \,; +#X text 18 285 II - DFA \,; +#X text 18 305 III - EGB \,; +#X text 18 325 IV - FAC \,; +#X text 18 345 V - GBD \,; +#X text 18 363 VI - ACE; +#X obj 585 209 s tempo; +#X obj 476 161 s start; +#X obj 311 422 r start; +#X obj 378 422 r tempo; +#X obj 311 482 metro 1000; +#X obj 378 452 / 4; +#X obj 350 63 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 700 260 unpack f f f; +#X obj 710 142 list-abs/list-math + 0; +#X obj 675 416 sine_synth; +#X obj 781 416 sine_synth; +#X obj 911 417 sine_synth; +#X obj 163 545 r VI; +#X obj 861 11 loadbang; +#X msg 861 36 1; +#X obj 687 757 s dur; +#X obj 742 354 r dur; +#X obj 848 334 r dur; +#X obj 978 354 r dur; +#X obj 311 516 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 239 711 route 1 2 3 4; +#X obj 239 635 f; +#X obj 275 635 + 1; +#X obj 239 660 expr ($f1 % 4)+1; +#X floatatom 239 683 5 0 0 0 - - -; +#X obj 496 518 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 311 603 sel 0 1; +#X obj 385 635 f; +#X obj 421 635 + 1; +#X obj 385 660 expr ($f1 % 4)+1; +#X floatatom 385 683 5 0 0 0 - - -; +#X obj 311 580 * 1; +#X msg 311 548 1; +#X obj 379 803 s s1; +#X obj 423 803 s s2; +#X obj 463 803 s s3; +#X obj 261 745 s all; +#X obj 708 354 r s1; +#X obj 814 334 r s2; +#X obj 944 354 r s3; +#X obj 825 357 r all; +#X obj 611 586 sel 0 1; +#X msg 496 492 1; +#X obj 474 463 loadbang; +#X obj 601 679 f; +#X obj 619 613 r tempo; +#X obj 619 636 * 0.75; +#X obj 757 681 f; +#X obj 775 621 r tempo; +#X obj 775 644 * 0.25; +#X text 627 175 << TEMPO; +#X text 284 3 START >>; +#X text 410 517 ARPEGGIO?>>; +#X obj 362 90 s beat; +#X obj 438 370 r beat; +#X obj 438 418 sel 0; +#X obj 585 43 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 585 90 * 1; +#X msg 585 62 1; +#X obj 620 63 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 585 119 sel 0 1; +#X obj 585 149 timer; +#X floatatom 585 176 5 0 0 0 - - -; +#X obj 266 68 loadbang; +#X obj 585 7 r beat; +#X floatatom 418 3 5 0 0 0 - - -; +#X obj 476 7 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 +; +#X obj 512 62 + 1; +#X floatatom 476 90 5 0 0 0 - - -; +#X msg 420 90 0; +#X obj 476 62 f; +#X obj 476 -51 loadbang; +#X msg 476 -26 1; +#X msg 418 -25 1000; +#X obj 476 137 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 +1; +#X obj 284 -41 hsl 128 15 200 2000 0 0 empty empty empty -2 -8 0 10 +-262144 -1 -1 5644 1; +#X obj 427 186 s arp; +#X obj 423 474 r arp; +#X msg 423 496 1; +#X obj 427 163 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 476 35 metro 500; +#X obj 427 140 sel 1; +#X obj 708 391 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 814 397 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 944 395 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X floatatom 687 722 5 0 0 0 - - -; +#X obj 539 466 * 1; +#X msg 539 438 1; +#X obj 539 495 sel 1; +#X msg 571 438 0; +#X obj 539 520 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X msg 603 438 1; +#X obj 539 372 r tempo; +#X obj 539 396 delay 100; +#X obj 427 114 > 2; +#X obj 476 113 < 5; +#X obj 231 30 r smithd32_tempo; +#X obj 12 13 inlet; +#X obj 62 13 inlet; +#X obj 1090 536 outlet; +#X obj 606 -43 r smithd32_control; +#X msg 508 671 0; +#X msg 542 671 5; +#X obj 693 299 s n1; +#X obj 737 299 s n2; +#X obj 781 300 s n3; +#X obj 674 382 r n1; +#X obj 778 380 r n2; +#X obj 910 383 r n3; +#X obj 1093 387 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 1199 393 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 1329 391 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 1059 378 r n1; +#X obj 1163 376 r n2; +#X obj 1295 379 r n3; +#X obj 1060 412 envelopes; +#X obj 1166 412 envelopes; +#X obj 1296 413 envelopes; +#X obj 385 759 route 1 2 3 4; +#X obj 1093 350 r s4; +#X obj 1199 330 r s5; +#X obj 1329 350 r s6; +#X obj 385 723 + 0; +#X obj 532 818 route 1 2 3 4; +#X obj 532 780 - 4; +#X obj 526 862 s s4; +#X obj 570 862 s s5; +#X obj 610 862 s s6; +#X obj 509 557 sel 1; +#X obj 782 784 + 20; +#X obj 782 839 s decay; +#X obj 1127 350 r decay; +#X obj 1233 330 r decay; +#X obj 1363 350 r decay; +#X floatatom 782 814 5 0 0 0 - - -; +#X obj 743 740 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 782 757 random 300; +#X obj 510 619 sel 0; +#X obj 542 651 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 509 588 random 5; +#X text 951 621 By Darius Smith; +#X text 952 640 Tutorials used:; +#X text 941 766 https://www.youtube.com/watch?v=I88Cxi86Zu8&feature=youtu.be +; +#X text 941 788 https://www.youtube.com/watch?v=gqpvIwYko3o&feature=youtu.be +; +#X text 944 746 By Really Useful Plugins; +#X text 945 684 By Programming for People; +#X text 943 705 https://www.youtube.com/watch?v=gdIAq7Kg-gI; +#X text 989 -16 Plans for the Future:; +#X text 986 61 2) Learn how to make more sounds; +#X text 986 87 3) Complete the drum sounds tutorials by Really Useful +Plugins; +#X text 986 134 4) Build a semi-randomized drum machine addon to this +; +#X text 987 164 5) Map controls to input from smithd32_contol; +#X text 1086 619 (^‿^); +#X text 988 2 1) Try to fix bug: envelopes instrument makes static +sound when first activated (ARPEGGIO is switched ON) - FIXED (appears +to be clipping issue); +#X text 988 228 NOTE: This patch will take a few seconds to start and +continue for a few seconds after it has stopped recieving pulses form +the master BPM. This is expected.; +#X msg 516 -25 10; +#X obj 1020 501 *~; +#X obj 1020 536 outlet~; +#X obj 1180 476 loadbang; +#X msg 1180 502 0; +#X obj 1224 502 delay 1000; +#X msg 1224 528 1; +#X floatatom 610 557 5 0 0 0 - - -; +#X obj 643 492 r tempo; +#X obj 643 520 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 438 395 random 50; +#X obj 1216 620 throw~ smithd32_audio_1; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 60 1; +#X connect 3 0 4 0; +#X connect 4 0 58 0; +#X connect 5 0 6 0; +#X connect 5 0 37 0; +#X connect 5 1 7 0; +#X connect 5 1 38 0; +#X connect 5 2 8 0; +#X connect 5 2 39 0; +#X connect 5 3 9 0; +#X connect 5 3 40 0; +#X connect 5 4 30 0; +#X connect 5 4 41 0; +#X connect 5 5 31 0; +#X connect 5 5 42 0; +#X connect 10 0 12 0; +#X connect 12 0 11 0; +#X connect 15 0 13 0; +#X connect 16 0 14 0; +#X connect 20 0 17 0; +#X connect 21 0 19 0; +#X connect 22 0 60 0; +#X connect 23 0 18 0; +#X connect 24 0 25 0; +#X connect 25 0 26 0; +#X connect 27 0 15 0; +#X connect 28 0 16 0; +#X connect 29 0 20 0; +#X connect 32 0 23 0; +#X connect 33 0 36 0; +#X connect 34 0 35 1; +#X connect 35 0 33 0; +#X connect 36 0 35 1; +#X connect 36 0 5 0; +#X connect 54 0 56 0; +#X connect 55 0 57 0; +#X connect 56 0 71 0; +#X connect 57 0 56 1; +#X connect 58 0 35 0; +#X connect 58 0 105 0; +#X connect 58 0 121 0; +#X connect 59 0 155 0; +#X connect 59 1 156 0; +#X connect 59 2 157 0; +#X connect 60 0 24 0; +#X connect 60 0 59 0; +#X connect 61 0 208 0; +#X connect 62 0 208 0; +#X connect 63 0 208 0; +#X connect 64 0 21 0; +#X connect 65 0 66 0; +#X connect 66 0 0 0; +#X connect 68 0 61 2; +#X connect 69 0 62 2; +#X connect 70 0 63 2; +#X connect 71 0 84 0; +#X connect 72 1 88 0; +#X connect 73 0 74 0; +#X connect 73 0 75 0; +#X connect 74 0 73 1; +#X connect 75 0 76 0; +#X connect 76 0 72 0; +#X connect 77 0 83 1; +#X connect 77 0 180 0; +#X connect 77 0 214 0; +#X connect 77 0 187 0; +#X connect 78 0 73 0; +#X connect 78 1 79 0; +#X connect 79 0 80 0; +#X connect 79 0 81 0; +#X connect 80 0 79 1; +#X connect 81 0 82 0; +#X connect 82 0 174 0; +#X connect 83 0 78 0; +#X connect 84 0 83 0; +#X connect 89 0 134 0; +#X connect 90 0 135 0; +#X connect 91 0 136 0; +#X connect 92 0 134 0; +#X connect 92 0 135 0; +#X connect 92 0 136 0; +#X connect 93 0 96 0; +#X connect 93 1 99 0; +#X connect 94 0 77 0; +#X connect 95 0 94 0; +#X connect 96 0 137 0; +#X connect 97 0 98 0; +#X connect 98 0 96 1; +#X connect 99 0 137 0; +#X connect 100 0 101 0; +#X connect 101 0 99 1; +#X connect 106 0 217 0; +#X connect 107 0 77 0; +#X connect 108 0 110 0; +#X connect 108 0 111 0; +#X connect 109 0 112 0; +#X connect 110 0 109 0; +#X connect 111 0 109 1; +#X connect 112 0 113 0; +#X connect 112 1 113 1; +#X connect 113 0 114 0; +#X connect 114 0 52 0; +#X connect 115 0 34 0; +#X connect 116 0 108 0; +#X connect 117 0 4 1; +#X connect 118 0 132 0; +#X connect 119 0 122 1; +#X connect 120 0 146 0; +#X connect 120 0 147 0; +#X connect 121 0 122 1; +#X connect 122 0 120 0; +#X connect 122 0 119 0; +#X connect 123 0 124 0; +#X connect 123 0 125 0; +#X connect 123 0 207 0; +#X connect 124 0 118 0; +#X connect 125 0 127 0; +#X connect 126 0 53 0; +#X connect 127 0 117 0; +#X connect 129 0 130 0; +#X connect 130 0 77 0; +#X connect 131 0 128 0; +#X connect 132 0 122 0; +#X connect 133 0 131 0; +#X connect 134 0 61 1; +#X connect 135 0 62 1; +#X connect 136 0 63 1; +#X connect 137 0 67 0; +#X connect 138 0 140 0; +#X connect 139 0 138 0; +#X connect 140 0 142 0; +#X connect 140 0 77 0; +#X connect 141 0 138 1; +#X connect 143 0 138 1; +#X connect 144 0 145 0; +#X connect 145 0 139 0; +#X connect 145 0 141 0; +#X connect 146 0 133 0; +#X connect 147 0 126 0; +#X connect 148 0 58 0; +#X connect 153 0 174 1; +#X connect 154 0 174 1; +#X connect 158 0 61 0; +#X connect 159 0 62 0; +#X connect 160 0 63 0; +#X connect 161 0 167 1; +#X connect 162 0 168 1; +#X connect 163 0 169 1; +#X connect 164 0 167 0; +#X connect 165 0 168 0; +#X connect 166 0 169 0; +#X connect 167 0 208 0; +#X connect 168 0 208 0; +#X connect 169 0 208 0; +#X connect 170 1 85 0; +#X connect 170 2 86 0; +#X connect 170 3 87 0; +#X connect 170 4 176 0; +#X connect 171 0 161 0; +#X connect 172 0 162 0; +#X connect 173 0 163 0; +#X connect 174 0 170 0; +#X connect 175 1 177 0; +#X connect 175 2 178 0; +#X connect 175 3 179 0; +#X connect 176 0 175 0; +#X connect 180 0 191 0; +#X connect 181 0 186 0; +#X connect 183 0 167 2; +#X connect 184 0 168 2; +#X connect 185 0 169 2; +#X connect 186 0 182 0; +#X connect 187 0 188 0; +#X connect 188 0 181 0; +#X connect 189 0 153 0; +#X connect 189 1 190 0; +#X connect 190 0 154 0; +#X connect 191 0 189 0; +#X connect 207 0 122 1; +#X connect 208 0 209 0; +#X connect 208 0 218 0; +#X connect 210 0 211 0; +#X connect 210 0 212 0; +#X connect 211 0 208 1; +#X connect 212 0 213 0; +#X connect 213 0 208 1; +#X connect 214 0 93 0; +#X connect 215 0 216 0; +#X connect 216 0 214 0; +#X connect 217 0 107 0; diff --git a/utilities.pd b/utilities.pd new file mode 100644 index 0000000..efad11a --- /dev/null +++ b/utilities.pd @@ -0,0 +1,23 @@ +#N canvas 0 23 737 285 12; +#X msg 235 77 60000 \$1; +#X obj 235 101 /; +#X floatatom 235 125 10 0 0 0 - - -; +#X floatatom 235 50 5 0 0 0 - - -; +#X text 20 47 Convert BPM to milliseconds; +#X obj 362 80 expr 60000/$f1; +#X floatatom 362 124 10 0 0 0 - - -; +#X text 281 49 bpm; +#X text 311 125 ms; +#X text 438 124 ms; +#X obj 513 102 bpmtoms; +#X floatatom 513 157 5 0 0 0 - - -; +#X floatatom 513 73 5 0 0 0 - - -; +#X text 555 158 ms; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 0 0; +#X connect 3 0 5 0; +#X connect 3 0 12 0; +#X connect 5 0 6 0; +#X connect 10 0 11 0; +#X connect 12 0 10 0;