aboutsummaryrefslogtreecommitdiff
path: root/pd/doc/5.reference/swap-help.pd
diff options
context:
space:
mode:
Diffstat (limited to 'pd/doc/5.reference/swap-help.pd')
-rw-r--r--pd/doc/5.reference/swap-help.pd61
1 files changed, 41 insertions, 20 deletions
diff --git a/pd/doc/5.reference/swap-help.pd b/pd/doc/5.reference/swap-help.pd
index 987a5844..039e5659 100644
--- a/pd/doc/5.reference/swap-help.pd
+++ b/pd/doc/5.reference/swap-help.pd
@@ -1,20 +1,41 @@
-#N canvas 376 130 488 326 12;
-#X msg 67 124 bang;
-#X floatatom 67 252;
-#X floatatom 79 154;
-#X floatatom 118 194;
-#X obj 66 15 swap;
-#X text 114 16 - SWAP TWO NUMBERS \, RESPECTING RIGHT-TO-LEFT ORDER;
-#X text 284 309 updated for Pd version 0.27;
-#X text 12 42 The swap object stores numbers from its left inlet to output on its right inlet -- after repeating its right hand input out the left.;
-#X text 112 123 outputs 2 stored values;
-#X obj 67 226 swap 6.5;
-#X text 110 154 sets second value and outputs both;
-#X text 150 195 sets first value;
-#X text 142 226 creation argument initializes first value;
-#X floatatom 118 254;
-#X connect 0 0 9 0;
-#X connect 2 0 9 0;
-#X connect 3 0 9 1;
-#X connect 9 0 1 0;
-#X connect 9 1 13 0;
+#N canvas 475 187 615 593 12;
+#X msg 72 167 bang;
+#X floatatom 72 292 0 0 0 0 - - -;
+#X floatatom 84 200 0 0 0 0 - - -;
+#X floatatom 139 237 0 0 0 0 - - -;
+#X obj 33 15 swap;
+#X text 81 16 - SWAP TWO NUMBERS \, RESPECTING RIGHT-TO-LEFT ORDER
+;
+#X text 117 166 outputs 2 stored values;
+#X obj 72 266 swap 6.5;
+#X text 115 200 sets second value and outputs both;
+#X text 171 238 sets first value;
+#X text 157 266 creation argument initializes first value;
+#X floatatom 139 291 0 0 0 0 - - -;
+#X obj 139 331 print right;
+#X obj 72 367 print left;
+#X text 43 427 A common use of swap is to reverse the operands in arithmetic
+objects like this:;
+#X obj 72 491 swap;
+#X obj 72 519 -;
+#X floatatom 72 541 5 0 0 0 - - -;
+#X floatatom 103 469 3 0 0 0 - - -;
+#X floatatom 72 469 3 0 0 0 - - -;
+#X text 291 549 updated for Pd version 0.41;
+#X text 32 52 The swap object swaps the positions of two incoming numbers.
+The number coming in through the right inlet will be sent to the left
+outlet and the number coming in left will come out right. Only the
+left inlet is hot and triggers output on both outlets. Output order
+is right to left as in [trigger].;
+#X connect 0 0 7 0;
+#X connect 1 0 13 0;
+#X connect 2 0 7 0;
+#X connect 3 0 7 1;
+#X connect 7 0 1 0;
+#X connect 7 1 11 0;
+#X connect 11 0 12 0;
+#X connect 15 0 16 0;
+#X connect 15 1 16 1;
+#X connect 16 0 17 0;
+#X connect 18 0 15 1;
+#X connect 19 0 15 0;