aboutsummaryrefslogtreecommitdiff
path: root/puremapping/median_n.pd
diff options
context:
space:
mode:
Diffstat (limited to 'puremapping/median_n.pd')
-rw-r--r--puremapping/median_n.pd257
1 files changed, 257 insertions, 0 deletions
diff --git a/puremapping/median_n.pd b/puremapping/median_n.pd
new file mode 100644
index 0000000..45fe7eb
--- /dev/null
+++ b/puremapping/median_n.pd
@@ -0,0 +1,257 @@
+#N canvas 609 51 652 617 10;
+#X obj 52 30 inlet;
+#X obj 364 33 inlet;
+#X obj 85 401 outlet;
+#X obj 364 98 \$1;
+#X obj 383 73 loadbang;
+#X obj 364 142 i;
+#X obj 364 166 max 1;
+#X obj 364 186 * 2;
+#X obj 364 119 / 2;
+#X obj 364 207 + 1;
+#N canvas 225 25 822 600 list_sort 0;
+#X obj 129 310 list split 1;
+#X obj 163 331 list split 1;
+#X obj 129 373 list append;
+#X obj 57 347 list;
+#X obj 57 287 > 0;
+#X obj 150 472 outlet;
+#X obj 57 308 sel 1 0;
+#X obj 163 49 inlet;
+#X text 55 513 2008 Michal Seta;
+#X obj 233 393 list prepend;
+#X obj 150 450 list append;
+#X obj 452 140 loadbang;
+#X obj 387 52 inlet;
+#N canvas 0 0 552 424 mux 0;
+#X obj 40 52 inlet;
+#X obj 153 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 connect 0 0 3 0;
+#X connect 1 0 4 0;
+#X connect 2 0 9 0;
+#X connect 3 0 10 0;
+#X connect 4 0 10 0;
+#X connect 5 0 3 1;
+#X connect 5 1 4 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 restore 200 252 pd mux;
+#X obj 387 201 list append \$1;
+#X obj 387 171 t b a;
+#X obj 330 392 t a;
+#X obj 163 163 t a a a a b;
+#X obj 163 120 t a b;
+#X text 292 283 [list-sort] sort an incoming list of numerical values
+in an ascending or descending order;
+#N canvas 294 34 842 667 minmaxpos 0;
+#X obj 128 120 route float;
+#X obj 159 256 f;
+#X obj 106 664 outlet;
+#X obj 165 639 f;
+#X obj 165 666 outlet;
+#X obj 106 575 t b b;
+#X obj 106 10 inlet;
+#X obj 106 636 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 262 183 pd once;
+#X obj 275 258 f;
+#X obj 244 257 max;
+#X obj 128 256 min;
+#X text 323 183 prime [min] and [max] with first item once;
+#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 168 371 pd count;
+#X obj 128 470 change;
+#X obj 244 472 change;
+#X obj 128 527 f;
+#X obj 244 525 f;
+#X obj 128 495 b;
+#X obj 244 496 b;
+#X msg 429 356 set \$1;
+#X msg 601 357 0;
+#X obj 106 30 t b a b b;
+#X obj 128 150 t a a b a;
+#X text 637 358 reset positions;
+#X text 483 356 set change;
+#X text 302 475 if min or max changes \, store the new positions.;
+#X text 227 24 output positions of min and max float in a list (zero-based)
+;
+#N canvas 0 0 450 300 list-drip 0;
+#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;
+#X restore 128 97 pd list-drip;
+#X connect 0 0 23 0;
+#X connect 1 0 11 1;
+#X connect 3 0 4 0;
+#X connect 5 0 7 0;
+#X connect 5 1 3 0;
+#X connect 6 0 22 0;
+#X connect 7 0 2 0;
+#X connect 8 0 10 1;
+#X connect 8 0 11 1;
+#X connect 8 0 20 0;
+#X connect 8 0 21 0;
+#X connect 9 0 10 1;
+#X connect 10 0 9 0;
+#X connect 10 0 15 0;
+#X connect 11 0 1 0;
+#X connect 11 0 14 0;
+#X connect 13 0 17 1;
+#X connect 13 0 16 1;
+#X connect 14 0 18 0;
+#X connect 15 0 19 0;
+#X connect 16 0 7 1;
+#X connect 17 0 3 1;
+#X connect 18 0 16 0;
+#X connect 19 0 17 0;
+#X connect 20 0 15 0;
+#X connect 20 0 14 0;
+#X connect 21 0 3 1;
+#X connect 21 0 7 1;
+#X connect 22 0 5 0;
+#X connect 22 1 28 0;
+#X connect 22 2 13 1;
+#X connect 22 3 8 1;
+#X connect 23 0 11 0;
+#X connect 23 1 10 0;
+#X connect 23 2 13 0;
+#X connect 23 3 8 0;
+#X connect 28 0 0 0;
+#X restore 200 215 pd minmaxpos;
+#X obj 57 260 list length;
+#X obj 57 236 list;
+#X connect 0 0 2 0;
+#X connect 0 1 1 0;
+#X connect 1 0 9 0;
+#X connect 1 1 2 1;
+#X connect 2 0 3 1;
+#X connect 3 0 17 0;
+#X connect 4 0 6 0;
+#X connect 6 0 3 0;
+#X connect 6 1 10 0;
+#X connect 7 0 18 0;
+#X connect 9 0 10 1;
+#X connect 9 0 16 0;
+#X connect 10 0 5 0;
+#X connect 11 0 14 0;
+#X connect 12 0 15 0;
+#X connect 13 0 0 1;
+#X connect 14 0 13 2;
+#X connect 15 0 14 0;
+#X connect 15 1 14 1;
+#X connect 16 0 9 1;
+#X connect 17 0 22 0;
+#X connect 17 1 0 0;
+#X connect 17 2 20 0;
+#X connect 18 0 17 0;
+#X connect 18 1 9 1;
+#X connect 20 0 13 0;
+#X connect 20 1 13 1;
+#X connect 21 0 4 0;
+#X connect 22 0 21 0;
+#X restore 52 156 pd list_sort;
+#X obj 85 375 list trim;
+#X obj 52 322 list split;
+#X obj 85 347 list split 1;
+#X obj 52 83 last_n;
+#X text 113 464 based on Alexandre Quessy object;
+#X connect 0 0 14 0;
+#X connect 1 0 3 0;
+#X connect 3 0 8 0;
+#X connect 4 0 3 0;
+#X connect 5 0 6 0;
+#X connect 6 0 7 0;
+#X connect 6 0 12 1;
+#X connect 7 0 9 0;
+#X connect 8 0 5 0;
+#X connect 9 0 14 1;
+#X connect 10 0 12 0;
+#X connect 11 0 2 0;
+#X connect 12 1 13 0;
+#X connect 13 0 11 0;
+#X connect 14 0 10 0;