aboutsummaryrefslogtreecommitdiff
path: root/slist-help.pd
blob: bc933142331ea4b1b25f30acfa1639cb6559cb59 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#N canvas 0 31 690 414 10;
#X obj 0 0 cnv 8 100 60 empty empty slist 10 20 1 18 -262144 -1109
0;
#X text 3 354 (c) Moonix: Antoine Rousseau 2003;
#X text 109 12 shared list of symbols \, with a "find" feature;
#X obj 80 107 slist foo;
#X obj 261 100 slist foo;
#X text 24 55 1) fill the slist;
#X msg 261 79 len;
#X text 260 58 2) get the slist length;
#X floatatom 319 121 5 0 0 0 - - -;
#X obj 480 106 slist foo;
#X msg 451 79 1;
#X msg 480 79 2;
#X msg 508 79 3;
#X symbolatom 509 127 10 0 0 0 - - -;
#X obj 157 218 slist foo;
#X text 448 59 3) get the nth symbol (first:1);
#X msg 21 189 find boo;
#X msg 225 189 find bar;
#X floatatom 157 242 5 0 0 0 - - -;
#X msg 91 189 find bee;
#X msg 157 189 find baa;
#X obj 548 212 slist foo;
#X text 21 168 4) find the index of a symbol (0 = not found);
#X msg 548 192 reset;
#X msg 144 77 add baa;
#X msg 26 77 add boo \, add bee;
#X obj 378 223 slist foo;
#X text 364 169 5) print to console;
#X text 546 171 6) clear the slist;
#X msg 378 203 print;
#X text 383 184 (debug);
#X obj 256 318 slist foo2;
#X text 256 271 7) switch to another slist;
#X obj 476 345 slist;
#X msg 503 296 setlist foo;
#X msg 503 318 setlist foo2;
#X msg 460 296 print;
#X msg 256 297 add boo2 \, add bee2 \, add baa2;
#X msg 212 297 print;
#N canvas 592 238 494 344 META 0;
#X text 12 25 LICENSE GPL v2;
#X text 12 145 AUTHOR Antoine Rousseau;
#X text 12 165 HELP_PATCH_AUTHORS Antoine Rousseau. "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 shared list of symbols \, with a "find" feature
;
#X text 12 65 INLET_0 add len float find print reset setlist;
#X text 12 85 OUTLET_0 float;
#X text 12 105 OUTLET_1 symbol;
#X text 12 125 OUTLET_2 float;
#X restore 635 385 pd META;
#X connect 4 2 8 0;
#X connect 6 0 4 0;
#X connect 9 1 13 0;
#X connect 10 0 9 0;
#X connect 11 0 9 0;
#X connect 12 0 9 0;
#X connect 14 0 18 0;
#X connect 16 0 14 0;
#X connect 17 0 14 0;
#X connect 19 0 14 0;
#X connect 20 0 14 0;
#X connect 23 0 21 0;
#X connect 24 0 3 0;
#X connect 25 0 3 0;
#X connect 29 0 26 0;
#X connect 34 0 33 0;
#X connect 35 0 33 0;
#X connect 36 0 33 0;
#X connect 37 0 31 0;
#X connect 38 0 31 0;