#N canvas 398 67 626 475 12;
#X floatatom 24 182 5 0 0 0 - - - 0;
#X msg 392 182 symbol meat;
#X msg 405 209 symbol hair;
#X obj 20 17 makefilename;
#X msg 56 234 set %d-zebra;
#X symbolatom 43 296 14 0 0 0 - - - 0;
#X obj 43 328 print Integer;
#X symbolatom 392 280 14 0 0 0 - - - 0;
#X obj 392 313 print Symbol;
#N canvas 703 91 524 392 multiple_substitutions 0;
#X msg 50 111 symbol aif;
#X msg 63 138 symbol wav;
#X msg 49 229 set \$1;
#X floatatom 73 263 4 0 0 0 - - - 0;
#X obj 49 296 makefilename not-set-yet;
#X symbolatom 49 197 14 0 0 0 - - - 0;
#X text 43 21 MULTIPLE SUBSTITUTIONS:;
#X symbolatom 49 325 14 0 0 0 - - - 0;
#X obj 49 357 print Multiple;
#X text 240 148 LITERAL %: You can format a string with a literal '%' if you escape it with another '%' (where "%%" becomes "%" \, "%%%%" becomes "%%" and so on), f 36;
#X obj 49 168 makefilename dog\ %%d.%s;
#X text 38 46 You can connect two or more [makefilename] objects for multiple substitutions. For that \, you need to use a literal '%' to set the format string of another [makefilename] object., f 64;
#X text 109 263 <-- and then this number replaces "%d".;
#X text 107 229 <-- this becomes "set dog %d.aif" \, for example., f 48;
#X connect 0 0 10 0;
#X connect 1 0 10 0;
#X connect 2 0 4 0;
#X connect 3 0 4 0;
#X connect 4 0 7 0;
#X connect 5 0 2 0;
#X connect 7 0 8 0;
#X connect 10 0 5 0;
#X restore 392 354 pd multiple_substitutions;
#N canvas 581 171 492 633 possible_types_&_syntax 0;
#N canvas 732 231 414 489 %c 0;
#X obj 100 249 list fromsymbol;
#X floatatom 100 368 5 0 0 0 - - - 0;
#X symbolatom 100 202 5 0 0 0 - - - 0;
#X symbolatom 100 443 7 0 0 0 - - - 0;
#X msg 117 283 64;
#X msg 127 333 123;
#X text 35 19 %c - character:;
#X text 166 202 type a character to convert to float, f 19;
#X obj 100 405 makefilename [%c];
#X text 141 202 <--;
#X text 33 131 By the way \, you can also perform the opposite conversion (from a character symbol to a float) by using the [list fromsymbol] object., f 48;
#X text 153 282 <-- this is the '@' (at sign) character, f 20;
#X text 163 332 <-- (left curly);
#X text 33 53 This format specifier allows you to convert from a float (actually integers from 0 to 255) to a character symbol. A symbol input is converted to '0' (and this is also true for any other specifier besides '%s' and '%p')., f 48;
#X connect 0 0 1 0;
#X connect 1 0 8 0;
#X connect 2 0 0 0;
#X connect 4 0 1 0;
#X connect 5 0 1 0;
#X connect 8 0 3 0;
#X restore 80 98 pd %c;
#N canvas 787 150 532 561 %d/%i 0;
#X floatatom 244 398 10 0 0 0 - - - 0;
#X symbolatom 94 494 15 0 0 0 - - - 0;
#X text 56 35 %d or %i - signed decimal integer:;
#X symbolatom 244 494 15 0 0 0 - - - 0;
#X msg 244 183 127;
#X msg 258 215 -255;
#X msg 269 251 1;
#X msg 275 281 -1;
#X obj 94 446 makefilename [%d];
#X msg 194 219 12.9;
#X msg 294 352 -1e+07;
#X obj 244 446 makefilename [%i];
#X msg 286 318 2e+09;
#X text 54 64 Both '%d' and '%i' are the same. This format specifier allows you to insert a signed (negative or positive) decimal integer into a symbol. Note that floats with a decimal point are truncated., f 61;
#X connect 0 0 8 0;
#X connect 0 0 11 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 6 0 0 0;
#X connect 7 0 0 0;
#X connect 8 0 1 0;
#X connect 9 0 0 0;
#X connect 10 0 0 0;
#X connect 11 0 3 0;
#X connect 12 0 0 0;
#X restore 59 126 pd %d/%i;
#N canvas 751 239 511 507 %e/%E 0;
#X floatatom 256 264 10 0 0 0 - - - 0;
#X symbolatom 106 360 18 0 0 0 - - - 0;
#X symbolatom 256 360 18 0 0 0 - - - 0;
#X obj 106 312 makefilename [%e];
#X msg 256 189 1.23456;
#X msg 228 161 2.345e-05;
#X msg 285 224 -18;
#X obj 256 312 makefilename [%E];
#X text 62 16 %e or %E - float numbers in scientific notation:;
#X text 65 406 Note that there's a default precision of 6 digits after the decimal point and before 'e'/'E'. You can change this precision as shown later. Also note that trailing zeros (zeros to the right of the decimal point) are always shown. This means you're always aware of the given precision., f 52;
#X msg 187 161 1;
#X text 61 43 This format specifier allows you to insert a float number with scientific notation into a symbol. The '%e' or '%E' pattern specify respectively whether the exponential character is lower (e) or upper (E) case. Also \, it prints 'NAN' and 'INF' in all CAPS for %E \, while '%e' uses lowercase., f 53;
#X connect 0 0 3 0;
#X connect 0 0 7 0;
#X connect 3 0 1 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 6 0 0 0;
#X connect 7 0 2 0;
#X connect 10 0 0 0;
#X restore 59 154 pd %e/%E;
#X text 127 97 - character;
#X text 127 125 - signed decimal integer;
#X text 128 181 - decimal floating point;
#N canvas 784 131 579 621 %g/%G 0;
#X floatatom 258 450 12 0 0 0 - - - 0;
#X symbolatom 258 546 18 0 0 0 - - - 0;
#X msg 257 303 1.23456;
#X msg 278 335 2.345e-05;
#X msg 300 364 1.1e+08;
#X msg 170 275 -1800;
#X msg 132 275 179;
#X obj 258 498 makefilename [%G];
#X msg 303 403 0.999999;
#X text 38 24 %g or %G - floats with or without scientific notation:, f 68;
#X symbolatom 108 546 18 0 0 0 - - - 0;
#X obj 108 498 makefilename [%g];
#X msg 221 275 0.000123456;
#X text 34 201 Note that this is the format pattern used by Pd to display numbers in comments \, message boxes and also GUI boxes and iemgui's [nbx] (with the same default precision of 6 significant digits)., f 69;
#X text 34 55 Unlike %f' and '%e'/'%E' \, this format specifier doesn't show trailing zeros. Therefore \, values without significant digits after the decimal point come out looking like integers (as there's not dot at the end). The scientific notation is used in negative form if the exponent value is lower than '-4'. For the positive form \, it's used only if the exponent is equal to or higher than the precision value (again this is '6' by default and can be changed later). The '%g' or '%G' pattern specify respectively whether the exponential character is lower (e) or upper (E) case. Also \, it prints 'NAN' and 'INF' in all CAPS for %G \, while '%g' uses lowercase., f 69;
#X connect 0 0 7 0;
#X connect 0 0 11 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 6 0 0 0;
#X connect 7 0 1 0;
#X connect 8 0 0 0;
#X connect 11 0 10 0;
#X connect 12 0 0 0;
#X restore 59 210 pd %g/%G;
#X text 128 153 - decimal floating point in scientific notation;
#N canvas 836 149 414 466 %o 0;
#X floatatom 136 301 8 0 0 0 - - - 0;
#X symbolatom 136 397 14 0 0 0 - - - 0;
#X msg 147 174 1;
#X msg 55 216 1.9;
#X msg 100 138 9;
#X msg 136 138 16;
#X msg 174 252 1e+12;
#X msg 164 216 1e+09;
#X text 52 27 %o - unsigned octal:;
#X obj 136 349 makefilename [%o];
#X text 53 59 This format specifier allows you to insert an unsigned (only positive) octal integer into a symbol. Floats are truncated., f 42;
#X connect 0 0 9 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 6 0 0 0;
#X connect 7 0 0 0;
#X connect 9 0 1 0;
#X restore 80 238 pd %o;
#X text 126 237 - unsigned octal;
#N canvas 788 215 458 430 %s 0;
#X symbolatom 110 146 7 0 0 0 - - - 0;
#X symbolatom 148 369 10 0 0 0 - - - 0;
#X obj 148 321 makefilename [%s];
#X floatatom 148 179 10 0 0 0 - - - 0;
#X msg 178 218 symbol dog;
#X msg 187 256 -1;
#X msg 230 256 1.9;
#X msg 230 286 1e-07;
#X text 62 28 %s - symbol string:;
#X text 229 178 <-- send it a float;
#X text 167 146 <-- send it a symbol;
#X text 59 62 This format specifier allows you to insert a symbol \, but note it also works for float messages. You can set a precision as shown later \, but there's no default precision., f 52;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X connect 3 0 2 0;
#X connect 4 0 2 0;
#X connect 5 0 2 0;
#X connect 6 0 2 0;
#X connect 7 0 2 0;
#X restore 80 266 pd %s;
#X text 126 293 - signed decimal integer;
#N canvas 784 259 405 451 %u 0;
#X floatatom 150 293 9 0 0 0 - - - 0;
#X symbolatom 150 371 14 0 0 0 - - - 0;
#X msg 150 138 127;
#X msg 164 170 -255;
#X msg 175 206 1;
#X msg 100 174 12.9;
#X text 45 25 %u - unsigned decimal integer:;
#X obj 150 332 makefilename [%u];
#X msg 192 243 1e+12;
#X text 43 59 This format specifier is the same as "%d" or "%i" \, but it is unsigned (only positive). Floats are truncated to integers., f 44;
#X connect 0 0 7 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 7 0 1 0;
#X connect 8 0 0 0;
#X restore 80 294 pd %u;
#N canvas 781 226 439 467 %x/%X 0;
#X floatatom 211 304 9 0 0 0 - - - 0;
#X symbolatom 61 400 12 0 0 0 - - - 0;
#X symbolatom 211 400 12 0 0 0 - - - 0;
#X msg 211 149 127;
#X msg 236 217 1;
#X msg 253 254 1e+09;
#X obj 61 352 makefilename [%x];
#X msg 225 181 255;
#X msg 161 185 9.9;
#X text 40 11 %x or %X - unsigned hexadecimal:;
#X obj 211 352 makefilename [%X];
#X text 31 46 This format specifier allows you to insert a signed (only positive) hexadecimal integer into a symbol. Floats are truncated. The '%x' or '%X' specify respectively whether the the characters are lower or upper case., f 51;
#X connect 0 0 6 0;
#X connect 0 0 10 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 6 0 1 0;
#X connect 7 0 0 0;
#X connect 8 0 0 0;
#X connect 10 0 2 0;
#X restore 59 322 pd %x/%X;
#N canvas 921 253 483 354 %p 0;
#X symbolatom 164 163 10 0 0 0 - - - 0;
#X symbolatom 164 259 14 0 0 0 - - - 0;
#X obj 164 210 makefilename [%p];
#X text 57 44 %p - pointer representation:;
#X text 54 77 This format specifier formats to a platform specific pointer representation of an incoming symbol (floats are cast to int and also converted)., f 53;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X restore 80 350 pd %p;
#X text 126 349 - pointer representation;
#N canvas 447 135 841 548 # 0;
#X floatatom 176 168 0 0 0 0 - - - 0;
#X symbolatom 176 231 14 0 0 0 - - - 0;
#X msg 176 126 1;
#X msg 108 126 9;
#X msg 144 126 16;
#X msg 211 126 1e+09;
#X obj 176 199 makefilename [%#o];
#X floatatom 223 394 8 0 0 0 - - - 0;
#X symbolatom 223 467 14 0 0 0 - - - 0;
#X msg 223 352 1;
#X msg 155 352 9;
#X msg 191 352 16;
#X msg 258 352 1e+09;
#X symbolatom 82 467 14 0 0 0 - - - 0;
#X obj 82 429 makefilename [%#x];
#X obj 223 429 makefilename [%#X];
#X floatatom 585 152 10 0 0 0 - - - 0;
#X symbolatom 435 248 18 0 0 0 - - - 0;
#X symbolatom 585 248 18 0 0 0 - - - 0;
#X msg 585 105 -1800;
#X msg 547 105 179;
#X obj 585 200 makefilename [%G];
#X msg 638 106 1e+08;
#X text 83 285 For "%x" and "%X" \, the number is preceded by "0x" (if %x) or "0X" (if %X)., f 32;
#X obj 435 200 makefilename [%#+g];
#X text 403 25 For %g and %G \, the decimal point and trailing zeroes are not removed. Note that this flag can be combined with '+' or 'space' flags., f 46;
#X text 53 45 The '#' (hash) flag presents an alternate form of some numeric types. For "%o" \, the number is preceded by a "0"., f 41;
#X floatatom 578 399 8 0 0 0 - - - 0;
#X symbolatom 578 472 17 0 0 0 - - - 0;
#X msg 578 357 1;
#X msg 507 357 9;
#X msg 543 357 16;
#X symbolatom 437 472 16 0 0 0 - - - 0;
#X obj 437 434 makefilename [%a];
#X obj 578 434 makefilename [%#a];
#X msg 612 357 1.5;
#X text 426 295 For "%a" and "%A" \, the number has a decimal point even if there is no fractional part., f 43;
#X connect 0 0 6 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 6 0 1 0;
#X connect 7 0 15 0;
#X connect 7 0 14 0;
#X connect 9 0 7 0;
#X connect 10 0 7 0;
#X connect 11 0 7 0;
#X connect 12 0 7 0;
#X connect 14 0 13 0;
#X connect 15 0 8 0;
#X connect 16 0 21 0;
#X connect 16 0 24 0;
#X connect 19 0 16 0;
#X connect 20 0 16 0;
#X connect 21 0 18 0;
#X connect 22 0 16 0;
#X connect 24 0 17 0;
#X connect 27 0 33 0;
#X connect 27 0 34 0;
#X connect 29 0 27 0;
#X connect 30 0 27 0;
#X connect 31 0 27 0;
#X connect 33 0 32 0;
#X connect 34 0 28 0;
#X connect 35 0 27 0;
#X restore 312 489 pd #;
#X text 154 518 width:;
#N canvas 352 154 928 523 width 0;
#X floatatom 102 181 9 0 0 0 - - - 0;
#X symbolatom 102 245 12 0 0 0 - - - 0;
#X msg 102 124 1;
#X msg 138 124 -1000;
#X msg 64 124 10;
#X symbolatom 108 473 12 0 0 0 - - - 0;
#X msg 108 371 1;
#X symbolatom 282 245 12 0 0 0 - - - 0;
#X symbolatom 282 181 10 0 0 0 - - - 0;
#X msg 295 153 symbol abcde;
#X msg 261 102 symbol a;
#X msg 282 127 symbol abc;
#X msg 150 149 -1e+06;
#X msg 70 371 31;
#X msg 148 371 1e+06;
#X floatatom 530 151 0 0 0 0 - - - 0;
#X symbolatom 530 215 13 0 0 0 - - - 0;
#X msg 492 94 10;
#X floatatom 698 150 0 0 0 0 - - - 0;
#X symbolatom 698 214 13 0 0 0 - - - 0;
#X msg 698 93 1;
#X msg 734 93 -1000;
#X msg 660 93 10;
#X msg 746 118 -1e+06;
#X symbolatom 547 439 12 0 0 0 - - - 0;
#X msg 547 290 1;
#X msg 595 315 -1e+06;
#X symbolatom 715 439 14 0 0 0 - - - 0;
#X msg 715 289 1;
#X msg 763 314 -1e+06;
#X msg 583 290 100;
#X msg 751 289 100;
#X msg 677 289 31;
#X msg 509 290 31;
#X obj 102 213 makefilename [%5d];
#X msg 566 94 -100;
#X floatatom 108 406 9 0 0 0 - - - 0;
#X floatatom 547 362 9 0 0 0 - - - 0;
#X floatatom 715 362 9 0 0 0 - - - 0;
#X obj 282 213 makefilename [%-5s];
#X obj 108 445 makefilename [%05x];
#X text 45 289 The width field can alternatively take the optional preceding '0' flag \, which fills the extra characters with leading zeroes instead of spaces., f 52;
#X text 489 30 You can also combine the width field with the preceding +/space/# flags where pertinent., f 46;
#X obj 698 182 makefilename [%\ -5d];
#X obj 547 401 makefilename [%#5x];
#X obj 715 401 makefilename [%#08X];
#X symbolatom 318 477 12 0 0 0 - - - 0;
#X msg 231 364 1;
#X msg 271 364 1e+06;
#X obj 318 449 makefilename [%05s];
#X msg 317 363 symbol a;
#X msg 338 388 symbol abc;
#X listbox 318 422 10 0 0 0 - - - 0;
#X obj 530 183 makefilename [%+-5g];
#X msg 530 94 1.1;
#X msg 578 119 -1.234e+06;
#X text 43 13 The width field takes an integer that sets the number of minimum characters and adds spaces to fill them (justifying the format to the right). This works for all types but the floating point numbers '%f/%F' and '%e'/'%E' ('%g'/'%G' works). An optional '-' flag justifies to the left., f 53;
#X connect 0 0 34 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 6 0 36 0;
#X connect 8 0 39 0;
#X connect 9 0 8 0;
#X connect 10 0 8 0;
#X connect 11 0 8 0;
#X connect 12 0 0 0;
#X connect 13 0 36 0;
#X connect 14 0 36 0;
#X connect 15 0 53 0;
#X connect 17 0 15 0;
#X connect 18 0 43 0;
#X connect 20 0 18 0;
#X connect 21 0 18 0;
#X connect 22 0 18 0;
#X connect 23 0 18 0;
#X connect 25 0 37 0;
#X connect 26 0 37 0;
#X connect 28 0 38 0;
#X connect 29 0 38 0;
#X connect 30 0 37 0;
#X connect 31 0 38 0;
#X connect 32 0 38 0;
#X connect 33 0 37 0;
#X connect 34 0 1 0;
#X connect 35 0 15 0;
#X connect 36 0 40 0;
#X connect 37 0 44 0;
#X connect 38 0 45 0;
#X connect 39 0 7 0;
#X connect 40 0 5 0;
#X connect 43 0 19 0;
#X connect 44 0 24 0;
#X connect 45 0 27 0;
#X connect 47 0 52 0;
#X connect 48 0 52 0;
#X connect 49 0 46 0;
#X connect 50 0 52 0;
#X connect 51 0 52 0;
#X connect 52 0 49 0;
#X connect 53 0 16 0;
#X connect 54 0 15 0;
#X connect 55 0 15 0;
#X restore 207 519 pd width;
#X text 126 548 precision:;
#N canvas 502 451 448 268 precision 0;
#N canvas 842 141 470 564 strings 0;
#X symbolatom 214 521 8 0 0 0 - - - 0;
#X symbolatom 214 443 10 0 0 0 - - - 0;
#X symbolatom 193 223 8 0 0 0 - - - 0;
#X symbolatom 193 154 10 0 0 0 - - - 0;
#X obj 193 189 makefilename [%.4s];
#X msg 193 115 symbol abcde;
#X msg 89 115 symbol abcd;
#X msg 136 341 symbol ab;
#X msg 214 341 symbol abc;
#X msg 241 408 symbol abcde;
#X msg 229 375 symbol abcd;
#X text 40 28 For symbol srtrings (%s) \, the precision sets a maximum character limit. Below \, we have a maximum of 4 characters \, hence \, the symbol "abcde" gets truncated. There's no default precision by the way., f 58;
#X obj 214 483 makefilename [%-3.4s];
#X text 61 260 In this case \, the width field can be preceded to set a minimum of characters filled with spaces. The example below also makes use of the optional '-' flag to justify it to the left., f 48;
#X connect 1 0 12 0;
#X connect 3 0 4 0;
#X connect 4 0 2 0;
#X connect 5 0 3 0;
#X connect 6 0 3 0;
#X connect 7 0 1 0;
#X connect 8 0 1 0;
#X connect 9 0 1 0;
#X connect 10 0 1 0;
#X connect 12 0 0 0;
#X restore 159 133 pd strings;
#N canvas 793 252 531 363 integers 0;
#X symbolatom 99 278 10 0 0 0 - - - 0;
#X floatatom 260 190 7 0 0 0 - - - 0;
#X msg 260 157 -3;
#X msg 298 158 3;
#X symbolatom 260 278 10 0 0 0 - - - 0;
#X obj 99 234 makefilename [%.4d];
#X obj 260 234 makefilename [%04d];
#X text 51 25 For integer types ('%d'/'%i'/'%o'/'%u'/'%x'/'%X') \, the precision field does not set a maximum number of characters. Instead \, it sets a fixed number of digits and adds zeroes to the left as a fill. This is slightly different than setting a width field with a '0' flag. The difference is only observed for numbers of different signs as below (and without the "+" flag). Note how the width field will suppress a zero to include a minus (-) character., f 64;
#X connect 1 0 5 0;
#X connect 1 0 6 0;
#X connect 2 0 1 0;
#X connect 3 0 1 0;
#X connect 5 0 0 0;
#X connect 6 0 4 0;
#X restore 159 167 pd integers;
#N canvas 485 142 869 683 floats 0;
#X floatatom 463 291 10 0 0 0 - - - 0;
#X symbolatom 464 486 18 0 0 0 - - - 0;
#X symbolatom 480 388 18 0 0 0 - - - 0;
#X obj 464 438 makefilename [%e];
#X msg 465 187 1.23456;
#X msg 437 153 2.345e-05;
#X msg 492 254 -18;
#X obj 480 340 makefilename [%.2E];
#X msg 479 219 1.999e+07;
#X symbolatom 272 486 18 0 0 0 - - - 0;
#X floatatom 272 291 14 0 0 0 - - - 0;
#X symbolatom 292 388 18 0 0 0 - - - 0;
#X msg 272 187 1.234;
#X obj 292 340 makefilename [%.2f];
#X obj 272 438 makefilename [%f];
#X symbolatom 633 486 18 0 0 0 - - - 0;
#X floatatom 633 291 13 0 0 0 - - - 0;
#X symbolatom 673 388 18 0 0 0 - - - 0;
#X msg 633 187 1.234;
#X msg 647 219 -1800;
#X obj 633 438 makefilename [%g];
#X obj 673 340 makefilename [%.3g];
#X msg 658 254 0.000123456;
#X msg 297 254 0.000123456;
#X msg 286 219 -1800;
#X msg 241 153 2.345e-05;
#X msg 602 153 0.0001234;
#X symbolatom 83 489 18 0 0 0 - - - 0;
#X floatatom 83 294 14 0 0 0 - - - 0;
#X symbolatom 103 391 18 0 0 0 - - - 0;
#X msg 83 190 1.234;
#X msg 108 257 0.000123456;
#X msg 97 222 -1800;
#X msg 52 156 2.345e-05;
#X obj 83 441 makefilename [%a];
#X obj 103 343 makefilename [%.2A];
#X text 141 44 In the case of '%f' and '%e'/'%E' \, the precision field sets the maximum number of digits to the right of the decimal point. The same is actually true for '%a'/'%A' \, but it's the number of hexadecimal digits instead. Note that there's a default of 6 digits. Also note that this affects the resolution and can cause the number to be rounded., f 82;
#X text 151 542 For '%g'/%G' \, the precision field sets the maximum number of significant digits \, not counting leading zeros. Note that there's a default of 6 digits. Also note that this affects the resolution and can cause the number to be rounded. This setting also specifies how it chooses to show the scientific notation when positive \, as the exponent value needs to be needs to equal to or higher than the precision number (for negative values \, the scientific notation is always chosen if the exponent is less the '-4')., f 87;
#X connect 0 0 3 0;
#X connect 0 0 7 0;
#X connect 3 0 1 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 6 0 0 0;
#X connect 7 0 2 0;
#X connect 8 0 0 0;
#X connect 10 0 13 0;
#X connect 10 0 14 0;
#X connect 12 0 10 0;
#X connect 13 0 11 0;
#X connect 14 0 9 0;
#X connect 16 0 20 0;
#X connect 16 0 21 0;
#X connect 18 0 16 0;
#X connect 19 0 16 0;
#X connect 20 0 15 0;
#X connect 21 0 17 0;
#X connect 22 0 16 0;
#X connect 23 0 10 0;
#X connect 24 0 10 0;
#X connect 25 0 10 0;
#X connect 26 0 16 0;
#X connect 28 0 34 0;
#X connect 28 0 35 0;
#X connect 30 0 28 0;
#X connect 31 0 28 0;
#X connect 32 0 28 0;
#X connect 33 0 28 0;
#X connect 34 0 27 0;
#X connect 35 0 29 0;
#X restore 159 201 pd floats;
#X text 41 23 The precision field behaves differently according to the type (strings \, integers of floats). The syntax of this field is specified by a "." and is followed by the precision number. See subpatches below for the examples., f 51;
#X restore 207 549 pd precision;
#X text 127 265 - string;
#X text 128 209 - floats with or without scientific notation;
#N canvas 265 81 794 593 + 0;
#X floatatom 110 188 11 0 0 0 - - - 0;
#X symbolatom 110 263 12 0 0 0 - - - 0;
#X msg 69 105 127;
#X msg 110 105 -255;
#X msg 128 137 1e+06;
#X msg 180 137 -1e+07;
#X obj 110 225 makefilename [%+d];
#X floatatom 141 433 10 0 0 0 - - - 0;
#X symbolatom 141 516 18 0 0 0 - - - 0;
#X msg 143 328 1.23456;
#X msg 68 328 2.345e-05;
#X msg 170 393 -18;
#X msg 157 360 1.999e+07;
#X obj 141 468 makefilename [%+e];
#X symbolatom 526 191 18 0 0 0 - - - 0;
#X floatatom 526 103 8 0 0 0 - - - 0;
#X msg 540 61 -18;
#X msg 460 30 2.3e-05;
#X msg 526 29 257;
#X floatatom 560 424 10 0 0 0 - - - 0;
#X symbolatom 560 511 18 0 0 0 - - - 0;
#X msg 588 306 1.23456;
#X msg 605 377 0.99999;
#X msg 560 278 2.345e-05;
#X msg 602 338 1.1e+08;
#X msg 534 247 -1800;
#X msg 496 247 179;
#X floatatom 307 207 11 0 0 0 - - - 0;
#X symbolatom 307 282 12 0 0 0 - - - 0;
#X msg 266 124 127;
#X msg 307 124 -255;
#X msg 325 156 1e+06;
#X msg 377 156 -1e+07;
#X obj 307 244 makefilename [%\ d];
#X floatatom 328 438 10 0 0 0 - - - 0;
#X symbolatom 328 521 18 0 0 0 - - - 0;
#X msg 330 333 1.23456;
#X msg 255 333 2.345e-05;
#X msg 357 398 -18;
#X msg 344 365 1.999e+07;
#X obj 328 473 makefilename [%\ e];
#X obj 526 143 makefilename [%+f];
#X obj 560 463 makefilename [%\ G];
#X text 58 18 The "+" flag prepends a plus sign for positive signed numeric types (%d/%i/%e/%E/%f/%F/%g/%G). The space (which can be used if escaped by a backslash) uses a space for positive values., f 47;
#X connect 0 0 6 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 6 0 1 0;
#X connect 7 0 13 0;
#X connect 9 0 7 0;
#X connect 10 0 7 0;
#X connect 11 0 7 0;
#X connect 12 0 7 0;
#X connect 13 0 8 0;
#X connect 15 0 41 0;
#X connect 16 0 15 0;
#X connect 17 0 15 0;
#X connect 18 0 15 0;
#X connect 19 0 42 0;
#X connect 21 0 19 0;
#X connect 22 0 19 0;
#X connect 23 0 19 0;
#X connect 24 0 19 0;
#X connect 25 0 19 0;
#X connect 26 0 19 0;
#X connect 27 0 33 0;
#X connect 29 0 27 0;
#X connect 30 0 27 0;
#X connect 31 0 27 0;
#X connect 32 0 27 0;
#X connect 33 0 28 0;
#X connect 34 0 40 0;
#X connect 36 0 34 0;
#X connect 37 0 34 0;
#X connect 38 0 34 0;
#X connect 39 0 34 0;
#X connect 40 0 35 0;
#X connect 41 0 14 0;
#X connect 42 0 20 0;
#X restore 207 489 pd + & space;
#X text 33 438 The types can be preceded by optional fields. The sequence syntax is <flags><width><precision><type>. See details below:;
#X text 273 520 (and '-'/'0' flags);
#X text 146 488 flags*:;
#N canvas 778 67 614 727 modifiers 0;
#X text 27 31 The type modifiers (aka length specifiers) are placed before the format specifier and adjust how the data is to be interpreted regarding its size. This is only for integer and float types., f 75;
#X text 27 82 For integer types (%d \, %i \, %x \, %o \, '%u'/'%x'/'%X') \, the default is 32-bit precision. You can only represent integers correctly with this precision if you're using Pd compiled for 64 bits (aka Pd64). This is because Pd uses 32 bit floats otherwise \, which can only represent integers up to 2^24., f 75;
#X text 27 161 For float types (%a/%A \, %f \, %e/%E and %g/%G) the default is 64-bit precision \, but it gets truncated to 32-bit if you're using the single precision version of Pd. Again \, you can only truly represent these values in double precision if you're using Pd64., f 75;
#X floatatom 147 441 7 0 0 0 - - - 0;
#X symbolatom 147 511 7 0 0 0 - - - 0;
#X floatatom 327 441 7 0 0 0 - - - 0;
#X symbolatom 327 511 8 0 0 0 - - - 0;
#X text 210 503 8-bit unsigned, f 9;
#X text 396 513 16-bit signed;
#X text 96 563 By the way \, the range precision for signed integers according to its bits size is -2ˆ(bits-1) to 2ˆ(bits-1) -1 \, whereas for unsigned is 0 to 2ˆ(bits) -1 - for example \, for 32 bits we have:, f 61;
#X text 128 643 Signed: -2³¹ (-2.147.483.648) to 2³¹ - 1 (2.147.483.647), f 57;
#X text 27 229 The 'h' length modifier is used for integers to specify shorter precisions. You should probably not need this anyway since this is better suited for representing and matching this specifier to a data type and in Pd these can't be shorter than 32-bit. A single 'h' specifies 16-bit precision and 'hh' is 8-bit precision., f 75;
#X text 27 313 On the other hand \, the 'l' modifier specifies a higher precision of 64-bit for integers \, which Pd can't represent even in Pd64 as the maximum integer is 2^53 in this case., f 75;
#X text 128 663 Unsigned: 0 to -2³² - 1 (4.294.967.295), f 57;
#X text 27 368 The 'L' modifier is for float types and specifies a higher precision than 64-bits \, but Pd has a limit of 64-bits in Pd64 and 32 bits in single precision - hence \, it's pointless to use it., f 75;
#X obj 147 471 makefilename %hhu!;
#X obj 327 471 makefilename %hi!;
#X connect 3 0 15 0;
#X connect 5 0 16 0;
#X connect 15 0 4 0;
#X connect 16 0 6 0;
#X restore 226 398 pd modifiers;
#X text 111 399 type modifiers:;
#X text 50 20 This is a listing of possible printf format types. Open subpatches for more details and examples., f 50;
#X text 100 585 * the apostrophe (') flag is not supported;
#X text 128 70 - floats in hexadecimal;
#N canvas 784 131 547 495 %a/%A 0;
#X floatatom 258 360 12 0 0 0 - - - 0;
#X symbolatom 258 456 18 0 0 0 - - - 0;
#X msg 257 213 1.23456;
#X msg 278 245 2.345e-05;
#X msg 300 274 1.1e+08;
#X msg 170 185 -1800;
#X msg 132 185 179;
#X msg 303 313 0.999999;
#X symbolatom 108 456 18 0 0 0 - - - 0;
#X msg 221 185 0.000123456;
#X obj 258 408 makefilename [%A];
#X obj 108 408 makefilename [%a];
#X text 38 24 %a/%A - hexadecimal floating-point, f 68;
#X text 34 55 This format specifier allows you to represent a floating point number in hexadecimal form. The '%a' or '%A' specify respectively whether the the characters are lower or upper case. Also \, it prints 'NAN' and 'INF' in all CAPS for %A \, while '%a' uses lowercase. The number is preceded with "0x" (if %a) or "0X" (if %A). The 'p' character represents the power of 2 exponent (so it separates the fractional hexadecimal part from the exponent in base 2)., f 67;
#X connect 0 0 10 0;
#X connect 0 0 11 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 6 0 0 0;
#X connect 7 0 0 0;
#X connect 9 0 0 0;
#X connect 10 0 1 0;
#X connect 11 0 8 0;
#X restore 59 71 pd %a/%A;
#X text 127 321 - unsigned integer in hexadecimal;
#N canvas 705 257 464 487 %f/%F 0;
#X symbolatom 248 392 18 0 0 0 - - - 0;
#X floatatom 248 305 8 0 0 0 - - - 0;
#X msg 248 201 1.234;
#X msg 262 233 -18;
#X msg 217 170 2.3e-05;
#X msg 273 268 0.997;
#X obj 248 347 makefilename [%f];
#X msg 173 170 1;
#X symbolatom 85 392 18 0 0 0 - - - 0;
#X obj 85 305 expr pow(-1 \, 2.3);
#X obj 85 272 bng 21 250 50 0 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000;
#X text 30 61 This format specifier allows you to format a float into a symbol without scientific notation. Note that there's a default precision of 6 digits after the decimal point. You can change this precision as shown later. As in 'e'/'E' \, trailing zeros are always shown. The '%F' variant just prints 'NAN' and 'INF' in all CAPS \, while '%f' uses lowercase.;
#X text 29 30 %f/%F - decimal floating point:;
#X obj 85 347 makefilename [%F];
#X connect 1 0 6 0;
#X connect 2 0 1 0;
#X connect 3 0 1 0;
#X connect 4 0 1 0;
#X connect 5 0 1 0;
#X connect 6 0 0 0;
#X connect 7 0 1 0;
#X connect 9 0 6 0;
#X connect 9 0 13 0;
#X connect 10 0 9 0;
#X connect 13 0 8 0;
#X restore 59 182 pd %f/%F;
#X restore 392 379 pd possible_types_&_syntax;
#X msg 48 209 set cat\ %d.wav;
#X obj 43 263 makefilename dog\ %d.aif;
#X obj 392 249 makefilename dog\ %s.aif;
#X text 388 154 SUBSTITUTING A SYMBOL:;
#X text 39 154 SUBSTITUTING AN INTEGER NUMBER:;
#N canvas 676 114 558 284 reference 0;
#X obj 8 52 cnv 5 540 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 7 263 cnv 5 540 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 7 134 cnv 5 540 5 empty empty OUTLET: 8 18 0 13 #202020 #000000 0;
#X obj 46 19 makefilename;
#X text 144 19 - format a "name" with a variable field;
#X text 121 148 symbol - formatted symbol., f 47;
#X obj 7 179 cnv 5 540 5 empty empty ARGUMENT: 8 18 0 13 #202020 #000000 0;
#X text 52 213 1) symbol -;
#X text 156 64 float - input to variable field., f 38;
#X text 149 83 symbol - input to variable field., f 39;
#X text 107 103 set <symbol> - format string with specifiers.;
#X text 136 213 format string with specifiers ('%a' \, '%A' \, '%c' \, '%d' \, '%i \, %e \, %E \, %f \, %g \, %G \, %o \, %s \, %u \, %x \, %X and %p)., f 54;
#X restore 456 17 pd reference;
#X text 548 17 <= click;
#X obj 7 53 cnv 1 610 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X obj 6 428 cnv 1 610 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 67 182 <-- numbers replace "%d" in string;
#X text 164 208 <-- "set" message replaces format, f 18;
#X text 221 262 <-- argument is format string, f 15;
#X text 272 366 More details -->;
#X text 116 17 - format a symbol "name" with a variable field;
#X text 18 442 see also:;
#X obj 94 443 symbol;
#X text 495 210 <-- symbols replace "%s", f 12;
#X obj 24 365 makefilename %d;
#X symbolatom 24 395 5 0 0 0 - - - 0;
#X text 67 395 <-- number converted to symbol;
#X text 151 442 and string functions in;
#X obj 324 442 expr;
#X text 163 299 (Note you can use backslashes to escape and insert a space character in the symbol), f 29;
#X text 21 65 The [makefilename] object generates symbols according to a format string \, for use as a series of filenames \, table names \, or whatnot. You can plug in a variable number or symbol by using different types in the string ("such as %s" \, "%c" \, "%d" \, "%X and others - see subpatch below with all possible types). Each object can have only one variable pattern \, but you can cascade objects for multiple substitutions., f 82;
#X text 398 442 updated for Pd version 0.56-0;
#X connect 0 0 12 0;
#X connect 0 0 28 0;
#X connect 1 0 13 0;
#X connect 2 0 13 0;
#X connect 4 0 12 0;
#X connect 5 0 6 0;
#X connect 7 0 8 0;
#X connect 11 0 12 0;
#X connect 12 0 5 0;
#X connect 13 0 7 0;
#X connect 28 0 29 0;
