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 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917
|
#N struct text-struct float x float y text z;
#N canvas 456 25 541 585 12;
#X obj 92 552 list;
#X obj 29 16 text;
#X text 15 552 see also:;
#N canvas 0 50 600 400 (subpatch) 0;
#N canvas 0 50 450 250 (subpatch) 0;
#X array table4 100 float 0;
#X coords 0 1 99 -1 500 300 1;
#X restore 50 50 graph;
#X restore 132 552 array;
#X obj 242 214 text define;
#X text 69 169 The text object's first argument sets its function:, f 27;
#N canvas 411 30 742 704 define 0;
#X msg 52 182 clear;
#X msg 102 244 read text-object-help.txt;
#X text 264 492 creation arguments:;
#X text 406 492 optional -k flag to keep contents;
#X text 408 509 optional name;
#X text 289 239 read from a file, f 10;
#X obj 138 315 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X obj 103 551 t b p;
#X obj 103 603 text get -s text t;
#X msg 103 578 0;
#X obj 103 653 print;
#X obj 103 628 list trim;
#X obj 103 490 text define -k text-1;
#A set 1 2 \, 3 \; 4 5\\\, 6 \;;
#X msg 118 283 write -c /tmp/test-cr.txt;
#X obj 247 520 print notify-outlet;
#X text 159 310 bang to output a pointer to a scalar (struct) containing the text - see first outlet below, f 45;
#X text 254 545 Second outlet notifies you when text changes. As of Pd 0.48 this only outputs the message "updated" when text changes \, but this might be extended to offer more information in the future.;
#X msg 171 419 click;
#X msg 219 419 close;
#X msg 152 354 send text-send;
#X text 260 354 send pointer to a named receive object;
#X obj 116 522 r text-send;
#X msg 163 390 sort;
#X text 210 388 sort the contents. details here:;
#N canvas 719 128 502 255 sorting-text 0;
#X obj 101 197 text define text-sorting;
#X msg 133 160 sort;
#X text 47 25 Numbers come before symbols \, which are sorted alphabetically (details such as case sensitivity (does 'b' come before 'A'?) may depend on operating system). Shorter lines come before longer ones that match the entire shorter lines. As a special case empty lines come before anything else.;
#X msg 101 125 set zz \\\; yy \\\; 1 2 \\\; 1 2 3 \\\; 1 \\\; 2 \\\;;
#X connect 1 0 0 0;
#X connect 3 0 0 0;
#X restore 453 389 pd sorting-text;
#X text 648 38 <= click;
#N canvas 665 149 577 459 reference 0;
#X obj 9 46 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 227 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 413 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X text 43 111 send <symbol> - send pointer to a named receive object, f 68;
#X text 101 253 pointer - a pointer to the scalar containing the array.;
#X obj 39 16 text define;
#X text 137 16 - create \, store \, and/or edit texts;
#X text 87 352 -k: saves/keeps the contents of the text with the patch.;
#X text 159 388 1) symbol - set text name.;
#X text 106 55 bang - output a pointer to the scalar containing the text., f 59;
#X text 43 129 read <symbol> - read from a file (with optional -c flag)., f 68;
#X text 36 147 write <symbol> - write to a file (with optional -c flag)., f 69;
#X text 106 165 sort - sort the text contents., f 59;
#X text 99 183 click - open text window., f 60;
#X text 99 201 close - closes the text window., f 60;
#X obj 10 250 cnv 1 550 1 empty empty 1st: 8 12 0 13 #000000 #000000 0;
#X obj 9 274 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X text 94 279 anything - outputs "updated" when text changes.;
#X text 99 73 clear - clear contents of the text., f 60;
#X obj 9 321 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 9 347 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X obj 9 379 cnv 1 550 1 empty empty args: 8 12 0 13 #7c7c7c #000000 0;
#X text 36 92 set <anything> - set text, f 69;
#X restore 545 39 pd reference;
#X obj 10 81 cnv 1 725 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X obj 33 18 text define;
#X text 131 18 - create \, store \, and/or edit texts;
#X text 307 277 an optional -c flag allows you to read or write to/from a file interpreting carriage returns as separators., f 55;
#X text 181 458 |;
#X text 181 471 V;
#X text 267 419 open (to see and edit text) and close text window;
#X text 185 453 - click on the object to open and see/edit text;
#X text 187 626 First outlet is pointer to a "text scalar" containing the text \, which is output when the object is sent a "bang". For example \, here's machinery for printing out the first message of the text., f 74;
#X text 27 90 [text define] maintains a text object and can name it so that other objects can find it (and later should have some alternative \, anonymous way to be found). A text contains messages separated by commas and semicolons., f 98;
#X obj 33 47 text;
#X text 129 47 - without arguments it defaults to [text define];
#X msg 76 215 write ~/test.txt;
#X obj 643 223 savepanel;
#X obj 558 223 openpanel;
#X text 384 186 "~" expands to home directory in both the read and write messages. You can also use these objects:, f 39;
#X text 201 215 write to a file -------->;
#X msg 24 150 set 1 2 \\\, 3 \\\; 4 5\\\, 6 \\\;;
#X text 217 149 set text (use backslash to escape commas and semicolons);
#X text 99 182 clear it all;
#X connect 0 0 12 0;
#X connect 1 0 12 0;
#X connect 6 0 12 0;
#X connect 7 0 9 0;
#X connect 7 1 8 3;
#X connect 8 0 11 0;
#X connect 9 0 8 0;
#X connect 11 0 10 0;
#X connect 12 0 7 0;
#X connect 12 1 14 0;
#X connect 13 0 12 0;
#X connect 17 0 12 0;
#X connect 18 0 12 0;
#X connect 19 0 12 0;
#X connect 21 0 7 0;
#X connect 22 0 12 0;
#X connect 39 0 12 0;
#X connect 44 0 12 0;
#X restore 354 214 pd define;
#X obj 242 242 text get;
#N canvas 379 89 819 598 get 0;
#X floatatom 109 160 5 0 5 0 - - - 0;
#X msg 33 129 0;
#X msg 109 129 2;
#X msg 69 129 1;
#X obj 109 344 print;
#X obj 225 343 print type;
#X msg 146 129 3;
#X msg 186 129 4;
#X obj 526 147 text define -k text-get;
#A set 1 2 3 4 5 \; a b c d e \; 4 5 6 7 8 \, 9 10 11 12 \;;
#X obj 109 275 text get text-get;
#X floatatom 87 473 5 0 0 0 - - - 0;
#X msg 51 432 0;
#X msg 127 432 2;
#X msg 87 432 1;
#X obj 87 560 print;
#X msg 164 432 3;
#X obj 87 503 text get text-get 1;
#X text 283 262 arguments: name of the text object or "-s struct-name";
#X floatatom 485 452 5 0 0 0 - - - 0;
#X msg 450 421 0;
#X msg 520 421 2;
#X msg 485 421 1;
#X obj 485 529 print;
#X msg 557 421 3;
#X text 53 398 examples showing field selection:;
#X floatatom 147 185 5 0 5 0 - - - 0;
#X floatatom 186 208 5 0 5 0 - - - 0;
#X text 284 281 next optional arg to set starting field number (first inlet -- none to specify whole line), f 46;
#X text 314 314 next optional arg to set inlet 2 (number of fields \, defaults to one), f 68;
#X msg 225 234 symbol text-get;
#X floatatom 225 308 5 0 0 0 - - - 0;
#X listbox 109 307 15 0 0 0 - - - 0;
#X obj 485 477 text get text-get 1 3;
#X listbox 87 532 11 0 0 0 - - - 0;
#X text 712 16 <= click;
#N canvas 679 124 567 469 reference 0;
#X obj 9 46 cnv 5 550 5 empty empty INLETS: 8 18 0 13 #202020 #000000 0;
#X obj 9 213 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 446 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 137 cnv 1 550 1 empty empty 3rd: 8 12 0 13 #7c7c7c #000000 0;
#X text 77 344 -s <symbol \, symbol>: struct name and field name of main structure., f 66;
#X obj 9 108 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 35 15 text get;
#X obj 9 75 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 165 cnv 1 550 1 empty empty 4th: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 268 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 241 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 90 274 float -;
#X text 99 377 symbol - text name if no flags are given (default: none).;
#X text 83 168 symbol - set text name., f 49;
#X text 76 188 pointer - pointer to the text if -s flag is used.;
#X obj 9 311 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 9 337 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X obj 9 369 cnv 1 550 1 empty empty args: 8 12 0 13 #7c7c7c #000000 0;
#X text 104 15 - read and output a message.;
#X text 90 83 float - specify message number and output (0 for first lmessage)., f 65;
#X text 90 114 float - starting element number (-1 for the whole message).;
#X text 90 144 float - specify number of elements.;
#X text 97 246 list - a message from text or elements from it.;
#X text 145 274 message type: 0 if terminated by a semicolon \, 1 if by a comma \, or 2 if the message number was out of range., f 53;
#X text 106 414 float - initial number of elements (default: 1)., f 56;
#X text 106 395 float - starting element number (default: -1)., f 56;
#X restore 618 16 pd reference;
#X obj 4 51 cnv 1 800 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X obj 34 17 text get;
#X listbox 485 504 11 0 0 0 - - - 0;
#X text 71 63 [text get] reads the nth message from the named text and outputs it \, or optionally reads one or more specific fields (atoms) from the message. A message is a list separated either by a comma or a semicolon. Semicolons also split messages into different lines., f 93;
#X text 151 160 specify message number (0 for first message);
#X text 188 184 starting element number (-1 \, the default \, gives the whole message), f 67;
#X text 231 207 specify number of elements (1 by default \, but ignored if whole message), f 71;
#X text 344 233 set another text by name or pointer;
#X text 345 341 "type" is 0 if terminated by a semicolon \, 1 if by a comma \, or 2 if the message number was out of range.;
#X text 228 496 read element number 1 (zero for first element), f 25;
#X text 648 464 read 3 elements starting at element 1, f 15;
#X text 485 121 click on the object to see messages;
#X text 103 17 - read and output a message;
#X connect 0 0 9 0;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 6 0 0 0;
#X connect 7 0 0 0;
#X connect 9 0 31 0;
#X connect 9 1 30 0;
#X connect 10 0 16 0;
#X connect 11 0 10 0;
#X connect 12 0 10 0;
#X connect 13 0 10 0;
#X connect 15 0 10 0;
#X connect 16 0 33 0;
#X connect 18 0 32 0;
#X connect 19 0 18 0;
#X connect 20 0 18 0;
#X connect 21 0 18 0;
#X connect 23 0 18 0;
#X connect 25 0 9 1;
#X connect 26 0 9 2;
#X connect 29 0 9 3;
#X connect 30 0 5 0;
#X connect 31 0 4 0;
#X connect 32 0 38 0;
#X connect 33 0 14 0;
#X connect 38 0 22 0;
#X restore 354 242 pd get;
#X text 88 479 here's how to access texts inside data structures:, f 27;
#X obj 180 552 scalar;
#X obj 242 340 text size;
#N canvas 573 102 592 354 size 0;
#X obj 93 119 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X obj 222 304 text define -k text-size;
#A set 1 2 \; 3 4 5 \; 7 8 9 10 \; cis boom bah \, walk the dog \;;
#X obj 93 243 text size text-size;
#X floatatom 93 268 5 0 0 0 - - - 0;
#X floatatom 117 153 5 0 10 0 - - - 0;
#X text 347 192 find another text by name or pointer, f 18;
#X msg 223 198 symbol text-size;
#X text 240 237 arguments: name of the text object or "-s struct-name", f 30;
#X obj 5 48 cnv 1 575 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 497 13 <= click;
#N canvas 699 173 577 372 reference 0;
#X obj 9 52 cnv 5 550 5 empty empty INLETS: 8 18 0 13 #202020 #000000 0;
#X obj 8 85 cnv 1 550 1 empty empty 1st: 8 12 0 13 #000000 #000000 0;
#X obj 9 211 cnv 2 550 2 empty empty OUTLET: 8 12 0 13 #202020 #000000 0;
#X obj 8 345 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 7 151 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X text 112 160 symbol - set array name., f 46;
#X text 106 180 pointer - pointer to the array if -s flag is used.;
#X text 76 280 -s <symbol \, symbol>: struct name and field name of main structure., f 66;
#X text 107 315 symbol - array name if no flags are given (default: none).;
#X obj 40 18 text size;
#X obj 9 250 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 9 276 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X obj 9 308 cnv 1 550 1 empty empty args: 8 12 0 13 #7c7c7c #000000 0;
#X text 120 17 - get number of messages or elements.;
#X text 124 90 bang - output the number of messages., f 45;
#X text 117 108 float -, f 7;
#X text 173 108 set message number and output its length or -1 if message number is out of range., f 41;
#X text 124 220 float - number of messages or message's length.;
#X restore 403 13 pd reference;
#X obj 30 15 text size;
#X text 69 68 [text size] reports the number of messages in the text or the length of a specified message.;
#X text 119 119 bang for number of messages;
#X text 159 147 float for length of nth message (outputs -1 if message number is out of range), f 43;
#X text 110 14 - get number of messages or elements;
#X connect 0 0 2 0;
#X connect 2 0 3 0;
#X connect 4 0 2 0;
#X connect 6 0 2 1;
#X restore 354 340 pd size;
#X obj 242 266 text set;
#N canvas 501 110 689 512 set 0;
#X floatatom 118 243 6 0 0 0 - - - 0;
#X msg 86 209 0;
#X msg 151 209 2;
#X msg 118 209 1;
#X msg 50 147 list x y z w;
#X msg 68 173 1 2 3;
#X msg 31 120 12 23 34 45 56 56;
#X obj 287 180 text define -k text-3;
#A set a b c \, d e f \; x y z w \; 1 2 3 \; 12 23 34 45 56 56 \; x y z w \; 1 2 3 \;;
#X obj 68 347 text set text-3, f 22;
#X floatatom 168 272 5 0 0 0 - - - 0;
#X text 165 121 list to write into the text;
#X text 234 345 arguments: name of the text object or "-s struct-name";
#X msg 219 314 symbol text-get;
#X text 333 314 find another text by name or pointer;
#X msg 184 209 1e+15;
#X text 592 17 <= click;
#N canvas 720 147 575 432 reference 0;
#X obj 9 45 cnv 5 550 5 empty empty INLETS: 8 18 0 13 #202020 #000000 0;
#X obj 9 232 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 407 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 148 cnv 1 550 1 empty empty 3rd: 8 12 0 13 #7c7c7c #000000 0;
#X text 77 307 -s <symbol \, symbol>: struct name and field name of main structure., f 66;
#X obj 9 107 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 28 15 text set;
#X obj 9 76 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 101 113 float -;
#X obj 9 185 cnv 1 550 1 empty empty 4th: 8 12 0 13 #7c7c7c #000000 0;
#X text 101 151 float -;
#X text 94 189 symbol - set text name., f 48;
#X text 87 208 pointer - pointer to the text if -s flag is used.;
#X text 160 243 NONE.;
#X text 111 344 1) symbol - text name if no flags are given (default: none)., f 61;
#X obj 9 274 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 9 300 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X obj 9 332 cnv 1 550 1 empty empty args: 8 12 0 13 #7c7c7c #000000 0;
#X text 98 14 - replace or add a message.;
#X text 108 81 list - a message to add or replace.;
#X text 157 113 message number to replace or add (if greater than the number of messages)., f 51;
#X text 157 151 element number to start replacing \, or replace whole message if negative., f 54;
#X text 118 362 2) float - set message number (default: 0)., f 57;
#X text 118 381 3) float - set element number (default: -1)., f 57;
#X restore 498 18 pd reference;
#X obj 7 48 cnv 1 675 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X obj 25 18 text set;
#X text 95 17 - replace or add a message;
#X text 28 60 [text set] replaces the nth message with the incoming list. If the number n is greater than the number of messages in the text \, a new line and message is created separated by semicolons., f 83;
#X text 446 181 <-- click to see text;
#X text 166 243 message number - use a large number to append a line;
#X text 215 266 element number - if 0 or positive \, replace text starting at this element \, or if negative (or not supplied) \, replace whole message, f 64;
#X text 234 363 next optional arg to set inlet 1 (message number), f 54;
#X text 234 380 next optional arg to set inlet 2 (element number \, defaults to -1: whole line), f 54;
#X text 22 430 If inlet 2 is unset or set to a negative number \, the entire message is replaced \, but if it is set to 0 or more to specify a starting field \, the line is not resized - instead \, as many items are replaced as were already in the list. In this case \, an out-of-range element number will not work and a warning is printed on the terminal window., f 92;
#X connect 0 0 8 1;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 8 0;
#X connect 5 0 8 0;
#X connect 6 0 8 0;
#X connect 9 0 8 2;
#X connect 12 0 8 3;
#X connect 14 0 0 0;
#X restore 354 266 pd set;
#X text 353 176 (click for details), f 11;
#X text 73 242 read and output a line;
#X text 79 266 replace or add a line;
#X text 93 340 get number of lines;
#X text 42 72 In Pd a "text" refers to a list of atoms that can include commas \, semicolons \, and dollar-sign constructs - anything that can go in a message box or a patch (as a saved file). You can use them to store a semicolon-separated list of lists \, or as messages to "execute" as in a sequencer or message box., f 62;
#X text 121 364 convert to list;
#X obj 242 364 text tolist;
#N canvas 674 124 528 426 tolist 0;
#X obj 68 156 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X obj 68 223 text tolist text-1;
#X obj 68 311 print;
#X text 324 178 find another text by name or pointer, f 18;
#X text 210 215 arguments: name of the text object or "-s struct-name", f 30;
#X listbox 68 270 61 0 0 0 - - - 0;
#X text 91 156 output list;
#X obj 5 51 cnv 1 512 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 446 18 <= click;
#N canvas 756 178 573 352 reference 0;
#X obj 9 52 cnv 5 550 5 empty empty INLETS: 8 18 0 13 #202020 #000000 0;
#X obj 8 85 cnv 1 550 1 empty empty 1st: 8 12 0 13 #000000 #000000 0;
#X obj 9 180 cnv 2 550 2 empty empty OUTLET: 8 12 0 13 #202020 #000000 0;
#X obj 8 322 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 7 120 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X text 112 129 symbol - set array name., f 46;
#X text 106 149 pointer - pointer to the array if -s flag is used.;
#X text 76 254 -s <symbol \, symbol>: struct name and field name of main structure., f 66;
#X text 107 290 symbol - array name if no flags are given (default: none).;
#X obj 27 17 text tolist;
#X text 115 16 - convert text to a list.;
#X text 124 90 bang - output contents as a list.;
#X text 127 189 list - contents of text as a list.;
#X obj 9 223 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 9 249 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X obj 9 281 cnv 1 550 1 empty empty args: 8 12 0 13 #7c7c7c #000000 0;
#X restore 352 17 pd reference;
#X obj 25 17 text tolist;
#X text 113 16 - convert text to a list.;
#X text 25 78 [text tolist] outputs the entire contents as a list. Semicolons \, commas \, and dollar signs are output as symbols (and so \, if symbols like " \, " are encountered \, they're escaped with backslashes)., f 66;
#X text 84 354 N.B.: text-1 is defined in [pd define] subwindow.;
#X msg 191 184 symbol text-size;
#X text 126 373 text-size is defined in [pd size].;
#X connect 0 0 1 0;
#X connect 1 0 5 0;
#X connect 5 0 2 0;
#X connect 14 0 1 1;
#X restore 354 364 pd tolist;
#X obj 242 388 text fromlist;
#N canvas 591 108 558 392 fromlist 0;
#X obj 45 276 text fromlist text-fromlist;
#X obj 231 341 text define text-fromlist;
#X msg 64 189 list this is a message \\\; this is another 1 ... \\\;;
#X text 223 319 click here to see contents;
#X msg 75 219 list 1 2 3;
#X text 292 231 find another text by name or pointer, f 18;
#X msg 231 233 symbol text-1, f 6;
#X text 57 133 set contents of text;
#X obj 5 51 cnv 1 512 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 446 18 <= click;
#N canvas 710 204 584 350 reference 0;
#X obj 9 52 cnv 5 550 5 empty empty INLETS: 8 18 0 13 #202020 #000000 0;
#X obj 8 85 cnv 1 550 1 empty empty 1st: 8 12 0 13 #000000 #000000 0;
#X obj 9 180 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 314 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 7 120 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X text 112 129 symbol - set array name., f 46;
#X text 106 149 pointer - pointer to the array if -s flag is used.;
#X text 76 246 -s <symbol \, symbol>: struct name and field name of main structure., f 66;
#X text 107 284 symbol - array name if no flags are given (default: none).;
#X text 124 90 list - sets contents of text from given list.;
#X obj 25 17 text fromlist;
#X text 134 16 - convert from list.;
#X obj 9 215 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 9 241 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X obj 9 273 cnv 1 550 1 empty empty args: 8 12 0 13 #7c7c7c #000000 0;
#X text 127 189 NONE;
#X restore 352 17 pd reference;
#X obj 25 17 text fromlist;
#X text 134 16 - convert from list.;
#X text 45 68 [text fromlist] converts a list such as [text tolist] would output and fills the text with it. Whatever the text had previously contained is discarded.;
#X msg 45 156 1 2 \\\; 3 4 5 \\\; 7 8 9 10 \\\; cis boom bah \\\, walk the dog \\\;;
#X connect 2 0 0 0;
#X connect 4 0 0 0;
#X connect 6 0 0 1;
#X connect 14 0 0 0;
#X restore 354 388 pd fromlist;
#X text 107 388 convert from list;
#X obj 242 411 text search;
#N canvas 401 23 916 714 search 0;
#X floatatom 46 316 5 0 0 0 - - - 0;
#X text 340 259 find another text by name or pointer;
#X text 218 288 arguments: name of the text object or "-s struct-name", f 55;
#X obj 443 132 text define -k text-search;
#A set 1 2 3 dog \; 7 8 9 cat \; 4 5 3 dog \; 7 8 9 alligator \; random line that won't match numbers \;;
#X f 14;
#X obj 46 285 text search text-search;
#X msg 204 259 symbol text-search;
#X msg 22 96 1;
#X msg 33 120 2;
#X msg 46 145 4;
#X msg 64 203 4 5;
#X msg 73 228 4 13;
#X msg 54 173 7;
#X msg 73 365 7 cat;
#X msg 123 365 7 alligator;
#X floatatom 123 428 5 0 0 0 - - - 0;
#X msg 23 365 7 dog;
#X obj 123 400 text search text-search 0 3, f 33;
#X floatatom 675 373 5 0 0 0 - - - 0;
#X obj 675 332 text search text-search 1;
#X msg 686 235 8 9;
#X msg 675 206 8 9 alligator;
#X msg 700 262 8;
#X msg 709 292 symbol line;
#X floatatom 112 685 5 0 0 0 - - - 0;
#X msg 112 536 2;
#X msg 128 573 4;
#X msg 143 613 10;
#X obj 528 641 text search text-search 2 near 0;
#X floatatom 528 679 5 0 0 0 - - - 0;
#X msg 528 488 3 3;
#X msg 543 532 3 2.5 1;
#X msg 556 588 3 3 1;
#X text 440 109 click to open:;
#X obj 6 41 cnv 1 900 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X obj 29 10 text search;
#X text 811 11 <= click;
#N canvas 726 130 570 384 reference 0;
#X obj 9 47 cnv 5 550 5 empty empty INLETS: 8 18 0 13 #202020 #000000 0;
#X obj 9 203 cnv 2 550 2 empty empty OUTLET: 8 12 0 13 #202020 #000000 0;
#X obj 8 363 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 145 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X text 122 152 symbol - set array name., f 46;
#X text 116 172 pointer - pointer to the array if -s flag is used.;
#X text 76 274 -s <symbol \, symbol>: struct name and field name of main structure., f 66;
#X obj 35 14 text search;
#X text 136 85 list - search key, f 40;
#X obj 9 77 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 107 312 1) symbol - array name if no flags are given (default: none)., f 61;
#X text 121 331 2) list -;
#X obj 9 244 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 9 270 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X obj 9 302 cnv 1 550 1 empty empty args: 8 12 0 13 #7c7c7c #000000 0;
#X text 123 14 - search for a message.;
#X text 134 212 float - found message number or -1 if not found.;
#X text 190 323 search element number optionally preceded by ">" \, ">=" \, "<" \, "<=" \, or "near"., f 49;
#X text 24 104 range <float \, float> -;
#X text 185 104 onset and range of searched messages (onset indexed from 0), f 44;
#X restore 717 11 pd reference;
#X text 53 95 matches first message (number 0);
#X text 117 10 - search for a message.;
#X text 13 48 [text search] outputs the number of the message that best matches a search key. By default it seeks a message whose leading elements match the incoming list., f 79;
#X text 61 119 doesn't match first element of any message so -1;
#X text 77 145 matches message number 2;
#X text 86 166 if two messages match only the first is output (but see below for finding best matches)., f 46;
#X text 95 203 matches two elements of message number 2;
#X text 107 227 fails on second element so no match;
#X text 213 306 ... then optional element numbers (starting from 0) optionally preceded by ">". ">=" \, "<" \, "<=" \, or "near".;
#X text 145 529 messages 1 \, 2 \, and 3 match \, but 2 wins because its first element (4) is closest to the search key 2, f 51;
#X text 175 612 nobody's first element is greater than 10;
#X text 597 53 If the search pattern (the incoming list) has more elements than we have specified search elements \, extra search patterns match succeeding elements starting from the last one give as an argument. So for example if there are no arguments we look for matches to any number of elements starting from the beginning of the message in the text., f 42;
#X text 531 407 Here we ask for element 2 to equal 3 and elements starting at 0 to be 'near' the following arguments., f 41;
#X text 562 488 element 2 is 3 and element 0 nearest 3;
#X text 605 516 here messages 0 and 2 tie over 2.4 (1 and 4 are equally far from it) so message 0 whose second element is closer to 1 wins., f 42;
#X text 607 578 Here message 2 wins because its element 0 is nearer to 3 \, notwithstanding that its element 1 is farther from 1, f 40;
#X text 215 359 here we ask to match both element 0 and 3 exactly. In element 3 we're testing symbols for equality., f 50;
#X obj 112 653 text search text-search > 0, f 33;
#X text 159 565 matches 1 & 3 \, both are equally good \, so 1 wins \, unless you narrow the range, f 48;
#X msg 20 587 range 2 3;
#X text 24 536 narrow between 2 and 4, f 7;
#X text 13 457 Match a message for which the search key is greater than the element zero of that message. The message getting closest to the key wins. You can also use the 'range' message to narrow the search \, which takes an offset and number of messages., f 68;
#X connect 4 0 0 0;
#X connect 5 0 4 1;
#X connect 6 0 4 0;
#X connect 7 0 4 0;
#X connect 8 0 4 0;
#X connect 9 0 4 0;
#X connect 10 0 4 0;
#X connect 11 0 4 0;
#X connect 12 0 16 0;
#X connect 13 0 16 0;
#X connect 15 0 16 0;
#X connect 16 0 14 0;
#X connect 18 0 17 0;
#X connect 19 0 18 0;
#X connect 20 0 18 0;
#X connect 21 0 18 0;
#X connect 22 0 18 0;
#X connect 24 0 54 0;
#X connect 25 0 54 0;
#X connect 26 0 54 0;
#X connect 27 0 28 0;
#X connect 29 0 27 0;
#X connect 30 0 27 0;
#X connect 31 0 27 0;
#X connect 54 0 23 0;
#X connect 56 0 54 0;
#X restore 354 411 pd search;
#X text 58 435 sequencer/message-sender;
#X obj 242 435 text sequence;
#N canvas 398 23 746 675 sequence 0;
#X msg 299 466 symbol text-search;
#X text 436 466 specify another text by name or pointer;
#X obj 148 568 print out1;
#X msg 51 172 args 1 2 fuzz;
#X obj 51 148 loadbang;
#X text 153 171 set values for \$1 \, \$2 \, etc;
#X msg 100 250 step;
#X msg 149 366 auto;
#X text 100 568 lists;
#X text 388 532 -g to specify global mode (each line begins with a symbolic destination), f 45;
#X text 366 494 creation arguments:;
#X text 388 515 name of the text object or "-s struct-name", f 45;
#X obj 449 170 text define -k text-seq;
#A set 1 2 3 \; 4 5 symbol 7 \; 8 \$1 \$2 \; 9 \$3 \$1-\$2-\$3 \; walk the dog \, feed the cat \;;
#X msg 180 432 stop;
#X msg 166 401 tempo 1 msec;
#X text 388 627 -t <tempo> <units> initializes tempo as with the "tempo" message above., f 45;
#X listbox 148 534 18 0 0 0 - - - 0;
#X obj 299 568 print done;
#X obj 148 495 text sequence text-seq;
#X text 436 145 click to see the sequence:;
#N canvas 686 419 664 288 tempo 0;
#X text 60 167 These symbols can also be preceded by "per" (as in "permin" \, "permsec" \, etc.) In this case \, 60 permin means 1/60 min (hence \, the same as 'BPM')., f 78;
#X text 58 91 - millisecond (msec for short) \; - seconds (sec) \; - minutes (min) \; - samples (samp) - depends on the sample rate the patch is running, f 67;
#X text 54 26 Wait times are in units of 1 millisecond by default \, but you can change this with the "-t" flag or "tempo" message (as in [timer] \, [delay] and [metro]) \, which take a different tempo number and a time unit symbol. Possible symbols are:, f 77;
#X text 56 219 Changing the tempo while the sequencer is running in auto mode takes effect right away and changes the tempo for the remaining portion of the current wait time., f 75;
#X restore 517 415 pd tempo;
#X text 218 432 stop the sequence (when in auto mode);
#X text 261 393 set tempo unit for delay times. See also at right and possible messages here:, f 40;
#X msg 136 328 10 20 foo;
#X text 211 323 floats \, symbols and lists do the same as 'bang' but temporarily override 'args' with list's elements, f 52;
#N canvas 236 130 1073 481 examples 0;
#X obj 236 240 text sequence text-seq2 -g;
#X obj 78 282 text define -k text-seq2;
#A set test1 1 2 3 \; 1000 test2 6 7 8 \; test1 9 10 \, 21 22 23 \, walk the dog \; 500 1500 test1 \; test2 13 14 \;;
#X f 15;
#X msg 82 195 bang;
#X msg 236 195 line 0;
#X obj 146 354 r test1;
#X obj 283 354 r test2;
#X obj 415 305 print done;
#X msg 120 195 auto;
#X msg 158 195 stop;
#X obj 236 306 print wait;
#X text 235 176 rewind;
#X text 79 246 click to see the sequence:, f 13;
#X msg 197 195 step;
#X msg 686 109 bang;
#X msg 591 109 line 0;
#X obj 860 198 print done;
#X msg 728 109 auto;
#X msg 771 109 stop;
#X obj 753 198 print wait;
#X msg 646 109 step;
#X obj 934 113 text define -k text-seq3;
#A set 1 2 3 \; fred 1000 \; 4 5 6 \; blanch 7 8 \, 9 10 \; fred 500 \, 1500 \; 9 10 \;;
#X f 15;
#X obj 646 150 text sequence text-seq3 -w fred;
#X obj 646 198 print out1;
#X msg 664 352 bang;
#X msg 568 352 line 0;
#X msg 709 352 auto;
#X msg 752 353 stop;
#X msg 623 352 step;
#X text 934 92 sequence:;
#X text 933 351 sequence:;
#X obj 933 375 text define -k text-seq4;
#A set 0 1 2 3 \; 1000 4 5 6 \; 500 7 8 9 \; 500 10 \, 1000 11 \;;
#X f 15;
#X obj 623 392 text sequence text-seq4 -w 1;
#X obj 816 444 print done;
#X obj 719 444 print wait;
#X obj 623 444 print out1;
#X msg 291 195 tempo 2 permsec;
#X text 312 176 set 2x tempo;
#X obj 415 271 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X listbox 236 271 10 0 0 0 - - - 0;
#X listbox 646 174 14 0 0 0 - - - 0;
#X floatatom 719 419 5 0 0 0 - - - 0;
#X listbox 623 418 12 0 0 0 - - - 0;
#X listbox 159 407 13 0 0 0 - - - 0;
#X obj 159 383 list;
#X listbox 283 404 8 0 0 0 - - - 0;
#X listbox 753 174 11 0 0 0 - - - 0;
#X obj 816 421 bng 17 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X obj 860 174 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X text 34 19 The -g flag (which must be given after specifying the text with a name or a "-s" argument) specifies that the text contains messages to send to global symbols. Messages beginning with symbols are sent to the corresponding receive (or other named object). Leading numbers are then interpreted as waits. If you use "bang" to sequence the text the waits will be output as lists for you to interpret as you wish. If you send an "auto" message \, waits that consist of a single number are interpreted as delay times in milliseconds (but waits with 2 or more arguments are treated as in "bang"). Here the two waits are "1000" and "500 1500"., f 67;
#X obj 146 434 print test 1 -->;
#X obj 283 434 print test 2 -->;
#X text 528 18 Alternatively \, with the "-w" flag (with or without "-g" but most usefully without) \, you can specify a symbol that tags an entire message as a wait. Here the three outlets are for lists (regular messages) \, waits \, and a bang at end of sequence - waits are only output in 'auto' mode if more than one element or a symbol is given., f 75;
#X text 549 233 If you want to use leading numbers in messages as waits without having to specify "-g" \, specify "-w 3" for example and up to 3 leading numbers (fewer if there's a symbol among the first 3 items) will be taken as a wait. Waits specified this way can only have numeric elements (while waits specified with a symbol tag as above could have symbols too if desired.) Here we use "-w 1" so the "auto" feature can simply sequence a list of numbers:, f 70;
#X connect 0 0 38 0;
#X connect 0 1 37 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 43 0;
#X connect 4 0 49 0;
#X connect 5 0 44 0;
#X connect 7 0 0 0;
#X connect 8 0 0 0;
#X connect 12 0 0 0;
#X connect 13 0 21 0;
#X connect 14 0 21 0;
#X connect 16 0 21 0;
#X connect 17 0 21 0;
#X connect 19 0 21 0;
#X connect 21 0 39 0;
#X connect 21 1 45 0;
#X connect 21 2 47 0;
#X connect 23 0 31 0;
#X connect 24 0 31 0;
#X connect 25 0 31 0;
#X connect 26 0 31 0;
#X connect 27 0 31 0;
#X connect 31 0 41 0;
#X connect 31 1 40 0;
#X connect 31 2 46 0;
#X connect 35 0 0 0;
#X connect 37 0 6 0;
#X connect 38 0 9 0;
#X connect 39 0 22 0;
#X connect 40 0 33 0;
#X connect 41 0 34 0;
#X connect 43 0 42 0;
#X connect 44 0 50 0;
#X connect 45 0 18 0;
#X connect 46 0 32 0;
#X connect 47 0 15 0;
#X restore 73 622 pd examples;
#X text 161 620 <== see more examples here;
#X obj 15 49 cnv 1 720 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 647 14 <= click;
#N canvas 636 33 575 610 reference 0;
#X obj 9 41 cnv 5 550 5 empty empty INLETS: 8 18 0 13 #202020 #000000 0;
#X obj 9 286 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 581 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 240 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X text 75 243 symbol - set array name., f 49;
#X text 68 262 pointer - pointer to the array if -s flag is used.;
#X text 75 441 -s <symbol \, symbol>: struct name and field name of main structure., f 66;
#X obj 23 13 text sequence;
#X text 125 12 - sequencer/message-sender.;
#X text 41 148 args <list> - set values for \$1 \, \$2 \, etc in the text., f 71;
#X obj 9 70 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 90 112 step - output next line., f 64;
#X text 87 184 list -;
#X text 139 184 same as bang but temporarily override 'args' with list's elements (a bang is a 0 element list \, btw)., f 57;
#X text 90 74 auto - automatically sequence interpreting waits as delay times., f 64;
#X text 90 92 stop - stops the sequence when in auto mode., f 64;
#X text 20 216 tempo <f \, sym> - set tempo value (float) and time unit symbol., f 74;
#X text 75 459 -g: sets to global mode (with symbolic destinations)., f 66;
#X text 75 477 -w <symbol>: sets symbols that define waiting points., f 66;
#X text 75 495 -w <float>: sets number of leading floats used as waiting points., f 66;
#X text 75 513 -t <float \, symbol>: sets tempo value and time unit., f 66;
#X obj 9 310 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 79 316 list - messages from the sequence or waits if -g flag is given., f 64;
#X obj 9 343 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X text 79 348 list - waits if -w flag is given (which creates a mid outlet)., f 64;
#X obj 9 371 cnv 1 550 1 empty empty rightmost: 8 12 0 13 #7c7c7c #000000 0;
#X text 113 375 bang - when finishing the sequence.;
#X obj 9 405 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 9 431 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X obj 9 543 cnv 1 550 1 empty empty args: 8 12 0 13 #7c7c7c #000000 0;
#X text 87 551 1) symbol - array name if no flags are given (default: none)., f 61;
#X text 34 130 line <float> - set line number (actually "message number" \, from 0)., f 72;
#X text 90 166 bang - output all messages from current to next waiting point., f 64;
#X restore 553 14 pd reference;
#X obj 42 16 text sequence;
#X text 190 359 automatically sequence \, interpreting waits as delay times (see examples below)., f 42;
#X obj 120 283 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X obj 314 534 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X text 142 15 - sequencer/message-sender;
#X text 26 60 [text sequence] outputs messages from a text buffer \, either to an outlet or as messages to named destinations. The text is interpreted as a sequence of lists \, and possibly some interspersed waiting instructions (called "waits" here). You can ask for one message at a time ("step" message) \, or to proceed without delay to the next wait ("bang") \, or to automatically sequence through a series of waits (with each wait specifying a delay in milliseconds), f 96;
#X text 141 250 output next message;
#X text 143 272 This is a zero length list. It output all messages starting from current one to next waiting point. But note there aren't any waits in this example so all lines are output sequentially \, which is a way to 'dump' all messages from the text., f 80;
#X text 388 563 -w <symbol> specifies that messages beginning with the symbol are waiting points, f 45;
#X text 388 595 -w <number> specifies that every message's leading n atoms are used as a waiting point, f 45;
#X msg 76 210 line 0;
#X text 131 198 set current line number (actually "message" number - counting from 0). The term 'line' is misleading because messages separated by commas also count and are part of the same "line"., f 82;
#X connect 0 0 18 1;
#X connect 3 0 18 0;
#X connect 4 0 3 0;
#X connect 6 0 18 0;
#X connect 7 0 18 0;
#X connect 13 0 18 0;
#X connect 14 0 18 0;
#X connect 16 0 2 0;
#X connect 18 0 16 0;
#X connect 18 1 17 0;
#X connect 18 1 33 0;
#X connect 23 0 18 0;
#X connect 32 0 18 0;
#X connect 40 0 18 0;
#X restore 354 435 pd sequence;
#X text 72 315 delete a line or clear;
#X obj 242 315 text delete;
#N canvas 512 103 745 423 delete 0;
#X text 368 172 find another text by name or pointer;
#X obj 74 205 text delete text-delete;
#X text 250 205 argument: name of the text object or "-s struct-name";
#X msg 232 172 symbol text-delete;
#X obj 95 267 text define -k text-delete;
#A set message 0 \; message 1 \, message 2 \; message 3 \; message 4 \;;
#X msg 74 108 2;
#X msg 89 138 -1;
#X text 122 138 clear whole text;
#X obj 166 377 text fromlist text-delete;
#X text 187 329 click below to get original text back:;
#X text 287 267 <= click here to see text;
#X obj 13 51 cnv 1 720 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 642 17 <= click;
#N canvas 720 147 582 341 reference 0;
#X obj 9 45 cnv 5 550 5 empty empty INLETS: 8 18 0 13 #202020 #000000 0;
#X obj 9 157 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 299 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X text 77 231 -s <symbol \, symbol>: struct name and field name of main structure., f 66;
#X obj 9 76 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 94 114 symbol - set text name., f 48;
#X text 87 133 pointer - pointer to the text if -s flag is used.;
#X text 111 271 1) symbol - array name if no flags are given (default: none)., f 61;
#X obj 34 17 text delete;
#X obj 9 107 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 199 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 9 225 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X obj 9 257 cnv 1 550 1 empty empty args: 8 12 0 13 #7c7c7c #000000 0;
#X text 98 81 float - message number to delete (negative deletes all text)., f 62;
#X text 123 169 NONE.;
#X text 123 17 - delete a message or clear text.;
#X restore 548 18 pd reference;
#X obj 34 17 text delete;
#X text 72 67 [text delete] deletes the nth message.;
#X msg 166 352 list message 0 \\\; message 1 \\\, message 2 \\\; message 3 \\\; message 4 \\\;, f 69;
#X text 109 108 delete message number 2 (counting from 0);
#X text 123 17 - delete a message or clear text;
#X connect 3 0 1 1;
#X connect 5 0 1 0;
#X connect 6 0 1 0;
#X connect 16 0 8 0;
#X restore 354 315 pd delete;
#X text 135 290 insert a line;
#X obj 242 290 text insert;
#N canvas 534 131 743 445 insert 0;
#X text 382 220 find another text by name or pointer;
#X msg 249 220 symbol text-delete;
#X text 170 331 click below to get original text back:;
#X obj 149 379 text fromlist text-insert;
#X obj 452 118 text define -k text-insert;
#A set message 0 \; message 1 \, message 2 \; message 3 \; message 4 \;;
#X text 228 186 insert after end;
#X msg 78 128 list x y z w;
#X msg 94 158 1 2 3;
#X msg 59 101 12 23 34 45 56 56;
#X text 192 101 list to insert into the text;
#X text 261 253 arguments: name of the text object or "-s struct-name";
#X text 262 274 one optional arg to set inlet 1 (line number);
#X obj 77 253 text insert text-insert 3;
#X obj 13 51 cnv 1 720 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 642 17 <= click;
#N canvas 720 147 578 370 reference 0;
#X obj 9 45 cnv 5 550 5 empty empty INLETS: 8 18 0 13 #202020 #000000 0;
#X obj 9 193 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 344 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 144 cnv 1 550 1 empty empty 3rd: 8 12 0 13 #7c7c7c #000000 0;
#X text 77 259 -s <symbol \, symbol>: struct name and field name of main structure., f 66;
#X obj 9 107 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 76 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 101 113 float -;
#X text 94 150 symbol - set text name., f 48;
#X text 87 169 pointer - pointer to the text if -s flag is used.;
#X text 101 296 1) symbol - array name if no flags are given (default: none)., f 61;
#X obj 34 17 text insert;
#X text 123 17 - insert a line.;
#X text 108 81 list - a line to insert.;
#X text 117 202 NONE;
#X obj 9 227 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 9 253 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X obj 9 285 cnv 1 550 1 empty empty args: 8 12 0 13 #7c7c7c #000000 0;
#X text 157 113 message number to insert., f 51;
#X text 108 314 2) float - set message number (default: 0)., f 57;
#X restore 548 18 pd reference;
#X obj 34 17 text insert;
#X text 123 17 - insert a message.;
#X text 58 63 [text insert] inserts a message.;
#X text 195 158 insert before message number 2 (counting from 0);
#X text 448 92 click here to see text:;
#X floatatom 163 223 5 0 0 0 - - - 0;
#X msg 163 158 2;
#X msg 182 187 1e+09;
#X msg 149 354 list message 0 \\\; message 1 \\\, message 2 \\\; message 3 \\\; message 4 \\\;, f 69;
#X connect 1 0 12 2;
#X connect 6 0 12 0;
#X connect 7 0 12 0;
#X connect 8 0 12 0;
#X connect 21 0 12 1;
#X connect 22 0 21 0;
#X connect 23 0 21 0;
#X connect 24 0 3 0;
#X restore 354 290 pd insert;
#N canvas 332 170 766 438 text-and-data-structures 0;
#X floatatom 82 189 5 0 0 0 - - - 0;
#X msg 47 158 0;
#X msg 122 158 2;
#X msg 82 158 1;
#X obj 170 288 print type;
#X obj 481 250 pointer;
#X obj 82 220 text get -s text-struct z, f 13;
#N canvas 570 338 480 302 text-struct 0;
#X obj 76 67 struct text-struct float x float y text z;
#X text 95 196 This just draws a frame around the text;
#X obj 67 133 drawtext z 15 0 900;
#X text 213 128 draws text z at coordinates (15 \, 0) with color 900 (red), f 28;
#X text 77 29 fields 'x/y' for coordinates and 'z' for text;
#X obj 68 224 drawpolygon 0 4 0 -10 0 55 140 55 140 -10 0 -10;
#X restore 463 58 pd text-struct;
#N canvas 1094 180 226 165 text-data 0;
#X scalar text-struct 20 20 \; 10 20 300 \\\; a b c d \\\; 100 200 292 \\\; \;;
#X text 13 86 We have one datum (above) whose "z" field is text., f 25;
#X restore 462 30 pd text-data;
#X msg 481 203 traverse pd-text-data \, next;
#X text 541 112 bug - saving multi-line texts inside structures, f 24;
#X obj 309 286 text set -s text-struct z;
#X floatatom 366 200 5 0 0 0 - - - 0;
#X msg 366 151 0;
#X msg 433 151 2;
#X msg 398 151 1;
#X listbox 82 260 11 0 0 0 - - - 0;
#X floatatom 170 260 5 0 0 0 - - - 0;
#X text 54 131 get text line;
#X text 381 125 set line;
#X listbox 277 200 10 0 0 0 - - - 0;
#X text 287 118 set text;
#X obj 481 175 loadbang;
#X text 102 24 A simple example showing how to access text in data structures via pointers. In this case you need the "-s" flag followed by the struct name and text field., f 46;
#X msg 277 143 list a b c;
#X msg 286 171 10 20 300;
#X text 81 352 To know more about Data Structures \, how to handle pointers and see examples \, please refer to the 4.Data.Structure section of the Pd's tutorials., f 50;
#X obj 454 342 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#N canvas 491 316 412 249 open 0;
#X obj 58 49 inlet;
#X obj 58 105 pdcontrol;
#X msg 58 78 dir;
#X msg 58 132 \; pd open 01.scalars.pd \$1/../4.data.structures;
#X connect 0 0 2 0;
#X connect 1 0 3 0;
#X connect 2 0 1 0;
#X restore 454 382 pd open;
#X text 486 334 open first example of the 4.Data.Structure section., f 25;
#X obj 82 288 print line;
#X text 560 30 <= open to see scalat;
#X connect 0 0 6 0;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 5 0 6 3;
#X connect 5 0 11 3;
#X connect 6 0 16 0;
#X connect 6 1 17 0;
#X connect 9 0 5 0;
#X connect 12 0 11 1;
#X connect 13 0 12 0;
#X connect 14 0 12 0;
#X connect 15 0 12 0;
#X connect 16 0 30 0;
#X connect 17 0 4 0;
#X connect 20 0 11 0;
#X connect 22 0 9 0;
#X connect 24 0 20 0;
#X connect 25 0 20 0;
#X connect 27 0 28 0;
#X restore 261 501 pd text-and-data-structures;
#X obj 5 55 cnv 1 525 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 456 16 <= click;
#N canvas 758 52 579 214 reference 0;
#X obj 7 143 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 8 75 cnv 2 550 2 empty empty ARGUMENT: 8 12 0 13 #202020 #000000 0;
#X text 96 85 symbol -;
#X obj 7 54 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X text 119 162 Open specific references in each subpatch detailing each function on parent patch., f 41;
#X text 160 86 sets the function of [text] \, possible values: define \, get \, set \, insert \, delete \, size \, tolist \, fromlist \, search and sequence. The default value is 'define'., f 54;
#X obj 28 21 text;
#X text 73 21 - manage a list of messages;
#X restore 362 16 pd reference;
#X obj 5 541 cnv 1 525 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 321 551 Updated for Pd version 0.49;
#X text 107 411 search for a line;
#X text 94 208 create \, set \, store \, sort and edit, f 19;
#X text 74 10 - manage a list of messages (defaults to [text define]), f 27;
|