Browse Source

added list-abs (for change) (part 2)

m---w 11 years ago
parent
commit
dfb86808ff

+ 2 - 0
ds_gui-help.pd

@@ -0,0 +1,2 @@
+#N canvas 196 37 791 608 10;
+#X obj 0 0 ds_help;

+ 2 - 0
ds_logic-help.pd

@@ -0,0 +1,2 @@
+#N canvas 196 37 791 608 10;
+#X obj 0 0 ds_help;

+ 2 - 0
ds_reg-help.pd

@@ -0,0 +1,2 @@
+#N canvas 196 37 791 608 10;
+#X obj 0 0 ds_help;

+ 2 - 0
ds_route-help.pd

@@ -0,0 +1,2 @@
+#N canvas 196 37 791 608 10;
+#X obj 0 0 ds_help;

+ 2 - 0
ds_scheduler-help.pd

@@ -0,0 +1,2 @@
+#N canvas 196 37 791 608 10;
+#X obj 0 0 ds_help;

+ 2 - 0
ds_scheduler_gui-help.pd

@@ -0,0 +1,2 @@
+#N canvas 196 37 791 608 10;
+#X obj 0 0 ds_help;

+ 2 - 0
ds_transition-help.pd

@@ -0,0 +1,2 @@
+#N canvas 196 37 791 608 10;
+#X obj 0 0 ds_help;

+ 2 - 0
ds_transition_gui-help.pd

@@ -0,0 +1,2 @@
+#N canvas 196 37 791 608 10;
+#X obj 0 0 ds_help;

+ 30 - 0
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.

+ 10 - 0
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 <fbar a footils.org>
+
+-- 

+ 50 - 0
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;

+ 54 - 0
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;

+ 72 - 0
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)

+ 42 - 0
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;

+ 74 - 0
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;

+ 70 - 0
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;

+ 21 - 0
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;

+ 28 - 0
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;

+ 9 - 0
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;