diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2006-06-08 10:45:33 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2006-06-08 10:45:33 +0000 |
commit | 6bcef5ed8a5d6baaf48c165d5873f58b05479eb2 (patch) | |
tree | 1b2a09b0c8500c434aca06871de9aad44c68d877 | |
parent | 1ac2df7d4bd3323fbbe5cfbc49214ceb99d6e140 (diff) |
cleaned up help-patch (split into several sub-patches)
svn path=/trunk/externals/zexy/; revision=5180
-rw-r--r-- | examples/msgfile.pd | 259 |
1 files changed, 155 insertions, 104 deletions
diff --git a/examples/msgfile.pd b/examples/msgfile.pd index 0721612..fb375f6 100644 --- a/examples/msgfile.pd +++ b/examples/msgfile.pd @@ -1,117 +1,168 @@ -#N canvas 127 0 1027 898 10; -#X msg 463 10 rewind; -#X obj 392 853 print done; -#X text 575 665 read a file; -#X text 609 686 write one; -#X text 23 356 see also:; -#X text 512 9 go to beginning; -#X msg 466 223 bang; -#X text 474 724 write a file \, terminating lines only with carriage -return (omitting semicolons.) You can read files this way too \, in -which case carriage returns are mapped to semicolons.; -#X obj 355 871 print list; -#X msg 466 281 clear; -#X text 73 872 this outlet gets the lines in sequence.; -#X msg 470 571 set 2 4 6 8; -#X text 576 570 clear and then add one message; -#X msg 466 388 add cis boom bah; -#X msg 465 407 add2 bang; -#X msg 465 782 print; -#X text 507 784 debugging printout; +#N canvas 94 78 859 363 10; +#X obj 443 239 print done; +#X text 72 260 see also:; +#X msg 443 39 bang; +#X text 334 293 this outlet gets the lines in sequence.; #X obj 73 9 msgfile; #X text 127 9 read and write messages into text files; -#X obj 355 815 msgfile; -#X obj 84 357 textfile; +#X obj 406 201 msgfile; +#X obj 133 261 textfile; #X text 18 57 The msgfile object is derived from the textfile object and expands its features.; #X text 15 97 new features are :; #X text 127 110 insert \, append \, delete \, replace; -#X msg 464 33 end; -#X text 511 33 go the the end; -#X msg 462 84 skip -1; -#X msg 463 181 next; -#X msg 462 139 prev; -#X msg 462 108 where; -#X text 515 107 where are we now ?; -#X msg 463 160 this; -#X text 516 84 go to the <n>th line from here; -#X text 512 58 go to line number <n>; -#X text 515 220 output one line as a list and move to the next; -#X text 520 282 empty the object; -#X msg 467 321 delete 2; -#X text 9 183 changed behaviour :; -#X text 130 183 add2 : read "add too" \; append to an existing line +#X text 492 36 output one line as a list and move to the next; +#X text 90 201 add2 : read "add too" \; append to an existing line ; -#X text 602 433 insert a message before the current line; -#X text 605 455 add to the previous line (CHANGED BEHAVIOUR !!!); -#X text 567 405 add to the last line (CHANGED BEHAVIOUR !!!); -#X text 568 385 add a message at the end of the object; -#X msg 467 489 append after the break of dawn; -#X text 661 486 add a message at the current position; -#X text 660 506 add to the current line (CHANGED BEHAVIOUR !!!); -#X msg 468 537 replace the new day; -#X text 660 537 replace the current line; -#X msg 466 437 insert before sunrise; -#X msg 466 455 insert2 inserted; -#X msg 467 508 append2 appendix; -#X msg 467 250 flush; -#X text 516 249 output all lines; -#X text 467 836 This outlet gets a bang when you hit the end of the +#X text 508 222 This outlet gets a bang when you hit the end of the sequence \; it will also get the current position when using "when" ; -#X msg 467 666 read msgfile.txt; -#X msg 467 708 write /tmp/msgfile2.txt cr; -#X msg 466 761 read msgfile2.txt cr; -#X text 511 139 output the previous line; -#X text 513 179 output the next line; -#X text 511 159 output the current line; -#X msg 462 59 goto 8; -#X msg 467 301 delete; -#X text 521 302 delete the current line; -#X text 524 321 delete the specified line; -#X msg 467 340 delete 4 7; -#X text 535 341 delete the specified region; -#X msg 467 360 delete 7 4; -#X msg 467 687 write /tmp/msgfile.txt; -#X text 538 360 delete all but the specified region; -#X msg 472 600 find test 6; -#X msg 472 619 find test * 7 *; -#X text 576 606 find a matching list ("*" is the only wildcard supported) -; #X text 127 97 end \, goto \, skip; #X text 131 127 flush \, where \, this \, prev \, next; #X text 128 145 find; #X text 73 163 read/write can handle csv files too; -#X text 890 17 part of zexy; -#X connect 0 0 19 0; -#X connect 6 0 19 0; -#X connect 9 0 19 0; -#X connect 11 0 19 0; -#X connect 13 0 19 0; -#X connect 14 0 19 0; -#X connect 15 0 19 0; -#X connect 19 0 8 0; -#X connect 19 1 1 0; -#X connect 24 0 19 0; -#X connect 26 0 19 0; -#X connect 27 0 19 0; -#X connect 28 0 19 0; -#X connect 29 0 19 0; -#X connect 31 0 19 0; -#X connect 36 0 19 0; -#X connect 43 0 19 0; -#X connect 46 0 19 0; -#X connect 48 0 19 0; -#X connect 49 0 19 0; -#X connect 50 0 19 0; -#X connect 51 0 19 0; -#X connect 54 0 19 0; -#X connect 55 0 19 0; -#X connect 56 0 19 0; -#X connect 60 0 19 0; -#X connect 61 0 19 0; -#X connect 64 0 19 0; -#X connect 66 0 19 0; -#X connect 67 0 19 0; -#X connect 69 0 19 0; -#X connect 70 0 19 0; +#X text 618 7 part of zexy; +#N canvas 347 164 646 300 navigation 0; +#X obj 54 272 outlet; +#X msg 91 140 rewind; +#X text 140 139 go to beginning; +#X msg 92 163 end; +#X text 139 163 go the the end; +#X msg 92 214 skip -1; +#X msg 92 238 where; +#X text 145 237 where are we now ?; +#X text 146 214 go to the <n>th line from here; +#X text 142 188 go to line number <n>; +#X msg 92 189 goto 8; +#X text 44 38 navigating through the lines of a [msgfile]; +#X text 42 62 these messages will not output any data; +#X text 41 80 'where' will output the position of the "cursor" at the +2nd outlet of [msgfile]; +#X connect 1 0 0 0; +#X connect 3 0 0 0; +#X connect 5 0 0 0; +#X connect 6 0 0 0; +#X connect 10 0 0 0; +#X restore 443 84 pd navigation; +#N canvas 0 0 458 426 data 0; +#X obj 54 332 outlet; +#X msg 105 143 bang; +#X msg 103 231 next; +#X msg 102 189 prev; +#X msg 103 210 this; +#X text 154 140 output one line as a list and move to the next; +#X text 151 189 output the previous line; +#X text 153 229 output the next line; +#X text 151 209 output the current line; +#X msg 104 264 flush; +#X text 153 263 output all lines; +#X text 39 37 get the contents of the [msgfile] line-by-line; +#X text 37 63 'prev' \, 'this' \, 'next' and 'flush' will not alter +the current "cursor" position.; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 0 0; +#X connect 4 0 0 0; +#X connect 9 0 0 0; +#X restore 443 64 pd data retrieval; +#N canvas 0 0 669 573 editing 0; +#X obj 54 512 outlet; +#X msg 137 101 clear; +#X msg 140 481 set 2 4 6 8; +#X text 246 480 clear and then add one message; +#X msg 136 258 add cis boom bah; +#X msg 136 277 add2 bang; +#X text 190 102 empty the object; +#X msg 137 161 delete 2; +#X text 272 303 insert a message before the current line; +#X text 238 255 add a message at the end of the object; +#X msg 137 359 append after the break of dawn; +#X text 331 356 add a message at the current position; +#X msg 138 437 replace the new day; +#X text 330 437 replace the current line; +#X msg 136 306 insert before sunrise; +#X msg 136 325 insert2 inserted; +#X msg 137 378 append2 appendix; +#X msg 137 141 delete; +#X text 191 142 delete the current line; +#X text 194 161 delete the specified line; +#X msg 137 180 delete 4 7; +#X text 205 181 delete the specified region; +#X msg 137 200 delete 7 4; +#X text 208 200 delete all but the specified region; +#X text 56 39 editing (adding \, modifying \, deleting) the content +if the [msgfile]; +#X text 237 275 add to the last line (INCOMPATIBLE with [textfile]) +; +#X text 275 325 add to the previous line (INCOMPATIBLE with [textfile]) +; +#X text 330 379 add to the current line (INCOMPATIBLE with [textfile]) +; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 4 0 0 0; +#X connect 5 0 0 0; +#X connect 7 0 0 0; +#X connect 10 0 0 0; +#X connect 12 0 0 0; +#X connect 14 0 0 0; +#X connect 15 0 0 0; +#X connect 16 0 0 0; +#X connect 17 0 0 0; +#X connect 20 0 0 0; +#X connect 22 0 0 0; +#X restore 443 104 pd editing; +#N canvas -25 21 576 302 searching 0; +#X obj 54 272 outlet; +#X msg 70 180 find test 6; +#X msg 70 239 find test * 7 *; +#X text 73 61 searching (and finding) lines within the [msgfile]; +#X text 177 241 you can use '*' as a wildchard for a single atom. '*' +is the only wildcard supported; +#X text 174 178 find a matching list \, starting at the current position +; +#X msg 72 208 find the new day; +#X text 76 130 if the search fails \, a 'bang' is emitted at the 2nd +outlet; +#X text 77 99 if the searched list is found \, then the linenumber +and the list is output (via the 2nd and 1st outlet).; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 6 0 0 0; +#X restore 443 124 pd searching; +#N canvas 0 0 626 356 file-i/o 0; +#X obj 54 272 outlet; +#X text 195 75 read a file; +#X text 229 96 write one; +#X text 254 164 write a file \, terminating lines only with carriage +return (omitting semicolons.) You can read files this way too \, in +which case carriage returns are mapped to semicolons.; +#X msg 87 76 read msgfile.txt; +#X msg 87 168 write /tmp/msgfile2.txt cr; +#X msg 87 191 read msgfile2.txt cr; +#X msg 87 97 write /tmp/msgfile.txt; +#X text 51 26 reading from and writing the contents of [msgfile] to +files; +#X connect 4 0 0 0; +#X connect 5 0 0 0; +#X connect 6 0 0 0; +#X connect 7 0 0 0; +#X restore 443 144 pd file-i/o; +#N canvas 0 0 450 199 misc 0; +#X obj 84 142 outlet; +#X msg 84 112 print; +#X text 40 72 miscellaneous functionality of [msgfile]; +#X text 126 114 debugging printout of the contents to the console; +#X connect 1 0 0 0; +#X restore 443 164 pd misc; +#X obj 406 267 print data; +#X text 9 183 incompatible with [textfile] :; +#X connect 2 0 6 0; +#X connect 6 0 25 0; +#X connect 6 1 0 0; +#X connect 19 0 6 0; +#X connect 20 0 6 0; +#X connect 21 0 6 0; +#X connect 22 0 6 0; +#X connect 23 0 6 0; +#X connect 24 0 6 0; |