From 7d6affca746f49f5ffb2818b8a9ccf9d91388e8f Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes Date: Wed, 25 Aug 2010 00:31:27 +0000 Subject: revised help docs that conform to the PDDP template svn path=/trunk/; revision=13942 --- doc/pddp/trigger-help.pd | 593 ++++++++++++++++++++++++++--------------------- 1 file changed, 334 insertions(+), 259 deletions(-) (limited to 'doc/pddp/trigger-help.pd') diff --git a/doc/pddp/trigger-help.pd b/doc/pddp/trigger-help.pd index b3c3c189..abff60ed 100644 --- a/doc/pddp/trigger-help.pd +++ b/doc/pddp/trigger-help.pd @@ -1,266 +1,155 @@ -#N canvas 132 92 900 611 10; -#X obj 8 8 trigger; -#X text 19 222 As I see it \, the [trigger] object serves two great -purposes which aren't really related - but they might be on some level -that I don't fully understand yet.; -#X text 17 270 1 Sequence a series of bangs - or triggers for symbols -and/or other messages. In the example below \, you should see that -it is important that it is important that [metro] gets a tempo setting -before it is started - but let's assume for a moment that you wanted -to start the [metro] with only a single click.; -#X obj 21 473 metro; -#X msg 46 454 1000; -#X obj 21 493 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 21 396 tgl 15 0 empty empty On/Off 0 -6 0 7 -262144 -1 -1 0 -1; -#X text 19 96 The [trigger] object can be abbreviated as "t" and the -creation arguments can be abbreviated as follows:; -#X obj 109 142 trigger float bang symbol list pointer anything; -#X text 210 161 is the same as; -#X obj 213 181 t f b s l p a; -#X obj 21 414 t f b; -#X text 22 518 This example is simple \, and may not be very practicle -in most situations \, but it clearly shows how [trigger] can be used -to create a simple sequence of events. It is important to note however -that the messages sent from [trigger]'s outlets occur in ZERO time -with no delay between the events...more at the top right of the page... -; -#X obj 459 86 t b b; -#X msg 459 67 bang; -#X obj 459 116 timer; -#X floatatom 459 136 5 0 0 0 - - -; -#X obj 431 26 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 431 592 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X text 493 67 Click here.; -#X text 499 133 Watch here.; -#X text 451 155 Now \, to prove that I'm not crazy...click here >; -#X obj 763 204 timer; -#X floatatom 763 225 5 0 0 0 - - -; -#X obj 790 182 delay 2000; -#X text 572 81 any delay between the first bang and the second bang -; -#X text 573 97 from the trigger.; -#X text 451 190 object to force a 2 second delay between the; -#X text 574 67 In this case \, the [timer] object does not perceive -; -#X text 444 283 2 Click this subpatch to read about [trigger]'s second -great purpose...; -#N canvas 148 22 927 612 trigger_can_convert_data_types 0; -#X msg 425 103 2.5; -#X msg 523 103 bang; -#X msg 465 103 23 64; -#X msg 569 103 symbol dog; -#X obj 425 228 trigger float bang symbol list anything; -#X text 24 24 All sophisticated programming environments provide tools -to convert data types. For instance \, Visual Basic has:; -#X text 24 55 - VarType: to check the data type.; -#X text 24 70 - CStr: to convert a variable to a string.; -#X text 23 84 - CDate: to convert a variable to a date.; -#X text 24 99 - isNumeric: to test whether the variable is a number. -; -#X text 22 113 - etc.; -#X text 19 137 [trigger] is one object in Pd which can convert an incoming -atom to a different type of atom.; -#X text 422 30 In the example below \, you can see that this [trigger] -has creation arguments which specify what data type the object should -output through each outlet. Messages which are sent to the first outlet -will be floats \; the second outlet will send bangs \; the third \, -symbols \; etc.; -#X text 19 172 To prove this \, click on each of the messages below -and watch your terminal window for the output.; -#X obj 20 239 t b; -#X msg 20 210 bang; -#X msg 57 210 1; -#X floatatom 90 212 5 0 0 0 - - -; -#X msg 132 211 symbol cat; -#X msg 204 211 this is anything; -#X obj 20 259 print all_messages_are_converted_to_bangs; -#X text 20 292 Another example showing floats and symbols.; -#X msg 20 308 bang; -#X floatatom 90 310 5 0 0 0 - - -; -#X msg 132 309 symbol cat; -#X msg 206 319 this is anything; -#X obj 20 337 t f s; -#X msg 57 308 1 0; -#X obj 45 387 print converted_to_symbols; -#X obj 20 407 print converted_to_floats; -#X text 62 338 Note that "this is anything" causes an error. That is -because 'anythings' don't conform to floats \, symbols \, lists \, -pointers. They can only be converted to "bang".; -#X text 18 430 In the example above \, note that the trigger object -does not split a list among the outlets like [unpack] does. Instead -it sends all list elements through all outlets and converts them as -necessary.; -#X text 20 486 Also note that some messages don't convert as nicely -as others. Hence \, the symbol "cat" converts to a ZERO when [trigger] -converts that symbol into a float. Likewise \, all numbers will convert -to a symbol called "float" when sent through [trigger]'s right-most -outlet.; -#X floatatom 425 248 5 0 0 0 - - -; -#X obj 482 248 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X symbolatom 539 286 10 0 0 0 - - -; -#X floatatom 594 162 5 0 0 0 - - -; -#X obj 594 200 pack f s; -#X msg 637 161 symbol earth; -#X msg 652 181 symbol jupiter; -#X obj 596 267 print a_list; -#X floatatom 426 403 5 0 0 0 - - -; -#X symbolatom 470 403 10 0 0 0 - - -; -#X obj 514 421 print another_list; -#X text 630 131 Click on all these.; -#X obj 426 363 r anythings; -#X text 425 303 Note how each of the messages sent to this trigger -are converted appropriately for their receiving atoms boxes. Also note -that "anythings" are sent to the example below.; -#X text 430 447 I'e used the [route] object to show how "anythings" -are converted as they pass through the above [trigger]. Note that all -messages converted to floats are displayed here in the number box \, -all symbols are displayed in the symbol box \, and all lists are printed -to the terminal window.; -#X obj 654 247 s anythings; -#X obj 426 383 route float symbol list; -#X msg 642 103 symbol cat; -#X connect 0 0 4 0; -#X connect 1 0 4 0; -#X connect 2 0 4 0; -#X connect 3 0 4 0; -#X connect 4 0 33 0; -#X connect 4 1 34 0; -#X connect 4 2 35 0; -#X connect 4 3 40 0; -#X connect 4 4 48 0; -#X connect 14 0 20 0; -#X connect 15 0 14 0; -#X connect 16 0 14 0; -#X connect 17 0 14 0; -#X connect 18 0 14 0; -#X connect 19 0 14 0; -#X connect 22 0 26 0; -#X connect 23 0 26 0; -#X connect 24 0 26 0; -#X connect 25 0 26 0; -#X connect 26 0 29 0; -#X connect 26 1 28 0; -#X connect 27 0 26 0; -#X connect 36 0 37 0; -#X connect 37 0 4 0; -#X connect 38 0 37 1; -#X connect 39 0 37 1; -#X connect 45 0 49 0; -#X connect 49 0 41 0; -#X connect 49 1 42 0; -#X connect 49 2 43 0; -#X connect 50 0 4 0; -#X restore 450 317 pd trigger_can_convert_data_types; -#X obj 763 244 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X floatatom 847 162 5 0 0 0 - - -; -#X text 452 238 at the top-right to clearly see "logical time"; -#X text 452 251 as measured by [timer].; -#X text 484 546 This document was updated for Pd version 0.35 test -26 by Dave Sabine as part of a project called pddp proposed by Krzysztof -Czaja to build comprehensive documentation for Pd.; -#X text 447 370 RELATED OBJECTS; -#X obj 532 396 route; -#X obj 452 396 unpack; -#X obj 498 396 pack; -#X obj 573 396 delay; -#X obj 615 396 pipe; -#X obj 650 396 float; -#X obj 690 396 int; -#X obj 719 396 symbol; -#N canvas 0 22 456 306 related_objects_from_other_libraries 0; -#X obj 31 36 exciter 200 200 8 0.1 1 1; -#X text 26 77 These objects are offered in Pd only if you have downloaded +#N canvas 0 0 555 619 10; +#X obj 0 595 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0 +14 -228856 -66577 0; +#X obj 0 0 cnv 15 552 40 empty \$0-pddp.cnv.header trigger 3 12 0 18 +-204280 -1 0; +#X obj 0 219 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13 +-228856 -1 0; +#N canvas 50 242 494 358 META 0; +#X text 12 125 PLATFORM windows macosx gnulinux; +#X text 12 185 LIBRARY internal; +#X text 12 225 WEBSITE http://crca.ucsd.edu/~msp/; +#X text 12 85 LICENSE SIBSD; +#X text 12 205 AUTHOR Miller Puckette; +#X text 12 285 HELP_PATCH_AUTHORS This help patch was updated for Pd +version 0.35 test 26 by Dave Sabine as part of a project called pddp +proposed by Krzysztof Czaja to build comprehensive documentation for +Pd. Jonathan Wilkes revised the patch to conform to the PDDP template +for Pd version 0.42.; +#X text 12 5 GENRE help; +#X text 12 105 DESCRIPTION sequence message in right-to-left order/ +convert data types; +#X text 12 145 INLET_0 anything; +#X text 12 165 OUTLET_N anything; +#X text 12 25 NAME trigger; +#X text 12 45 ALIAS t; +#X text 12 65 KEYWORDS control needs_work list_op bang_op; +#X text 12 245 RELEASE_DATE 1997; +#X text 12 265 RELEASE_VERSION; +#X restore 500 597 pd META; +#X obj 0 256 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0 +13 -228856 -1 0; +#X obj 0 309 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 8 12 +0 13 -228856 -1 0; +#X obj 0 497 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 8 12 +0 13 -228856 -1 0; +#N canvas 49 301 428 283 Related_objects 0; +#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0 +14 -204280 -1 0; +#X text 8 2 [trigger] Related Objects; +#X obj 103 43 route; +#X obj 23 43 unpack; +#X obj 69 43 pack; +#X obj 144 43 delay; +#X obj 186 43 pipe; +#X obj 221 43 float; +#X obj 261 43 int; +#X obj 290 43 symbol; +#X text 20 77 Externals; +#X text 20 128 These objects are offered in Pd only if you have downloaded and properly installed the appropriate library. These objects may or may not exist in a single library.; -#X text 25 126 The best places to find information about Pd's libraries +#X text 20 187 The best places to find information about Pd's libraries is:; -#X text 22 148 www.puredata.org and click on "Downloads" then "Software" +#X text 21 208 www.puredata.org and click on "Downloads" then "Software" ; -#X text 24 163 or; -#X text 24 178 iem.kug.ac.at/pdb/; -#X restore 452 427 pd related_objects_from_other_libraries; -#X text 447 455 MORE INFO; -#X obj 454 482 pddp/pddplink all_about_data_types.pd -text all_about_data_types; -#X obj 455 508 pddp/pddplink all_about_lists_vs_anythings.pd -text all_about_lists_vs_anythings; -#X obj 763 157 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X text 12 130 "float" = f; -#X text 12 142 "bang" = b; -#X text 11 154 "symbol" = s; -#X text 12 168 "list" = l; -#X text 12 196 "anything" = a; -#X text 12 182 "pointer" = p; -#X text 21 37 The [trigger] object outputs its input from right to +#X text 21 223 or; +#X text 21 238 iem.kug.ac.at/pdb/; +#X obj 20 104 pddp/helplink unauthorized/exciter; +#X restore 102 597 pd Related_objects; +#X obj 78 228 cnv 17 3 17 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856 +-162280 0; +#X obj 78 265 cnv 17 3 17 empty \$0-pddp.cnv.let.n n 5 9 0 16 -228856 +-162280 0; +#X obj 447 3 trigger; +#X obj 517 3 t; +#X text 497 3 or; +#X obj 445 20 pddp/pddplink http://wiki.puredata.info/en/trigger -text +pdpedia: trigger; +#X text 98 64 The [trigger] object outputs its input from right to left \, converting to the types indicated by its creation arguments. There is also a "pointer" argument type (see the [pointer] object.) ; -#X text 15 356 Click the toggle to set the tempo and start the [metro] -simultaneously.; -#X text 62 405 Triggers are sent from right to left...so our tempo -messages gets sent to [metro] immediately before the numbers from the -toggle to start and stop the [metro].; -#X text 457 32 Below is a simple structure which will measure the "logical -time" between "bangs" from the [trigger] object.; -#X text 452 176 In this case \, I've simply patched a [delay]; -#X text 451 204 first and second "bangs" sent to the [timer].; -#X text 452 224 You can reset the [delay] with the number box; -#X text 68 7 - sequence messages in right-to-left order and convert -data; -#X text 485 7 types; -#N canvas 69 298 440 489 trigger 0; -#X obj 14 298 trigger anything bang float list pointer symbol; -#X obj 14 318 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 339 518 pddp/pddplink all_about_lists_vs_anythings.pd -text +all_about_lists_vs_anythings; +#X text 98 227 anything; +#X text 168 227 - the inlet to [trigger] takes any type of message. +; +#X text 98 264 variable; +#X text 168 328 - for each creation argument \, a new outlet is created. +If no arguments are supplied \, trigger defaults to two outlets that +output bang messages.; +#X text 98 371 The [trigger] object can be abbreviated as "t" and the +creation arguments can be abbreviated as follows:; +#X obj 214 413 trigger float bang symbol list pointer anything; +#X text 315 432 is the same as; +#X obj 318 452 t f b s l p a; +#X text 97 408 "float" = f; +#X text 97 420 "bang" = b; +#X text 96 432 "symbol" = s; +#X text 97 446 "list" = l; +#X text 97 474 "anything" = a; +#X text 97 460 "pointer" = p; +#X floatatom 230 114 5 0 0 0 - - -; +#X obj 230 160 +; +#X floatatom 230 185 5 0 0 0 - - -; +#X obj 230 136 t a a; +#X text 11 23 sequence messages in right-to-left order/ convert data +types; +#X text 168 264 - upon receiving a message to its inlet \, [trigger] +outputs messages specified by the creation arguments. (Like nearly +all Pd objects \, messages are sent out from right to left.); +#N canvas 73 80 428 469 trigger_oddities 0; +#X obj 25 325 trigger anything bang float list pointer symbol; +#X obj 25 347 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 69 318 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 87 347 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 133 317 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 144 347 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 199 318 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 210 347 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 264 317 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 248 347 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 329 318 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 316 347 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 200 386 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 216 435 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 258 386 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 273 435 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 103 365 route float; -#X obj 103 385 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 114 413 route float; +#X obj 114 435 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 167 385 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 177 435 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 312 388 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 304 435 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 376 388 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 373 435 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 17 385 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 28 435 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 74 385 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +#X obj 85 435 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X obj 17 365 route bang; -#X obj 312 367 route symbol; -#X obj 200 366 route list; -#X msg 43 174 1 2 3; -#X msg 15 77 1; -#X msg 21 102 float 2; -#X msg 28 126 test; -#X msg 35 151 symbol this; -#X msg 57 220 list 1 two 3; -#X msg 66 267 list one 2 three; -#X obj 165 443 print LIST; -#X obj 81 443 print FLOAT; -#X msg 48 199 1 two 3; -#X msg 61 244 one 2 three; -#X text 18 16 "float" is interpreted; -#X text 19 36 "symbol" is not interpreted; -#X text 20 55 "list" is interpreted \, and outputted; +#X obj 28 413 route bang; +#X obj 304 413 route symbol; +#X obj 216 413 route list; +#X msg 54 201 1 2 3; +#X msg 25 104 1; +#X msg 32 129 float 2; +#X msg 39 153 test; +#X msg 46 178 symbol this; +#X msg 68 247 list 1 two 3; +#X msg 77 294 list one 2 three; +#X obj 221 390 print LIST; +#X obj 136 390 print FLOAT; +#X msg 59 226 1 two 3; +#X msg 72 271 one 2 three; +#X text 20 39 "float" is interpreted; +#X text 21 59 "symbol" is not interpreted; +#X text 22 78 "list" is interpreted \, and outputted; +#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0 +14 -204280 -1 0; +#X text 8 2 [trigger] Oddities; #X connect 0 0 1 0; #X connect 0 1 2 0; #X connect 0 1 16 0; @@ -290,20 +179,206 @@ data; #X connect 25 0 0 0; #X connect 28 0 0 0; #X connect 29 0 0 0; -#X restore 450 342 pd trigger has a few odd conditions; -#X connect 3 0 5 0; -#X connect 4 0 3 1; -#X connect 6 0 11 0; -#X connect 11 0 3 0; -#X connect 11 1 4 0; -#X connect 13 0 15 1; -#X connect 13 1 15 0; -#X connect 14 0 13 0; -#X connect 15 0 16 0; -#X connect 17 0 18 0; -#X connect 22 0 23 0; -#X connect 23 0 31 0; -#X connect 24 0 22 1; -#X connect 32 0 24 1; -#X connect 49 0 24 0; -#X connect 49 0 22 0; +#X restore 102 572 pd trigger_oddities; +#N canvas 60 35 428 560 Converting_data_types_with_trigger 0; +#X text 21 38 All sophisticated programming environments provide tools +to convert data types. For instance \, Visual Basic has:; +#X text 27 69 - VarType: to check the data type.; +#X text 27 84 - CStr: to convert a variable to a string.; +#X text 27 99 - CDate: to convert a variable to a date.; +#X text 27 114 - isNumeric: to test whether the variable is a number. +; +#X text 27 129 - etc.; +#X text 20 151 [trigger] is one object in Pd which can convert an incoming +atom to a different type of atom.; +#X text 20 182 To prove this \, click on each of the messages below +and watch your terminal window for the output.; +#X msg 23 215 bang; +#X msg 60 215 1; +#X floatatom 94 215 5 0 0 0 - - -; +#X msg 133 215 symbol cat; +#X msg 207 215 this is anything; +#X obj 23 264 print all_messages_are_converted_to_bangs; +#X text 20 293 Another example showing floats and symbols.; +#X msg 23 317 bang; +#X floatatom 93 317 5 0 0 0 - - -; +#X msg 135 317 symbol cat; +#X msg 209 317 this is anything; +#X obj 23 345 t f s; +#X msg 60 317 1 0; +#X obj 50 390 print converted_to_symbols; +#X obj 23 413 print converted_to_floats; +#X text 65 344 Note that "this is anything" causes an error. That is +because 'anythings' don't conform to floats \, symbols \, lists \, +pointers. They can only be converted to "bang".; +#X text 21 435 In the example above \, note that the trigger object +does not split a list among the outlets like [unpack] does. Instead +it sends all list elements through all outlets and converts them as +necessary.; +#X text 22 487 Also note that some messages don't convert as nicely +as others. Hence \, the symbol "cat" converts to a ZERO when [trigger] +converts that symbol into a float. Likewise \, all numbers will convert +to a symbol called "float" when sent through [trigger]'s right-most +outlet.; +#X obj 23 244 t b; +#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0 +14 -204280 -1 0; +#X text 8 2 [trigger] Converting data types; +#X connect 8 0 26 0; +#X connect 9 0 26 0; +#X connect 10 0 26 0; +#X connect 11 0 26 0; +#X connect 12 0 26 0; +#X connect 15 0 19 0; +#X connect 16 0 19 0; +#X connect 17 0 19 0; +#X connect 18 0 19 0; +#X connect 19 0 22 0; +#X connect 19 1 21 0; +#X connect 20 0 19 0; +#X connect 26 0 13 0; +#X restore 102 528 pd Converting_data_types_with_trigger; +#N canvas 29 67 459 506 Triggering_messages_with_trigger 0; +#X text 21 77 1 Sequence a series of bangs - or triggers for symbols +and/or other messages. In the example below \, you should see that +it is important that it is important that [metro] gets a tempo setting +before it is started - but let's assume for a moment that you wanted +to start the [metro] with only a single click.; +#X obj 23 269 metro; +#X msg 50 247 1000; +#X obj 23 289 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 23 194 tgl 15 0 empty empty On/Off 0 -6 0 7 -262144 -1 -1 0 +1; +#X obj 23 212 t f b; +#X text 21 151 Click the toggle to set the tempo and start the [metro] +simultaneously.; +#X text 64 203 Triggers are sent from right to left...so our tempo +messages gets sent to [metro] immediately before the numbers from the +toggle to start and stop the [metro].; +#X text 20 310 This example is simple \, and may not be very practical +in most situations \, but it clearly shows how [trigger] can be used +to create a simple sequence of events. It is important to note however +that the messages sent from [trigger]'s outlets occur in ZERO time +with no delay between the events...more at the top right of the page... +; +#X obj 23 438 t b b; +#X msg 23 416 bang; +#X obj 23 468 timer; +#X floatatom 23 490 5 0 0 0 - - -; +#X text 57 416 Click here.; +#X text 62 489 Watch here.; +#X text 20 511 Now \, to prove that I'm not crazy...click here >; +#X obj 319 560 timer; +#X floatatom 319 581 5 0 0 0 - - -; +#X obj 346 538 delay 2000; +#X text 136 430 any delay between the first bang and the second bang +; +#X text 137 446 from the trigger.; +#X text 20 540 object to force a 2 second delay between the; +#X text 138 416 In this case \, the [timer] object does not perceive +; +#X obj 319 600 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X floatatom 403 518 5 0 0 0 - - -; +#X text 19 588 at the top-right to clearly see "logical time"; +#X text 19 601 as measured by [timer].; +#X obj 319 513 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 20 384 Below is a simple structure which will measure the "logical +time" between "bangs" from the [trigger] object.; +#X text 20 526 In this case \, I've simply patched a [delay]; +#X text 20 554 first and second "bangs" sent to the [timer].; +#X text 19 574 You can reset the [delay] with the number box; +#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0 +14 -204280 -1 0; +#X text 8 2 [trigger] Uses; +#X text 19 623 Click on the other subpatches in the main window to +read about [trigger]'s second great purpose...; +#X text 21 38 The [trigger] object serves two great purposes which +aren't really related - but they might be on some level that I don't +fully understand yet.; +#X connect 1 0 3 0; +#X connect 2 0 1 1; +#X connect 4 0 5 0; +#X connect 5 0 1 0; +#X connect 5 1 2 0; +#X connect 9 0 11 1; +#X connect 9 1 11 0; +#X connect 10 0 9 0; +#X connect 11 0 12 0; +#X connect 16 0 17 0; +#X connect 17 0 23 0; +#X connect 18 0 16 1; +#X connect 24 0 18 1; +#X connect 27 0 18 0; +#X connect 27 0 16 0; +#X restore 102 506 pd Triggering_messages_with_trigger; +#N canvas 73 48 428 558 Converting_data_types_(cont.) 0; +#X msg 23 131 2.5; +#X msg 110 131 bang; +#X msg 60 131 23 64; +#X msg 153 131 symbol dog; +#X obj 23 256 trigger float bang symbol list anything; +#X text 20 38 In the example below \, you can see that this [trigger] +has creation arguments which specify what data type the object should +output through each outlet. Messages which are sent to the first outlet +will be floats \; the second outlet will send bangs \; the third \, +symbols \; etc.; +#X floatatom 23 278 5 0 0 0 - - -; +#X obj 80 278 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X symbolatom 138 322 10 0 0 0 - - -; +#X floatatom 192 187 5 0 0 0 - - -; +#X obj 192 228 pack f s; +#X msg 237 187 symbol earth; +#X msg 250 209 symbol jupiter; +#X obj 196 300 print a_list; +#X floatatom 23 463 5 0 0 0 - - -; +#X symbolatom 68 463 10 0 0 0 - - -; +#X obj 113 441 print another_list; +#X text 228 159 Click on all these.; +#X obj 23 398 r anythings; +#X text 20 346 Note how each of the messages sent to this trigger are +converted appropriately for their receiving atoms boxes. Also note +that "anythings" are sent to the example below.; +#X obj 254 278 s anythings; +#X obj 23 418 route float symbol list; +#X msg 233 131 symbol cat; +#X text 20 487 I've used the [route] object to show how "anythings" +are converted as they pass through the above [trigger]. Note that all +messages converted to floats are displayed here in the number box \, +all symbols are displayed in the symbol box \, and all lists are printed +to the terminal window.; +#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0 +14 -204280 -1 0; +#X text 8 2 [trigger] Converting data types (cont.); +#X connect 0 0 4 0; +#X connect 1 0 4 0; +#X connect 2 0 4 0; +#X connect 3 0 4 0; +#X connect 4 0 6 0; +#X connect 4 1 7 0; +#X connect 4 2 8 0; +#X connect 4 3 13 0; +#X connect 4 4 20 0; +#X connect 9 0 10 0; +#X connect 10 0 4 0; +#X connect 11 0 10 1; +#X connect 12 0 10 1; +#X connect 18 0 21 0; +#X connect 21 0 14 0; +#X connect 21 1 15 0; +#X connect 21 2 16 0; +#X connect 22 0 4 0; +#X restore 102 550 pd Converting_data_types_(cont.); +#X text 80 328 1) symbol atom; +#X obj 4 597 pddp/pddplink pddp/help.pd -text help; +#X obj 339 501 pddp/pddplink all_about_messages.pd -text all_about_messages +; +#X obj 291 574 pddp/pddplink ../2.control.examples/03.connections.pd +; +#X connect 30 0 33 0; +#X connect 31 0 32 0; +#X connect 33 0 31 0; +#X connect 33 1 31 1; -- cgit v1.2.1