Update of /cvsroot/pure-data/doc/tutorials/intro In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22160
Modified Files: 06.connections.pd 07.messages.pd 14.right_to_left_order.pd 17.depth_first.pd 20.creation_arguments.pd determinism.pd Added Files: 10.metro.pd Log Message: added a bunch more content, next it's time for more reordering...
Index: 20.creation_arguments.pd =================================================================== RCS file: /cvsroot/pure-data/doc/tutorials/intro/20.creation_arguments.pd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 20.creation_arguments.pd 17 Aug 2007 00:14:26 -0000 1.1 --- 20.creation_arguments.pd 17 Aug 2007 11:49:58 -0000 1.2 *************** *** 1,34 **** ! #N canvas 10 40 620 460 10; ! #X obj 170 105 float; ! #X text 23 62 Many objects can accept "arguments" to define their behavior. Here is a plain [float] object:; ! #X text 26 135 Here is a [float] object with an argument of "5.5": ! ; ! #X obj 168 166 float 5.5; ! #X obj 178 266 float 5.5; ! #X obj 178 248 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; ! #X floatatom 178 287 5 0 0 0 - - -; ! #X text 25 197 Here , the argument of "5.5" makes this [float] store ! the value 5.5 by default. Clicking the bang makes [float] output the ! value that it is currently storing:; ! #X obj 164 389 select 5; ! #X floatatom 216 410 5 0 0 1 everything_else - -; ! #X obj 165 410 bng 15 250 50 0 empty empty matched -52 9 0 12 -262144 ! -1 -1; ! #X msg 163 366 5; ! #X msg 132 366 3; ! #X msg 195 366 7; ! #X text 24 313 Some objects need to have some arguments in order to ! do anything useful. For example , you can tell [select] which number ! to look for with an argument:; #X obj 10 10 cnv 15 400 40 empty empty creation_arguments 20 12 0 24 -228992 -66577 0; ! #X obj 68 454 pddp/pddplink crca; ! #X connect 4 0 6 0; ! #X connect 5 0 4 0; ! #X connect 8 0 10 0; ! #X connect 8 1 9 0; ! #X connect 11 0 8 0; ! #X connect 12 0 8 0; ! #X connect 13 0 8 0; --- 1,35 ---- ! #N canvas 10 40 628 468 10; ! #X obj 438 85 float; ! #X text 20 72 Many objects can accept "arguments" to define their behavior. Here is a plain [float] object:; ! #X obj 438 143 float 5.5; ! #X obj 438 215 float 5.5; ! #X obj 438 197 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; ! #X floatatom 438 236 5 0 0 0 - - -; #X obj 10 10 cnv 15 400 40 empty empty creation_arguments 20 12 0 24 -228992 -66577 0; ! #X text 229 402 For more info:; ! #X obj 277 422 pddp/pddplink http://crca.ucsd.edu/~msp/Pd_documentation/x2.htm#s1.2 ! ; ! #X text 20 135 Here is a [float] object with a creation argument of ! "5.5":; ! #X text 20 187 Here , the creation argument of "5.5" makes this [float] ! store the value 5.5 by default. Clicking the bang makes [float] output ! the value that it is currently storing:; ! #X obj 438 313 float 5.5; ! #X floatatom 438 334 7 0 0 0 - - -; ! #X obj 438 295 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 ! -1; ! #X msg 474 288 -123; ! #X msg 512 288 0.0044; ! #X text 20 286 On most objects , the creation arguments can be replaced ! by data coming in from the inlets. With the [float] object , the right ! inlet , a cold inlet , sets the value that the [float] object stores: ! ; ! #X connect 3 0 5 0; ! #X connect 4 0 3 0; ! #X connect 11 0 12 0; ! #X connect 13 0 11 0; ! #X connect 14 0 11 1; ! #X connect 15 0 11 1;
Index: 17.depth_first.pd =================================================================== RCS file: /cvsroot/pure-data/doc/tutorials/intro/17.depth_first.pd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 17.depth_first.pd 17 Aug 2007 00:14:26 -0000 1.1 --- 17.depth_first.pd 17 Aug 2007 11:49:58 -0000 1.2 *************** *** 18,24 **** [4( message actually runs last , since everything below it executed before it.; ! #X obj 33 430 pddp/pddplink http://crca.ucsd.edu/~msp/Pd_documentation/x2.htm#s3.2 ; #X msg 214 377; #X connect 1 0 6 0; #X connect 1 1 7 0; --- 18,25 ---- [4( message actually runs last , since everything below it executed before it.; ! #X obj 223 430 pddp/pddplink http://crca.ucsd.edu/~msp/Pd_documentation/x2.htm#s3.2 ; #X msg 214 377; + #X text 205 413 For more info:; #X connect 1 0 6 0; #X connect 1 1 7 0;
Index: 14.right_to_left_order.pd =================================================================== RCS file: /cvsroot/pure-data/doc/tutorials/intro/14.right_to_left_order.pd,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 14.right_to_left_order.pd 17 Aug 2007 00:14:26 -0000 1.2 --- 14.right_to_left_order.pd 17 Aug 2007 11:49:58 -0000 1.3 *************** *** 1,3 **** ! #N canvas 10 40 620 460 12; #X obj 165 185 bng 25 250 50 0 empty empty empty -2 -8 1 10 -24198 -1 -1; --- 1,3 ---- ! #N canvas 10 40 624 464 12; #X obj 165 185 bng 25 250 50 0 empty empty empty -2 -8 1 10 -24198 -1 -1; *************** *** 12,16 **** #X text 10 65 In Pd , you read a patch from right to left , from top to bottom. Objects also output from right to left; ! #X obj 32 412 pddp/pddplink http://crca.ucsd.edu/~msp/Pd_documentation/x2.htm#s3.3 ; #X text 97 369 then check the Pd window to see the order; --- 12,16 ---- #X text 10 65 In Pd , you read a patch from right to left , from top to bottom. Objects also output from right to left; ! #X obj 222 422 pddp/pddplink http://crca.ucsd.edu/~msp/Pd_documentation/x2.htm#s3.3 ; #X text 97 369 then check the Pd window to see the order; *************** *** 18,21 **** --- 18,22 ---- If you need things to run in a certain sequence , then use a [trigger]. ; + #X text 206 403 For more info:; #X connect 0 0 1 0; #X connect 1 0 4 0;
Index: determinism.pd =================================================================== RCS file: /cvsroot/pure-data/doc/tutorials/intro/determinism.pd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** determinism.pd 13 Apr 2006 05:04:52 -0000 1.1 --- determinism.pd 17 Aug 2007 11:49:58 -0000 1.2 *************** *** 1,5 **** ! #N canvas 10 40 628 453 12; #X obj 10 10 cnv 15 400 40 empty empty determinism 20 12 0 24 -228992 -66577 0; ! #X obj 31 229 pddp/pddplink http://crca.ucsd.edu/~msp/Pd_documentation/x2.htm#s5.3 ; --- 1,16 ---- ! #N canvas 10 40 636 461 12; #X obj 10 10 cnv 15 400 40 empty empty determinism 20 12 0 24 -228992 -66577 0; ! #X obj 231 419 pddp/pddplink http://crca.ucsd.edu/~msp/Pd_documentation/x2.htm#s5.3 ; + #X text 195 395 For more info:; + #X obj 14 133 pddp/pddplink http://en.wikipedia.org/wiki/Deterministic_algorithm + ; + #X text 9 73 Pd is designed to be "deterministic". This is a computer + science term meaning to behave predictibly , i.e. given a certain + input , it will always produce the same output.; + #X text 9 163 For Pd , this means that it will always run the program + in the exact same order everytime. Even if the computer is not fast + enough to complete all of the operations in realtime , Pd will then + cause an interruption while it ties to finish everything before moving + to the next step.;
Index: 06.connections.pd =================================================================== RCS file: /cvsroot/pure-data/doc/tutorials/intro/06.connections.pd,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 06.connections.pd 17 Aug 2007 00:14:26 -0000 1.2 --- 06.connections.pd 17 Aug 2007 11:49:58 -0000 1.3 *************** *** 1,8 **** ! #N canvas 10 40 620 460 12; #X text 12 132 Pd patches are always running and changes take effect immediately.; #X floatatom 25 277 5 0 0 0 - - -; #X floatatom 25 341 5 0 0 0 - - -; ! #X obj 24 179 tgl 30 0 empty empty start 2 15 1 12 -24198 -1 -1 1 1 ; #X obj 24 221 metro 100; --- 1,8 ---- ! #N canvas 10 40 624 464 12; #X text 12 132 Pd patches are always running and changes take effect immediately.; #X floatatom 25 277 5 0 0 0 - - -; #X floatatom 25 341 5 0 0 0 - - -; ! #X obj 24 179 tgl 30 0 empty empty start 2 15 1 12 -24198 -1 -1 0 1 ; #X obj 24 221 metro 100; *************** *** 14,25 **** #X obj 8 10 cnv 15 400 40 empty empty connections 20 12 0 24 -228992 -66577 0; ! #X obj 39 418 pddp/pddplink http://crca.ucsd.edu/~msp/Pd_documentation/x2.htm#s2.6 ; - #X text 34 372 Disconnect the cable by clicking on it to highlight - it , then press "backspace" on a PC , or "delete" on a Mac.; #X text 11 53 One path for objects to communicate is thru connections , called cords or cables. Connections are always made from the inlet to the outlet since that is the direction data flows in Pd.; #X text 195 238 next , make sure you are in edit mode!; #X connect 3 0 4 0; #X connect 4 0 5 0; --- 14,26 ---- #X obj 8 10 cnv 15 400 40 empty empty connections 20 12 0 24 -228992 -66577 0; ! #X obj 219 428 pddp/pddplink http://crca.ucsd.edu/~msp/Pd_documentation/x2.htm#s2.6 ; #X text 11 53 One path for objects to communicate is thru connections , called cords or cables. Connections are always made from the inlet to the outlet since that is the direction data flows in Pd.; #X text 195 238 next , make sure you are in edit mode!; + #X text 34 365 Disconnect the cable by clicking on it to highlight + it , then press "backspace" ("delete" on a Mac).; + #X text 192 412 For more info:; #X connect 3 0 4 0; #X connect 4 0 5 0;
--- NEW FILE: 10.metro.pd --- #N canvas 10 40 624 464 12; #X obj 10 10 cnv 15 400 40 empty empty metro 20 12 0 24 -228992 -66577 0; #X obj 30 321 metro; #X text 12 72 The timing of events is an essential function of Pd. For example: in a piece of music , each note is played at a specific time of the whole piece.; #X text 12 132 The [metro] object provides a method for making things happen at a regular time interval. "metro" comes from metronome. A metronome makes repeating clicks and the time between each click can be set.; #X msg 16 263 bang; #X msg 55 263 stop; #X obj 63 299 nbx 3 18 100 999 0 1 empty empty empty 0 -6 0 16 -262144 -1 -1 500 256; #X obj 30 359 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X text 120 297 <-- change the time between bangs here; #X msg 483 96 bang; #X obj 483 147 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 326 422 pddp/pddplink http://en.wikipedia.org/wiki/Metronome ; #X text 304 397 For more info:; #X msg 458 271 bang; #X msg 497 271 stop; #X obj 472 377 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 472 349 metro 500; #X obj 483 122 metro 500; #X text 12 206 The same is true of [metro] , using a number to represent the time in milliseconds (ms):; #X msg 500 300 1; #X msg 533 300 0; #X obj 445 323 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X text 413 243 Ways to start/stop [metro]:; #X connect 1 0 7 0; #X connect 4 0 1 0; #X connect 5 0 1 0; #X connect 6 0 1 1; #X connect 9 0 17 0; #X connect 13 0 16 0; #X connect 14 0 16 0; #X connect 16 0 15 0; #X connect 17 0 10 0; #X connect 19 0 16 0; #X connect 20 0 16 0; #X connect 21 0 16 0;
Index: 07.messages.pd =================================================================== RCS file: /cvsroot/pure-data/doc/tutorials/intro/07.messages.pd,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 07.messages.pd 17 Aug 2007 00:14:26 -0000 1.2 --- 07.messages.pd 17 Aug 2007 11:49:58 -0000 1.3 *************** *** 1,41 **** ! #N canvas 10 40 620 460 12; #X obj 10 10 cnv 15 400 40 empty empty messages 20 12 0 24 -228992 -66577 0; ! #X msg 354 162 say hello; ! #N canvas 10 40 620 460 myObject 0; ! #X obj 70 24 inlet; ! #X obj 68 243 outlet; ! #X obj 76 86 route say; ! #X obj 167 125 bang; ! #X obj 57 130 symbol; ! #X msg 167 152 symbol ?#$%!@$^!; ! #X connect 0 0 2 0; ! #X connect 2 0 4 0; ! #X connect 2 1 3 0; ! #X connect 3 0 5 0; ! #X connect 4 0 1 0; ! #X connect 5 0 1 0; ! #X restore 354 250 pd myObject; ! #X symbolatom 355 306 10 0 0 0 - - -; ! #X obj 132 249 + 1; ! #X msg 131 161 1; ! #X floatatom 131 306 5 0 0 0 - - -; #X text 183 161 <-- messages -->; #X text 187 250 <-- objects -->; ! #X msg 370 197 do as I say!; ! #X obj 51 414 pddp/pddplink http://crca.ucsd.edu/~msp/Pd_documentation/x2.htm#s3 ; #X text 20 64 Objects respond to messages received on their inlets , and output messages on their outlets. These messages can be anything from data to commands.; ! #X text 124 128 data; #X text 359 127 commands; #X text 19 341 All communication within Pd is in the form of messages , including when the user is controlling the program.; ! #X msg 143 189 2; ! #X connect 1 0 2 0; ! #X connect 2 0 3 0; ! #X connect 4 0 6 0; ! #X connect 5 0 4 0; ! #X connect 9 0 2 0; ! #X connect 15 0 4 0; --- 1,44 ---- ! #N canvas 10 40 632 472 12; #X obj 10 10 cnv 15 400 40 empty empty messages 20 12 0 24 -228992 -66577 0; ! #X obj 112 249 + 1; ! #X msg 111 161 1; ! #X floatatom 111 306 5 0 0 0 - - -; #X text 183 161 <-- messages -->; #X text 187 250 <-- objects -->; ! #X obj 251 434 pddp/pddplink http://crca.ucsd.edu/~msp/Pd_documentation/x2.htm#s3 ; #X text 20 64 Objects respond to messages received on their inlets , and output messages on their outlets. These messages can be anything from data to commands.; ! #X text 104 128 data; #X text 359 127 commands; #X text 19 341 All communication within Pd is in the form of messages , including when the user is controlling the program.; ! #X msg 123 189 2; ! #X text 219 415 For more info:; ! #X obj 424 250 readsf~; ! #X obj 424 282 dac~; ! #X msg 437 189 1; ! #X msg 424 161 open ../../sound/voice.wav; ! #X text 187 303 <-- number box; ! #X obj 327 250 metro 500; ! #X obj 327 282 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 ! -1 -1; ! #X msg 327 161 bang; ! #X msg 340 189 stop; ! #X obj 8 249 print; ! #X msg 9 161 word; ! #X msg 23 189 another; ! #X connect 1 0 3 0; ! #X connect 2 0 1 0; ! #X connect 11 0 1 0; ! #X connect 13 0 14 0; ! #X connect 13 0 14 1; ! #X connect 15 0 13 0; ! #X connect 16 0 13 0; ! #X connect 18 0 19 0; ! #X connect 20 0 18 0; ! #X connect 21 0 18 0; ! #X connect 23 0 22 0; ! #X connect 24 0 22 0;