aboutsummaryrefslogtreecommitdiff
path: root/pd/doc/5.reference/bag-help.pd
blob: cdd5bfff55e475320d83d6dcdcb9bb9efa5d19f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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;