|
4 | 4 | #X obj 3 499 cnv 3 550 3 empty empty arguments 8 12 0 13 #dcdcdc #000000 0;
|
5 | 5 | #X obj 75 412 cnv 17 3 17 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
|
6 | 6 | #X obj 75 475 cnv 17 3 17 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
|
7 |
| -#X obj 51 251 print; |
| 7 | +#X obj 51 281 print; |
8 | 8 | #X obj 3 590 cnv 15 552 21 empty empty empty 20 12 0 14 #e0e0e0 #202020 0;
|
9 | 9 | #X text 173 507 -;
|
10 | 10 | #X text 115 475 anything;
|
11 |
| -#X obj 21 186 bng 17 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000; |
| 11 | +#X obj 21 201 bng 17 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000; |
12 | 12 | #X text 139 413 bang;
|
13 | 13 | #X text 115 436 anything;
|
14 | 14 | #X text 172 435 -;
|
15 | 15 | #X text 96 532 2) anything;
|
16 | 16 | #X text 108 507 1) symbol;
|
17 | 17 | #X text 173 532 -;
|
18 | 18 | #X text 185 507 the optional 'symout' argument formats a symbol message ('symout' itself not included), f 57;
|
19 |
| -#X msg 198 186 wind; |
20 |
| -#X msg 51 186 wood; |
| 19 | +#X msg 198 201 wind; |
| 20 | +#X msg 51 201 wood; |
21 | 21 | #X msg 272 163 64 64;
|
22 |
| -#X obj 51 215 cyclone/sprintf %s-%s.wav; |
23 |
| -#X obj 318 163 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256; |
| 22 | +#X obj 51 240 cyclone/sprintf %s-%s.wav; |
| 23 | +#X obj 328 163 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256; |
24 | 24 | #X text 172 413 - formats the message with current input, f 59;
|
25 | 25 | #X obj 75 434 cnv 17 3 27 empty empty 0-n 5 9 0 16 #dcdcdc #9c9c9c 0;
|
26 | 26 | #N canvas 749 189 489 533 possible-types 0;
|
|
60 | 60 | #X text 112 42 float hexadecimal in lowercase, f 49;
|
61 | 61 | #X text 112 54 float hexadecimal in CAPS, f 49;
|
62 | 62 | #X text 137 320 The above reference has more information and parameters not really available for [sprintf]. Nonetheless \, the length modifiers \, the optional flags: "+" \, " " \, "-" and "#" \, plus the width and precision fields are supported., f 47;
|
63 |
| -#X text 35 387 Inconsistencies: If a format type is not supported or invalid \, [sprintf] doesn't create a corresponding inlet and prints an error isntead. The Max version creates an inlet for whatever inserted type \, invalid or not \, and only prints an error when trying to convert. The MAX original also doesn't support the "space" flag or %a/%A types. The length modifiers are supported but since Pd does not have an integer type \, something like '%ld' won't work with full precision even if you're using Pd compiled for double precision (aka Pd64). Also \, some values \, will only actually be possible to represent in Pd64., f 64; |
| 63 | +#X text 35 387 Inconsistencies: If a format type is not supported or invalid \, [sprintf] doesn't create a corresponding inlet and prints an error isntead. The Max version creates an inlet for whatever inserted type \, invalid or not \, and only prints an error when trying to convert. The MAX original also doesn't support the "space" flag or %a/%A types. The length modifiers are supported but since Pd does not have an integer type \, something like '%lld' won't work with full precision even if you're using Pd compiled for double precision (aka Pd64). Also \, some values for a format like '%u' will only actually be possible to represent in Pd64 because they can exceed the 2ˆ24 limit of 32-bit float., f 64; |
64 | 64 | #X connect 20 0 19 0;
|
65 | 65 | #X connect 30 0 20 0;
|
66 | 66 | #X restore 335 562 pd possible-types;
|
|
78 | 78 | #X text 75 87 Based on C's "printf" function \, [sprintf] formats messages \, where each '%' format type corresponds to an inlet. By default you have each argument as a separate element in a message \, but the 'symout' argument creates a symbol out of everything., f 66;
|
79 | 79 | #X text 172 475 - the formatted message as a series of atoms or a symbol;
|
80 | 80 | #X text 153 349 Plugdata users or those with ELSE can also use [else/format] as an alternative., f 42;
|
81 |
| -#X obj 249 163 bng 17 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000; |
82 |
| -#X obj 318 190 trigger float float; |
| 81 | +#X obj 239 163 bng 17 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000; |
| 82 | +#X obj 328 190 trigger float float; |
83 | 83 | #N canvas 631 78 781 745 more 0;
|
84 | 84 | #X obj 61 276 print;
|
85 | 85 | #X obj 61 181 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
|
|
119 | 119 | #X text 76 647 for more details on supported specifiers \, as most of them are shared between the two objects., f 21;
|
120 | 120 | #X text 76 602 See the help file of, f 12;
|
121 | 121 | #X obj 456 453 bng 19 250 50 0 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000;
|
122 |
| -#X listbox 456 546 21 0 0 0 - - - 12; |
123 |
| -#X text 421 576 * The correct exact result is only possible in Pd compiled with double precision (aka Pd64), f 48; |
124 |
| -#X text 610 548 *; |
| 122 | +#X listbox 456 546 13 0 0 0 - - - 12; |
| 123 | +#X text 560 548 *; |
125 | 124 | #X obj 456 512 cyclone/sprintf symout %u;
|
126 | 125 | #X text 21 16 The arguments in [sprintf] format a message to be sent out and can be floats and symbols with or without changeable arguments (like %i for integers \, %f for floats and %s for symbol strings) resembling the C programming language. The number of changeable arguments determines the number of inlets \, with each inlet corresponding to a changeable argument \, in order., f 64;
|
127 | 126 | #X text 35 514 Messages with more than one item spreads items to the next inlets., f 23;
|
128 | 127 | #X text 434 20 The optional 'symout' argument turns the whole output into a symbol message \, which is useful for format strings with spaces \, commas and other special characters. In this case you should not use backslash \, as it is common in Pd to escape a space or another special symbol., f 48;
|
129 | 128 | #X text 452 241 Nonetheless \, note you can use backslashes to create symbols with special characters such as spaces without the 'symout' argument., f 44;
|
130 |
| -#X obj 456 483 expr pow(2 \, 32) - 1; |
131 | 129 | #X text 281 643 The MAX original has issues in dealing with spaces for symbol input that contains spaces. Similarly \, there are also issues with the width field when it adds spaces and the 'space' flag. What happens is that atoms get split by the spaces when you don't have the 'symout' argument. The cyclone version also has the same issues., f 72;
|
| 130 | +#X obj 456 483 expr pow(2 \, 32) - 2; |
| 131 | +#X text 421 576 * The correct exact result ('4294967294') is only possible in Pd compiled with double precision (aka Pd64), f 43; |
132 | 132 | #X connect 1 0 34 0;
|
133 | 133 | #X connect 3 0 8 0;
|
134 | 134 | #X connect 4 0 6 0;
|
|
154 | 154 | #X connect 32 0 31 1;
|
155 | 155 | #X connect 34 0 0 0;
|
156 | 156 | #X connect 37 0 46 0;
|
157 |
| -#X connect 41 0 38 0; |
158 |
| -#X connect 46 0 41 0; |
159 |
| -#X restore 222 295 pd more examples; |
| 157 | +#X connect 40 0 38 0; |
| 158 | +#X connect 46 0 40 0; |
| 159 | +#X restore 387 295 pd more examples; |
| 160 | +#X obj 272 281 print; |
160 | 161 | #X connect 9 0 20 0;
|
161 | 162 | #X connect 17 0 20 1;
|
162 | 163 | #X connect 18 0 20 0;
|
|
165 | 166 | #X connect 21 0 40 0;
|
166 | 167 | #X connect 32 0 29 0;
|
167 | 168 | #X connect 34 0 35 0;
|
| 169 | +#X connect 35 0 42 0; |
168 | 170 | #X connect 39 0 34 0;
|
169 | 171 | #X connect 40 0 34 0;
|
170 | 172 | #X connect 40 1 34 1;
|
0 commit comments