Update of /cvsroot/pure-data/doc/tutorials/intro In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23931
Modified Files: 15.ordering_messages.pd Added Files: 14.counters.pd 14.event_driven_processing.pd 23.implied_selectors.pd 24.inlets_and_outlets.pd Removed Files: 11.event_driven_processing.pd 12.counters.pd 18.inlets_and_outlets.pd 27.creation_arguments.pd Log Message: this is the final reordering from my punchlist from the Laboral workshops, I am sure more moves will be needed...
--- NEW FILE: 14.counters.pd --- #N canvas 10 40 620 460 12; #X obj 10 10 cnv 15 400 40 empty empty counters 20 12 0 24 -228992 -66577 0; #X obj 156 362 cnv 15 100 60 empty empty empty 20 12 0 14 -261039 -66577 0; #X obj 174 382 f; #X obj 209 382 + 1; #X obj 157 219 float; #X floatatom 120 246 5 0 0 0 - - -; #X msg 121 137 1; #X obj 120 219 +; #X msg 157 189 0; #X msg 133 160 -1; #X text 167 138 increment; #X text 172 161 decrement; #X text 195 187 reset; #X floatatom 346 244 5 0 0 0 - - -; #X msg 378 180 0; #X text 395 137 increment; #X obj 346 216 float; #X obj 404 216 + 1; #X msg 347 138 bang; #X text 278 377 DANGER! infinite loop!; #X text 20 78 Counters are used a lot when programming Pd. Here are two examples of simple counters that you will see frequently.; #X text 416 180 reset; #X text 20 277 Pd is designed to be as flexible and open as possible. This means that it will let you crash your computer. For example , never start a counter like this , it could crash your computer!; #X connect 2 0 3 0; #X connect 3 0 2 0; #X connect 4 0 7 1; #X connect 6 0 7 0; #X connect 7 0 4 0; #X connect 7 0 5 0; #X connect 8 0 4 0; #X connect 9 0 7 0; #X connect 14 0 16 1; #X connect 16 0 13 0; #X connect 16 0 17 0; #X connect 17 0 16 1; #X connect 18 0 16 0;
--- NEW FILE: 23.implied_selectors.pd --- #N canvas 10 40 624 464 12; #X obj 8 -33 cnv 15 400 40 empty empty implied_selectors 20 12 0 24 -228992 -66577 0; #X msg 151 137 1; #X msg 188 137 534 2334; #X msg 261 137 5 cats; #X text 19 83 In the case of messages whose first element is a numeric atom , the selector is implied (either a "float" or a "list":;
--- 12.counters.pd DELETED ---
--- 27.creation_arguments.pd DELETED ---
--- NEW FILE: 24.inlets_and_outlets.pd --- #N canvas 10 40 620 460 12; #X obj 10 10 cnv 15 400 40 empty empty inlets_and_outlets 20 12 0 24 -228992 -66577 0; #N canvas 10 40 620 460 look 0; #X obj 24 34 inlet; #X obj 238 47 inlet; #X obj 469 41 inlet; #X obj 251 304 outlet; #X msg 469 175 I am the third inlet; #X msg 242 145 I am the second inlet; #X msg 24 94 I am the first inlet; #X connect 0 0 6 0; #X connect 1 0 5 0; #X connect 2 0 4 0; #X connect 4 0 3 0; #X connect 5 0 3 0; #X connect 6 0 3 0; #X restore 32 162 pd look inside me; #X obj 31 202 pddp/print_long; #X obj 32 129 bng 20 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1; #X obj 114 129 bng 20 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1; #X obj 197 129 bng 20 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1; #N canvas 10 40 620 460 look 0; #X obj 20 34 inlet; #X obj 334 33 inlet; #X obj 528 35 inlet; #X obj 20 120 trigger bang anything; #X obj 224 404 outlet; #X obj 224 266 mapping/tolist; #X connect 0 0 3 0; #X connect 1 0 5 0; #X connect 2 0 5 0; #X connect 3 0 5 1; #X connect 3 1 5 0; #X connect 5 0 4 0; #X restore 199 376 pd look inside me; #X obj 198 416 pddp/print_long; #X msg 200 327 smokin!; #X msg 281 327 are; #X msg 363 327 you; #X text 17 259 The first inlet should be the hot inlet , even in your own patches. There are times when you need to make other inlets hot , but in general , its a good rule to stick with.; #X obj 332 126 cnv 15 220 120 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 347 132 inlet; #X obj 348 218 outlet; #X text 402 132 take in data; #X text 361 173 do some stuff here; #X text 418 217 output data; #X text 14 72 When making your own objects and subpatches , you can create inlets and outlets using [inlet] and [outlet].; #X connect 1 0 2 0; #X connect 3 0 1 0; #X connect 4 0 1 1; #X connect 5 0 1 2; #X connect 6 0 7 0; #X connect 8 0 6 0; #X connect 9 0 6 1; #X connect 10 0 6 2; #X connect 13 0 14 0;
--- 18.inlets_and_outlets.pd DELETED ---
--- NEW FILE: 14.event_driven_processing.pd --- #N canvas 10 40 620 460 12; #X obj 10 10 cnv 15 400 40 empty empty event_driven_processing 20 12 0 24 -228992 -66577 0; #X text 18 65 Message processing is driven by events , nothing happens if there no events. There is nothing happening in the patches below until you click on the messages (the bangs at the bottom illustrate that):; #X obj 113 324 tgl 20 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1 ; #X obj 113 372 float; #X obj 170 372 + 1; #X floatatom 113 397 5 0 0 0 - - -; #X obj 113 418 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 113 348 metro 1000; #X obj 384 316 bng 20 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1; #X obj 385 353 float; #X obj 442 353 + 1; #X floatatom 385 378 5 0 0 0 - - -; #X obj 385 399 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 54 145 cnv 15 80 30 empty empty empty 20 12 0 14 -225271 -66577 0; #X obj 236 140 cnv 15 80 30 empty empty empty 20 12 0 14 -225271 -66577 0; #X obj 404 139 cnv 15 80 30 empty empty empty 20 12 0 14 -225271 -66577 0; #X obj 72 181 + 1; #X floatatom 72 207 5 0 0 0 - - -; #X msg 72 149 1; #X msg 237 145 convert; #X obj 237 178 symbol; #X symbolatom 237 206 10 0 0 0 - - -; #X obj 72 234 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 237 233 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 421 176 float; #X obj 478 176 + 1; #X floatatom 421 204 5 0 0 0 - - -; #X obj 421 229 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 277 364 delay 1000; #X msg 421 144 bang; #X text 18 265 Pd is always ready to process messages , you don't need to tell it to run. You can keep things moving by sending a stream of events:; #X connect 2 0 7 0; #X connect 3 0 4 0; #X connect 3 0 5 0; #X connect 4 0 3 1; #X connect 5 0 6 0; #X connect 7 0 3 0; #X connect 8 0 9 0; #X connect 9 0 10 0; #X connect 9 0 11 0; #X connect 10 0 9 1; #X connect 11 0 12 0; #X connect 12 0 28 0; #X connect 16 0 17 0; #X connect 17 0 22 0; #X connect 18 0 16 0; #X connect 19 0 20 0; #X connect 20 0 21 0; #X connect 21 0 23 0; #X connect 24 0 25 0; #X connect 24 0 26 0; #X connect 25 0 24 1; #X connect 26 0 27 0; #X connect 28 0 9 0; #X connect 29 0 24 0;
--- 11.event_driven_processing.pd DELETED ---
Index: 15.ordering_messages.pd =================================================================== RCS file: /cvsroot/pure-data/doc/tutorials/intro/15.ordering_messages.pd,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 15.ordering_messages.pd 17 Aug 2007 00:14:26 -0000 1.2 --- 15.ordering_messages.pd 17 Aug 2007 16:21:17 -0000 1.3 *************** *** 1,3 **** ! #N canvas 10 40 620 460 12; #X obj 10 10 cnv 15 400 40 empty empty ordering_messages 20 12 0 24 -228992 -66577 0; --- 1,3 ---- ! #N canvas 10 40 624 464 12; #X obj 10 10 cnv 15 400 40 empty empty ordering_messages 20 12 0 24 -228992 -66577 0; *************** *** 8,14 **** of messages are sent. If you need to make sure that one thing runs before another , use [trigger]:; ! #X obj 3 174 cnv 15 80 25 empty empty empty 20 12 0 14 -225271 -66577 0; ! #X obj 142 149 cnv 15 80 25 empty empty empty 20 12 0 14 -225271 -66577 0; #X msg 395 249 now; --- 8,14 ---- of messages are sent. If you need to make sure that one thing runs before another , use [trigger]:; ! #X obj 61 149 cnv 15 50 25 empty empty empty 20 12 0 14 -225271 -66577 0; ! #X obj 242 149 cnv 15 50 25 empty empty empty 20 12 0 14 -225271 -66577 0; #X msg 395 249 now; *************** *** 18,26 **** #X msg 80 250 !; #X obj 157 292 symbol; ! #X msg 159 151 bang; ! #X msg 19 177 bang; #X msg 157 316 add2 $1; #X msg 478 248 set; ! #X obj 160 178 trigger bang bang bang bang bang bang; #X msg 296 391; #X connect 6 0 11 0; --- 18,26 ---- #X msg 80 250 !; #X obj 157 292 symbol; ! #X msg 249 151 bang; ! #X msg 69 151 bang; #X msg 157 316 add2 $1; #X msg 478 248 set; ! #X obj 250 178 trigger bang bang bang bang bang bang; #X msg 296 391; #X connect 6 0 11 0;