aboutsummaryrefslogtreecommitdiff
path: root/pd/doc/5.reference/bag.pd
diff options
context:
space:
mode:
Diffstat (limited to 'pd/doc/5.reference/bag.pd')
-rw-r--r--pd/doc/5.reference/bag.pd27
1 files changed, 27 insertions, 0 deletions
diff --git a/pd/doc/5.reference/bag.pd b/pd/doc/5.reference/bag.pd
new file mode 100644
index 00000000..cdd5bfff
--- /dev/null
+++ b/pd/doc/5.reference/bag.pd
@@ -0,0 +1,27 @@
+#N canvas 118 56 577 366 12;
+#X text 18 337 see also:;
+#X obj 148 337 makenote;
+#X msg 76 151 60 64;
+#X msg 127 151 60 0;
+#X msg 171 151 62 64;
+#X msg 218 151 62 0;
+#X obj 76 278 print;
+#X text 121 279 Output is in the printout window.;
+#X msg 218 197 clear;
+#X obj 66 15 bag;
+#X text 101 14 - COLLECTION OF NUMBERS;
+#X text 12 42 The bag object takes (value \, flag) pairs. If the flag is true (nonzero) \, the value is added to the collection \; if false \, it's removed. The collection may have many copies of the same value. You can output the collection (and empty it) with a "flush" message \, or just empty it with "clear." You can use this to mimic a sustain pedal \, for example.;
+#X msg 217 174 flush;
+#X obj 104 337 poly;
+#X obj 76 248 bag;
+#X text 267 151 <-- add or delete elements;
+#X text 271 174 <-- output them;
+#X text 273 198 <-- start over;
+#X text 328 337 updated for Pd version 0.33;
+#X connect 2 0 14 0;
+#X connect 3 0 14 0;
+#X connect 4 0 14 0;
+#X connect 5 0 14 0;
+#X connect 8 0 14 0;
+#X connect 12 0 14 0;
+#X connect 14 0 6 0;