Skip to content

Commit

Permalink
Update zl-help.pd
Browse files Browse the repository at this point in the history
  • Loading branch information
porres committed Feb 4, 2024
1 parent a4e5a55 commit b33f839
Showing 1 changed file with 86 additions and 80 deletions.
166 changes: 86 additions & 80 deletions documentation/help_files/zl-help.pd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#N canvas 496 64 558 571 10;
#N canvas 501 28 558 571 10;
#X obj 2 251 cnv 3 550 3 empty empty inlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 2 369 cnv 3 550 3 empty empty outlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 82 258 cnv 17 3 84 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
Expand All @@ -24,9 +24,9 @@
#X msg 202 145 beep 1 2 3 4;
#X text 143 256 bang;
#X text 126 313 zlclear;
#N canvas 529 109 649 574 examples 0;
#X obj 59 220 bng 18 250 50 0 empty empty empty 0 -6 0 8 #d0d0d0 #404040 #000000;
#X obj 146 342 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#N canvas 452 109 649 574 examples 0;
#X obj 54 232 bng 18 250 50 0 empty empty empty 0 -6 0 8 #d0d0d0 #404040 #000000;
#X obj 157 352 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X text 28 40 You can set the size of the list with a first optional float argument. If you don't \, then the first argument is a symbol that specifies the mode type \, and the maximum size is the default: 256 elements., f 54;
#X text 28 171 The maximum size is also set via the 'zlmaxsize' attribute or message (and it can be up to 32767)., f 54;
#X text 166 510 In Max \, the zl family of objects can be isntantiated with the mode after a dot \, such as [zl.group]. But this is not possible in Pd \, where the mode needs to be called as an argument after a space., f 66;
Expand Down Expand Up @@ -56,35 +56,37 @@
#X connect 10 1 5 0;
#X connect 14 0 10 0;
#X restore 435 167 pd ecils;
#N canvas 893 197 405 455 group 0;
#X obj 273 264 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 94 335 bng 20 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 266 358 nbx 3 14 0 100 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X text 306 356 group size;
#X obj 155 381 cyclone/zl group 10;
#X floatatom 190 335 5 0 0 0 - - - 0;
#X text 30 337 remainder;
#X obj 273 291 cyclone/uzi 24;
#X text 15 213 The right outlet is inactive.;
#X obj 155 408 print zl_group;
#X msg 155 252 mode group 4;
#X text 33 251 set mode & argument;
#X text 13 110 The input can have one or more elements \, when the grouped elements reach the group size \, the grouped list is sent out the left outlet. The remaining items are stored for next group.;
#X text 14 169 A bang message causes it to spit (and clear from the memory) the remaining stored elements (at the set group size).;
#X msg 97 282 zlclear;
#X text 14 29 The group mode aggroups 'n' elements into a list \, where 'n' cannot be higher than the maximum zl size. You can set 'n' (the group size) with an argument or with a float input into the right inlet \, but also when you set the mode with the mode message. The default group size is 0 \, which means nothing gets grouped and output.;
#X msg 177 309 list g h i j k;
#X msg 165 286 a b c d e f;
#X connect 0 0 7 0;
#X connect 1 0 4 0;
#X connect 2 0 4 1;
#X connect 4 0 9 0;
#X connect 5 0 4 0;
#X connect 7 2 4 0;
#X connect 10 0 4 0;
#X connect 14 0 4 0;
#X connect 16 0 4 0;
#X connect 17 0 4 0;
#N canvas 864 197 407 464 group 0;
#X obj 273 251 bng 25 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 266 352 nbx 3 14 1 10 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X text 306 350 group size;
#X floatatom 190 329 5 0 0 0 - - - 0;
#X text 30 335 remainder;
#X obj 273 285 cyclone/uzi 24;
#X text 15 207 The right outlet is inactive.;
#X obj 155 428 print zl_group;
#X msg 155 246 mode group 4;
#X text 33 245 set mode & argument;
#X text 13 104 The input can have one or more elements \, when the grouped elements reach the group size \, the grouped list is sent out the left outlet. The remaining items are stored for next group.;
#X text 14 163 A bang message causes it to spit (and clear from the memory) the remaining stored elements (at the set group size).;
#X msg 97 276 zlclear;
#X text 14 23 The group mode aggroups 'n' elements into a list \, where 'n' cannot be higher than the maximum zl size. You can set 'n' (the group size) with an argument or with a float input into the right inlet \, but also when you set the mode with the mode message. The default group size is 0 \, which means nothing gets grouped and output.;
#X msg 177 303 list g h i j k;
#X msg 165 280 a b c d e f;
#X obj 155 375 cyclone/zl.group 10;
#X listbox 155 399 30 0 0 0 - - - 0;
#X obj 94 329 bng 25 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X connect 0 0 5 0;
#X connect 1 0 16 1;
#X connect 3 0 16 0;
#X connect 5 2 16 0;
#X connect 8 0 16 0;
#X connect 12 0 16 0;
#X connect 14 0 16 0;
#X connect 15 0 16 0;
#X connect 16 0 17 0;
#X connect 17 0 7 0;
#X connect 18 0 16 0;
#X restore 435 209 pd group;
#N canvas 753 249 463 451 iter 0;
#X msg 174 275 1 2 3 4 5 6;
Expand Down Expand Up @@ -389,16 +391,14 @@
#X connect 7 0 6 0;
#X connect 8 0 6 0;
#X restore 519 403 pd union;
#X text 198 216 set to default;
#X obj 146 366 print length;
#X msg 172 260 zlmaxsize \$1;
#X msg 172 216 256;
#X msg 186 238 512;
#X text 183 216 set to default;
#X obj 157 376 print length;
#X msg 157 260 zlmaxsize \$1;
#X msg 157 216 256;
#X msg 171 238 512;
#X text 28 404 In the above example \, the objects are initialized to a size of 512 but can be resized to the default (256). Note that the group message can't group 512 elements if its size is 256 \, hence it groups two 256 elements message., f 54;
#X text 212 238 back to 512;
#X obj 59 247 cyclone/uzi 512;
#X obj 146 287 cyclone/zl 512 group 512;
#X obj 146 315 cyclone/zl len @zlmaxsize 512;
#X text 197 238 back to 512;
#X obj 54 259 cyclone/uzi 512;
#N canvas 889 66 405 380 sort 0;
#X obj 69 212 bng 18 250 50 0 empty empty empty 0 -6 0 8 #d0d0d0 #404040 #000000;
#X text 192 185 <= sets mode and arguments;
Expand All @@ -423,51 +423,55 @@
#X connect 12 0 6 0;
#X restore 518 250 pd sort;
#X text 28 132 Check details about each mode in the subpatches on the right. The modes introduced in the Max5+ versions are not implemented yet., f 54;
#N canvas 861 239 403 306 change 0;
#X obj 111 137 bng 18 250 50 0 empty empty empty 0 -6 0 8 #d0d0d0 #404040 #000000;
#X msg 129 80 zlclear;
#X msg 168 143 1 2 2 5.5 7 5 7 7 7;
#X obj 154 257 print zl_change;
#X obj 253 232 tgl 15 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X msg 191 173 a b e c e;
#X obj 253 256 print changed;
#X text 23 32 The change mode filters out list repetitions. The right outlet sends "1" when there's a new list and "0" when it is repeated., f 56;
#X msg 154 111 mode change;
#X text 230 111 <= sets mode;
#X obj 154 202 cyclone/zl change;
#X connect 0 0 10 0;
#X connect 1 0 10 0;
#X connect 2 0 10 0;
#X connect 4 0 6 0;
#X connect 5 0 10 0;
#X connect 8 0 10 0;
#X connect 10 0 3 0;
#X connect 10 1 4 0;
#N canvas 818 132 407 351 change 0;
#X obj 71 159 bng 18 250 50 0 empty empty empty 0 -6 0 8 #d0d0d0 #404040 #000000;
#X msg 89 102 zlclear;
#X msg 128 165 1 2 2 5.5 7 5 7 7 7;
#X obj 114 283 print zl_change;
#X obj 273 254 tgl 21 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X obj 273 282 print changed;
#X msg 114 133 mode change;
#X text 190 133 <= sets mode;
#X obj 114 223 cyclone/zl.change a b e c e;
#X text 23 32 The change mode filters out list repetitions. The right outlet sends "1" when there's a new list and "0" when it is repeated. Arguments initialize the list to filter., f 56;
#X msg 151 195 list a b e c e;
#X connect 0 0 8 0;
#X connect 1 0 8 0;
#X connect 2 0 8 0;
#X connect 4 0 5 0;
#X connect 6 0 8 0;
#X connect 8 0 3 0;
#X connect 8 1 4 0;
#X connect 10 0 8 0;
#X restore 434 104 pd change;
#N canvas 861 239 403 306 compare 0;
#N canvas 861 239 403 352 compare 0;
#X obj 55 175 bng 18 250 50 0 empty empty empty 0 -6 0 8 #d0d0d0 #404040 #000000;
#X msg 73 108 zlclear;
#X obj 98 237 cyclone/zl compare a b c;
#X obj 239 269 print indexes;
#X obj 98 269 print zl_compare;
#X msg 112 174 a b c;
#X msg 255 214 a b c d;
#X msg 123 202 a b c d;
#X msg 239 189 a b c;
#X msg 98 139 mode compare a b c;
#X text 220 138 <= sets mode and arguments;
#X text 21 41 The compare mode compares two lists and sends "1" if it is the same or "0" if it is not. In the case on non equal lists \, the right output sends the number of non equal indexes.;
#X connect 0 0 2 0;
#X connect 1 0 2 0;
#X connect 2 0 4 0;
#X connect 2 1 3 0;
#X connect 5 0 2 0;
#X connect 6 0 2 1;
#X connect 7 0 2 0;
#X connect 8 0 2 1;
#X connect 9 0 2 0;
#X obj 98 237 cyclone/zl.compare a b c;
#X obj 239 299 print indexes;
#X obj 98 299 print zl_compare;
#X obj 98 265 tgl 21 0 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000 0 1;
#X floatatom 239 269 5 0 0 0 - - - 0;
#X connect 0 0 9 0;
#X connect 1 0 9 0;
#X connect 2 0 9 0;
#X connect 3 0 9 1;
#X connect 4 0 9 0;
#X connect 5 0 9 1;
#X connect 6 0 9 0;
#X connect 9 0 12 0;
#X connect 9 1 13 0;
#X connect 12 0 11 0;
#X connect 13 0 10 0;
#X restore 434 125 pd compare;
#N canvas 861 239 390 258 delace 0;
#N canvas 861 239 390 258 delace 1;
#X obj 78 137 bng 18 250 50 0 empty empty empty 0 -6 0 8 #d0d0d0 #404040 #000000;
#X msg 96 80 zlclear;
#X obj 102 211 print zl_delace-A;
Expand Down Expand Up @@ -727,14 +731,16 @@
#X text 439 70 Examples:;
#X text 170 490 Compatibility note:;
#X text 36 14 Basic:;
#X obj 157 325 cyclone/zl.len @zlmaxsize 512;
#X obj 167 297 cyclone/zl.group @zlmaxsize 512 512;
#X connect 0 0 27 0;
#X connect 1 0 21 0;
#X connect 22 0 29 0;
#X connect 22 0 49 0;
#X connect 23 0 22 0;
#X connect 24 0 22 0;
#X connect 27 2 28 0;
#X connect 28 0 29 0;
#X connect 29 0 1 0;
#X connect 27 2 50 0;
#X connect 49 0 1 0;
#X connect 50 0 49 0;
#X restore 475 224 pd examples;
#X text 178 378 - output according to the mode: see details in [pd examples];
#X text 178 397 - output according to the mode: see details in [pd examples];
Expand Down

0 comments on commit b33f839

Please sign in to comment.