#N canvas 436 23 621 602 12;
#X obj 139 299 bng 19 250 50 0 empty empty empty 8 -8 0 10 #dfdfdf #000000 #000000;
#X floatatom 174 412 4 0 0 0 - - - 0;
#X msg 218 308 set \$1;
#X floatatom 218 286 4 0 9 0 - - - 0;
#X floatatom 174 300 4 -10 10 0 - - - 0;
#X obj 174 358 hradio 20 1 0 6 empty empty Radio 65 -10 0 15 #b8b8b8 #0400ff #780000 0;
#N canvas 812 113 508 505 old-behavior 0;
#X floatatom 114 432 5 0 0 0 - - - 0;
#X msg 71 152 \; pd compatibility 0.45;
#X msg 250 153 \; pd compatibility 0.46;
#X text 88 190 Old "compatible" behavior, f 16;
#X text 257 190 Mew "correct" behavior;
#X obj 114 381 hradio 19 1 0 8 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000 0;
#X floatatom 288 432 5 0 0 0 - - - 0;
#X obj 288 318 int;
#X obj 288 344 clip 0 8;
#X floatatom 224 262 5 -10 10 0 - - - 0;
#X msg 345 262 -12;
#X msg 310 262 2.7;
#X msg 272 262 13;
#X msg 113 262 set 1.7;
#X floatatom 133 349 5 -10 10 0 - - - 0;
#X msg 178 319 -12;
#X msg 143 319 2.7;
#X msg 133 291 13;
#X obj 73 294 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X text 42 19 Prior to Pd version 0.46 \, values sent to IEM GUIs were restricted to the control's own values before passing them through to the output. This behavior is changed in 0.46 to allow any number through. You can toggle back and forth between the two behaviors using the messages boxes below. If you want to get the behavior in an up-to-date patch \, you can use "int" and "clip" objects to quantize and restrict the range of numbers. Note this also affects the "set" message.;
#X obj 288 381 hradio 19 1 0 8 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000 0;
#X connect 5 0 0 0;
#X connect 7 0 8 0;
#X connect 8 0 20 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 5 0;
#X connect 14 0 5 0;
#X connect 15 0 14 0;
#X connect 16 0 14 0;
#X connect 17 0 14 0;
#X connect 18 0 5 0;
#X connect 20 0 6 0;
#X restore 487 466 pd old-behavior;
#X obj 17 18 hradio 18 1 0 8 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 0;
#X obj 174 441 print hradio;
#X text 273 486 (c) musil@iem.kug.ac.at;
#X text 309 502 IEM KUG \, Graz \, Austria \, 2002, f 14;
#X text 28 565 see also:;
#X text 49 487 This object is part of the "iemguis" library \, natively included in Pd version 0.34., f 28;
#X text 306 353 Right click for properties., f 15;
#N canvas 789 65 625 556 position 0;
#X floatatom 142 146 4 0 1000 0 - - - 0;
#X obj 191 173 t b f;
#X floatatom 191 146 5 0 500 0 - - - 0;
#X msg 142 243 pos \$1 \$2;
#X text 63 146 x-position;
#X text 235 145 y-position;
#X msg 264 183 delta 1 0;
#X text 337 182 increase x by 1;
#X msg 274 205 delta -1 0;
#X text 353 204 decrease x by 1;
#X msg 286 239 delta 0 1;
#X msg 292 261 delta 0 -1;
#X text 363 238 increase y by 1;
#X text 376 263 decrease y by 1;
#X msg 301 293 delta 1 1;
#X text 376 294 increase both by 1;
#X text 394 315 decrease both by -1;
#X msg 308 315 delta -1 -1;
#X obj 142 202 pack 265 350;
#X text 293 66 The 'delta' message changes the position of the object by a difference amount. It takes a list of x/y delta in pixels., f 40;
#X text 40 66 The 'pos' message takes a list of x/y coordinates in pixels and sets the objects's position., f 33;
#X text 159 19 You can also set and change the position of the object in the patch. Check below:, f 41;
#X obj 265 350 hradio 18 1 0 8 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 0;
#X connect 0 0 18 0;
#X connect 1 0 18 0;
#X connect 1 1 18 1;
#X connect 2 0 1 0;
#X connect 3 0 22 0;
#X connect 6 0 22 0;
#X connect 8 0 22 0;
#X connect 10 0 22 0;
#X connect 11 0 22 0;
#X connect 14 0 22 0;
#X connect 17 0 22 0;
#X connect 18 0 3 0;
#X restore 510 321 pd position;
#N canvas 465 144 358 398 properties 0;
#N canvas 726 23 640 573 colors 0;
#X floatatom 72 243 3 0 29 0 - - - 0;
#X floatatom 108 243 3 0 29 0 - - - 0;
#X floatatom 177 248 3 0 29 0 - - - 0;
#X text 104 223 front;
#X text 170 223 label;
#X obj 108 272 t b f;
#X obj 177 274 t b f;
#X msg 72 342 color \$1 \$2 \$3;
#X obj 72 305 pack 0 22 22, f 20;
#X text 181 342 presets;
#X symbolatom 507 339 9 0 0 0 - - - 0;
#X symbolatom 421 338 9 0 0 0 - - - 0;
#X symbolatom 335 338 9 0 0 0 - - - 0;
#X obj 475 369 t b s;
#X obj 389 369 t b s;
#X obj 258 223 loadbang;
#X obj 335 407 pack symbol symbol symbol;
#X msg 335 436 color \$1 \$2 \$3;
#X msg 258 257 list #ffffff #000000 #000000, f 7;
#X text 21 223 background;
#X text 444 437 RGB in hexadecimal;
#X text 67 16 The 'color' message takes a list of three values to set background \, front and label colors \, respectively. Integers from 0 to 29 represent the 30 preset colors found in the properties window \, values above are wrapped., f 77;
#X text 68 67 Negative integers were used to encode RGB values (and that still works for backwards compatibility). But since Pd 0.47-0 \, you can set colors with hexadecimal RGB symbol values \, which are followed by "#"., f 77;
#X text 346 132 Set RGB values in the sliders;
#N canvas 1016 107 390 482 label 0;
#X obj 102 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #0800fc #fcfcfc #000000 0 1;
#X obj 109 225 t b f;
#X obj 81 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #00fc00 #000000 #000000 0 1;
#X obj 80 341 pack s s s;
#X obj 61 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #fc0000 #000000 #000000 0 1;
#X obj 81 250 t b f;
#X obj 147 257 makefilename %02x;
#X obj 113 284 makefilename %02x;
#X obj 74 311 makefilename %02x;
#X text 66 56 label;
#X obj 80 406 outlet;
#X msg 80 370 symbol #\$1\$2\$3;
#X obj 161 185 loadbang;
#X msg 161 217 0;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 1 1 6 0;
#X connect 2 0 5 0;
#X connect 3 0 11 0;
#X connect 4 0 8 0;
#X connect 5 0 4 0;
#X connect 5 1 7 0;
#X connect 6 0 3 2;
#X connect 7 0 3 1;
#X connect 8 0 3 0;
#X connect 11 0 10 0;
#X connect 12 0 13 0;
#X connect 13 0 6 0;
#X connect 13 0 7 0;
#X coords 0 -1 1 1 80 170 2 50 50;
#X restore 507 157 pd label;
#N canvas 965 149 390 482 label 0;
#X obj 102 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #0800fc #fcfcfc #000000 0 1;
#X obj 109 225 t b f;
#X obj 81 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #00fc00 #000000 #000000 0 1;
#X obj 74 341 pack s s s;
#X obj 61 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #fc0000 #000000 #000000 0 1;
#X obj 81 250 t b f;
#X obj 146 257 makefilename %02x;
#X obj 112 284 makefilename %02x;
#X obj 74 311 makefilename %02x;
#X obj 74 406 outlet;
#X text 69 56 front;
#X msg 74 370 symbol #\$1\$2\$3;
#X obj 177 168 loadbang;
#X msg 177 200 0;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 1 1 6 0;
#X connect 2 0 5 0;
#X connect 3 0 11 0;
#X connect 4 0 8 0;
#X connect 5 0 4 0;
#X connect 5 1 7 0;
#X connect 6 0 3 2;
#X connect 7 0 3 1;
#X connect 8 0 3 0;
#X connect 11 0 9 0;
#X connect 12 0 13 0;
#X connect 13 0 6 0;
#X connect 13 0 7 0;
#X coords 0 -1 1 1 80 170 2 50 50;
#X restore 421 157 pd label;
#N canvas 886 125 390 482 label 0;
#X obj 102 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #0800fc #fcfcfc #000000 0 1;
#X obj 109 225 t b f;
#X obj 81 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #00fc00 #000000 #000000 0 1;
#X obj 61 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #fc0000 #000000 #000000 0 1;
#X obj 81 250 t b f;
#X obj 221 257 makefilename %02x;
#X obj 141 284 makefilename %02x;
#X obj 61 321 makefilename %02x;
#X obj 61 416 outlet;
#X text 52 56 background;
#X msg 61 380 symbol #\$1\$2\$3;
#X obj 176 59 loadbang;
#X msg 176 91 set 255;
#X obj 176 176 route set;
#X obj 61 351 pack symbol symbol symbol;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 1 1 5 0;
#X connect 2 0 4 0;
#X connect 3 0 7 0;
#X connect 4 0 3 0;
#X connect 4 1 6 0;
#X connect 5 0 14 2;
#X connect 6 0 14 1;
#X connect 7 0 14 0;
#X connect 10 0 8 0;
#X connect 11 0 12 0;
#X connect 12 0 3 0;
#X connect 12 0 2 0;
#X connect 12 0 0 0;
#X connect 12 0 13 0;
#X connect 13 0 5 0;
#X connect 13 0 6 0;
#X connect 14 0 10 0;
#X coords 0 -1 1 1 80 170 2 50 50;
#X restore 335 157 pd label;
#N canvas 720 84 504 483 old_way 0;
#N canvas 1136 244 402 495 label 0;
#X obj 102 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #0800fc #fcfcfc #000000 0 1;
#X obj 81 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #00fc00 #000000 #000000 0 1;
#X obj 61 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #fc0000 #000000 #000000 0 1;
#X text 66 56 label;
#X obj 59 361 expr -($f1 * 65536 + $f2 * 256 + $f3 + 1);
#X obj 311 319 t b f;
#X obj 169 319 t b f;
#X obj 59 413 outlet;
#X connect 0 0 5 0;
#X connect 1 0 6 0;
#X connect 2 0 4 0;
#X connect 4 0 7 0;
#X connect 5 0 4 0;
#X connect 5 1 4 2;
#X connect 6 0 4 0;
#X connect 6 1 4 1;
#X coords 0 -1 1 1 80 170 2 50 50;
#X restore 341 139 pd label;
#X text 180 114 Set RGB values in the sliders;
#N canvas 955 131 392 476 label 0;
#X obj 102 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #0800fc #fcfcfc #000000 0 1;
#X obj 81 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #00fc00 #000000 #000000 0 1;
#X obj 61 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #fc0000 #000000 #000000 0 1;
#X obj 61 361 expr -($f1 * 65536 + $f2 * 256 + $f3 + 1);
#X obj 313 269 t b f;
#X obj 171 269 t b f;
#X obj 61 413 outlet;
#X text 52 56 background;
#X obj 180 83 loadbang;
#X msg 202 134 set 255;
#X msg 181 195 255 255 255;
#X connect 0 0 4 0;
#X connect 1 0 5 0;
#X connect 2 0 3 0;
#X connect 3 0 6 0;
#X connect 4 0 3 0;
#X connect 4 1 3 2;
#X connect 5 0 3 0;
#X connect 5 1 3 1;
#X connect 8 0 9 0;
#X connect 8 0 10 0;
#X connect 9 0 0 0;
#X connect 9 0 1 0;
#X connect 9 0 2 0;
#X connect 10 0 3 0;
#X coords 0 -1 1 1 80 170 2 50 50;
#X restore 169 139 pd label;
#N canvas 1096 192 402 495 label 0;
#X obj 102 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #0800fc #fcfcfc #000000 0 1;
#X obj 81 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #00fc00 #000000 #000000 0 1;
#X obj 61 80 vsl 15 128 0 255 0 0 empty empty empty 0 -9 0 10 #fc0000 #000000 #000000 0 1;
#X obj 59 361 expr -($f1 * 65536 + $f2 * 256 + $f3 + 1);
#X obj 311 319 t b f;
#X obj 169 319 t b f;
#X obj 59 413 outlet;
#X text 66 56 front;
#X connect 0 0 4 0;
#X connect 1 0 5 0;
#X connect 2 0 3 0;
#X connect 3 0 6 0;
#X connect 4 0 3 0;
#X connect 4 1 3 2;
#X connect 5 0 3 0;
#X connect 5 1 3 1;
#X coords 0 -1 1 1 80 170 2 50 50;
#X restore 255 139 pd label;
#X text 17 168 Open subpatches for the conversion ====>, f 20;
#X msg 229 376 color -1.67772e+07 -1 -1;
#N canvas 574 194 328 335 pack 0;
#X obj 73 47 inlet;
#X obj 123 47 inlet;
#X obj 206 47 inlet;
#X msg 73 152 color \$1 \$2 \$3;
#X obj 206 85 t b f;
#X obj 123 85 t b f;
#X obj 73 123 pack float -1 -1, f 24;
#X obj 73 187 list prepend set;
#X obj 73 213 list trim;
#X obj 73 246 t b a;
#X obj 73 283 outlet;
#X connect 0 0 6 0;
#X connect 1 0 5 0;
#X connect 2 0 4 0;
#X connect 3 0 7 0;
#X connect 4 0 6 0;
#X connect 4 1 6 2;
#X connect 5 0 6 0;
#X connect 5 1 6 1;
#X connect 6 0 3 0;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 9 0 10 0;
#X connect 9 1 10 0;
#X restore 229 340 pd pack;
#X f 8;
#X text 90 24 The RGB color scheme can also be encoded \, for backwards compatibility \, as negative inetegers. For "R" (red) \, "G" (green) & "B" (blue) values from 0 to 255 \, the conversion formula is \; float = -(R * 65536 + G * 256 + B + 1)., f 47;
#X obj 229 421 hradio 19 1 1 8 empty empty Label -70 10 1 25 #ffffff #000000 #000000 1;
#X connect 0 0 6 2;
#X connect 2 0 6 0;
#X connect 3 0 6 1;
#X connect 5 0 8 0;
#X connect 6 0 5 0;
#X restore 95 526 pd old_way;
#X text 67 468 open subpatch below for the old way of encoding RGB values., f 20;
#X text 68 450 See also:;
#X obj 335 498 hradio 19 1 1 8 empty empty Label 15 38 1 25 #ffffff #000000 #000000 1;
#X text 61 156 Open subpatches for the conversion from RGB to hexadecimal ------------->, f 38;
#X connect 0 0 8 0;
#X connect 1 0 5 0;
#X connect 2 0 6 0;
#X connect 5 0 8 0;
#X connect 5 1 8 1;
#X connect 6 0 8 0;
#X connect 6 1 8 2;
#X connect 7 0 30 0;
#X connect 8 0 7 0;
#X connect 10 0 13 0;
#X connect 11 0 14 0;
#X connect 12 0 16 0;
#X connect 13 0 16 0;
#X connect 13 1 16 2;
#X connect 14 0 16 0;
#X connect 14 1 16 1;
#X connect 15 0 18 0;
#X connect 16 0 17 0;
#X connect 17 0 30 0;
#X connect 18 0 16 0;
#X connect 24 0 10 0;
#X connect 25 0 11 0;
#X connect 26 0 12 0;
#X coords 0 0 1 1 85 60 0;
#X restore 160 249 pd colors;
#N canvas 849 67 517 295 size 0;
#X floatatom 74 58 3 10 60 0 - - - 0;
#X obj 74 132 hradio 18 1 0 6 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000 0;
#X msg 74 92 size \$1;
#X text 36 57 size;
#X text 153 57 The size message sets the object's cell size. The value represents the width in pixels for each side of the square., f 39;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X restore 174 109 pd size;
#N canvas 681 76 576 427 label 0;
#X msg 78 284 label \$1;
#X floatatom 225 166 4 0 3 0 - - - 0;
#X obj 267 193 t b f;
#X floatatom 267 166 5 5 50 0 - - - 0;
#X msg 225 263 label_font \$1 \$2;
#X text 187 165 type;
#X text 311 164 size;
#X text 246 94 DejaVu Sans Mono;
#X text 246 112 Helvetica;
#X text 246 132 Times;
#X msg 90 252 symbol empty;
#X floatatom 379 182 4 -150 200 0 - - - 0;
#X obj 421 209 t b f;
#X floatatom 421 182 5 -150 150 0 - - - 0;
#X msg 379 279 label_pos \$1 \$2;
#X text 361 181 x;
#X text 465 180 y;
#X text 374 158 label offset:;
#X msg 58 187 symbol label;
#X msg 78 215 symbol my\ label;
#X text 85 26 The 'label' message sets the label symbol \, setting it to "empty" clears it. The 'label_font' message sets font type and size and 'label_pos' sets the x/y coordinates., f 54;
#X obj 225 363 hradio 19 1 1 8 empty empty label 154 9 0 20 #dfdfdf #000000 #000000 4;
#X obj 379 237 pack 150 9, f 11;
#X obj 225 93 vradio 19 1 0 3 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000 0;
#X obj 225 222 pack 0 20, f 11;
#X connect 0 0 21 0;
#X connect 1 0 24 0;
#X connect 2 0 24 0;
#X connect 2 1 24 1;
#X connect 3 0 2 0;
#X connect 4 0 21 0;
#X connect 10 0 0 0;
#X connect 11 0 22 0;
#X connect 12 0 22 0;
#X connect 12 1 22 1;
#X connect 13 0 12 0;
#X connect 14 0 21 0;
#X connect 18 0 0 0;
#X connect 19 0 0 0;
#X connect 22 0 14 0;
#X connect 23 0 1 0;
#X connect 24 0 4 0;
#X restore 167 221 pd label;
#N canvas 904 91 445 462 init 0;
#X msg 109 183 init \$1;
#X obj 109 151 tgl 18 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X text 132 151 init on/off;
#X text 46 29 The 'init' message takes a float and sets to 'init mode' (if different than zero) or 'no init' (if equal to zero - the default value)., f 46;
#X obj 109 265 print hradio-init;
#X obj 109 222 hradio 18 1 1 8 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000 4;
#X text 46 76 If in 'init mode' \, when loading the patch \, the objects sends its holding value from when the patch was last saved., f 46;
#X obj 299 407 savestate;
#X text 151 407 see also:;
#X text 41 300 Therefore \, this actually a state saving mechanism and also a "loadbang" feature. But as a savestating mechanism it is limited because it can't work for abstractions. In order to deal with state saving in abstractions you have to rely on the [savestate] object., f 52;
#X obj 229 406 loadbang;
#X connect 0 0 5 0;
#X connect 1 0 0 0;
#X connect 5 0 4 0;
#X restore 174 137 pd init;
#N canvas 289 38 817 474 send-receive 0;
#X floatatom 53 182 5 0 8 0 - - - 0;
#X floatatom 53 310 5 0 0 0 - - - 0;
#X text 42 102 The 'send' and 'receive' messages take a symbol to set \, respectively \, the send and receive symbol. If you set these to "empty" \, the symbols are cleared., f 50;
#X text 42 26 The object can have a send and receive symbol \, in which cases the inlet/outlet are visually hidden (but still functional in the patch). This way \, the object can communicate to [send] and [receive] objects., f 50;
#X text 46 379 Note how you need to escape dollar signs with backslashes to set something like "\$0-x". But the backslash is not needed if you set it directly via the properties window., f 50;
#X obj 53 271 r \$0-hradio_snd;
#X obj 53 216 s \$0-hradio_rcv;
#X msg 214 203 receive empty;
#X msg 245 267 send empty;
#X msg 197 178 receive \\\$0-hradio_rcv;
#X msg 236 243 send \\\$0-hradio_snd;
#X obj 214 310 hradio 19 1 0 8 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000 0;
#X text 458 35 Note how you need to escape dollar signs with backslashes to set something like "\$0-x". But the backslash is not needed if you set it directly via the properties window., f 45;
#X floatatom 714 369 5 0 0 0 - - - 0;
#X floatatom 710 257 5 0 8 0 - - - 0;
#X obj 710 283 s \$0-radio;
#X obj 714 345 r \$0-radio;
#X obj 672 254 vradio 19 1 0 8 \$0-radio \$0-radio empty 0 -8 0 10 #dfdfdf #000000 #000000 0;
#X text 459 119 Feedback protection: iemguis can have the same name for both the send and receive symbols. This works without 'stack overflow' errors because they have feedback protection. See example below., f 44;
#X text 442 222 WARNING:;
#X text 448 349 You probably also just want to send it numbers \, not configuration changes (like colors). If you need to also use the inlet and/or outlet \, DON'T rely on feedback protection!, f 29;
#X text 448 246 Feedback protection comes at a cost. You should NOT use inlets/outlets to either send values to or get them from radio buttons \, just rely on the [send] and [receive] objects., f 29;
#X connect 0 0 6 0;
#X connect 5 0 1 0;
#X connect 7 0 11 0;
#X connect 8 0 11 0;
#X connect 9 0 11 0;
#X connect 10 0 11 0;
#X connect 14 0 15 0;
#X connect 16 0 13 0;
#X restore 118 193 pd send-receive;
#N canvas 896 162 466 340 loading-args 0;
#X text 60 123 For instance \, below \, we have \$0 used in the label field \, which gets expanded to the patch ID number. Using something like "\$1" is useful if you're using the object in an abstraction \, then you can load a value passed as an argument into a parameter., f 49;
#X text 60 23 Note that all the parameters that you can set by inserting a number or symbol into a field in the properties window can also load dollar sign arguments (\$0 \, \$1 \, \$2 \, and so on). Namely \, these parameters are: width \, height \, lower and upper range \, send/receive symbols \, label \, label offset and font size., f 49;
#X obj 176 237 hradio 20 1 0 6 empty empty \$0-Label 10 34 0 15 #b8b8b8 #9c0000 #0400fc 0;
#X restore 142 325 pd loading-args;
#X text 37 294 Loading arguments in properties:;
#X text 46 13 All the parameters from the properties window can be set via messages as well. See examples and more details on each parameter in the subpatches below:, f 39;
#N canvas 750 194 481 215 number 0;
#X msg 84 58 number \$1;
#X floatatom 84 29 4 1 18 0 - - - 0;
#X obj 84 97 hradio 18 1 0 8 empty empty empty 0 -8 0 10 #dfdfdf #000000 #000000 0;
#X text 176 37 You can set the number of cells with the 'number' message, f 31;
#X connect 0 0 2 0;
#X connect 1 0 0 0;
#X restore 159 165 pd number;
#X restore 496 295 pd properties;
#X text 34 227 Insert it from the Put menu (named as "hradio") or its shortcut. Alternatively \, create it by typing "hradio" into an object box. Right click for properties (to set size \, colors \, labels \, etc)., f 79;
#X text 339 416 COMPATIBILITY NOTE: The behavior changed in Pd 0.46! Check details and how to get it back:, f 33;
#N canvas 761 61 435 279 switch-example 0;
#X obj 66 163 route 0 1 2 3;
#X obj 66 195 tgl 18 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 88 195 tgl 18 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 110 195 tgl 18 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 132 195 tgl 18 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 43 83 t f f b;
#X obj 66 129 f -1;
#X text 193 65 Here's an example on how to use this object to control different toggle switches. Whenever there's a new value \, it first turns the previous toggle off before turning the new one on., f 29;
#X obj 43 40 hradio 18 1 0 4 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0;
#X connect 0 0 1 0;
#X connect 0 1 2 0;
#X connect 0 2 3 0;
#X connect 0 3 4 0;
#X connect 5 0 6 1;
#X connect 5 1 6 0;
#X connect 5 2 6 0;
#X connect 6 0 0 0;
#X connect 8 0 5 0;
#X restore 468 347 pd switch-example;
#X obj 102 566 all_guis;
#N canvas 647 101 665 428 reference 0;
#X obj 8 52 cnv 5 640 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 7 400 cnv 5 640 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 39 20 hradio 18 1 0 8 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 0;
#X obj 7 359 cnv 5 640 5 empty empty OUTLET: 8 18 0 13 #202020 #000000 0;
#X text 131 162 label <symbol> - sets label symbol., f 72;
#X text 55 182 label_font <float \, float> -;
#X text 62 214 label_pos <float \, float> -;
#X text 250 213 sets label position., f 55;
#X text 138 263 send <symbol> - sets send symbol., f 71;
#X text 110 282 receive <symbol> - sets receive symbol., f 75;
#X text 146 232 color <list> -;
#X text 250 231 first element sets background color and third sets font color (either floats or symbols in hexadecimal format).;
#X text 250 181 sets font type <0: DejaVu Sans Mono \, 1: Helvetica \, 2: Times> and font size., f 50;
#X text 103 301 pos <float \, float> - sets position in the patch canvas., f 76;
#X text 90 320 delta <float \, float> -;
#X text 250 319 changes the position by a x/y delta in pixels., f 55;
#X text 194 65 float - set and output number., f 63;
#X text 145 84 size <float> - sets the cell size in pixels., f 70;
#X text 131 123 number <float> - sets number of cells., f 72;
#X text 145 142 init <float> - non zero sets to init mode., f 70;
#X text 181 372 float - cell number (indexed from 0)., f 63;
#X text 96 102 orientation <float> - non zero sets to vertical \, zero sets to horizontal., f 77;
#X text 189 20 - Radio Buttons;
#X restore 446 18 pd reference;
#X text 537 18 <= click;
#X obj 4 55 cnv 1 610 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 405 567 updated for Pd version 0.53;
#X text 202 388 horizontal;
#X obj 34 283 vradio 20 1 0 6 empty empty empty 65 -10 0 15 #e6b2b2 #ac0402 #780000 0;
#X floatatom 34 412 4 0 0 0 - - - 0;
#X obj 34 441 print vradio;
#X text 76 373 the cells.;
#X text 57 358 <-- click on -->;
#N canvas 630 35 534 641 deprecated 0;
#X obj 73 593 tgl 15 0 dummy-snd dummy-rcv empty 8 -8 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 129 457 hdl 20 1 0 8 empty empty empty 20 -8 0 10 #dfdfdf #000000 #fcac44 0;
#X listbox 73 501 8 0 0 0 - - - 0;
#X obj 89 533 print deprecated-radio;
#X obj 92 593 tgl 15 0 dummy-snd dummy-rcv empty 8 -8 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 112 593 tgl 15 0 dummy-snd dummy-rcv empty 8 -8 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 132 593 tgl 15 0 dummy-snd dummy-rcv empty 8 -8 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 152 593 tgl 15 0 dummy-snd dummy-rcv empty 8 -8 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 171 593 tgl 15 0 dummy-snd dummy-rcv empty 8 -8 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 191 593 tgl 15 0 dummy-snd dummy-rcv empty 8 -8 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 211 593 tgl 15 0 dummy-snd dummy-rcv empty 8 -8 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 73 231 vdl 19 1 0 8 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000 0;
#X text 37 104 The difference is that this version outputs a list with the cell number and its state (1 for on \, 0 for off). Whenever a new value is selected \, it first sends a list with the last selected value followed by 0 to indicate it's now off. You can use this to feed a route object and connect to toggles. You can check the parent patch for the [pd switch-example] which implements the same feature with the new version., f 66;
#X msg 129 378 single_change;
#X msg 143 413 double_change;
#X text 250 414 default behavior;
#X text 112 264 In this version you have special messages to change the behaviour. Setting it to "single change" makes it behave more like the new [vradio] object \, where it doesn't turn off the last selected value before sending the new one - but it still sends a list with the cell number and 'on' value., f 51;
#X obj 73 565 route 0 1 2 3 4 5 6 7, f 23;
#X text 104 233 <-- [vdl] (deprecated);
#X text 300 456 <-- [hdl] (deprecated);
#X text 37 24 If created as [hdl] (for horizontal) or as [vdl] (for vertical) \, you get an old version of this object. This has been deprecated in Pd 0.36 \, which now loads a new version from the Put Menu \, but this version is kept for backwards compatibility in the unlikely event some very old patch uses it (but please \, don't use this!), f 66;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 2 0 17 0;
#X connect 11 0 2 0;
#X connect 13 0 1 0;
#X connect 14 0 1 0;
#X connect 17 0 0 0;
#X connect 17 1 4 0;
#X connect 17 2 5 0;
#X connect 17 3 6 0;
#X connect 17 4 7 0;
#X connect 17 5 8 0;
#X connect 17 6 9 0;
#X connect 17 7 10 0;
#X restore 501 495 pd deprecated version;
#X f 13;
#X text 167 18 - [hradio]/[vradio]: Radio Buttons;
#X obj 4 553 cnv 1 610 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 34 68 The radio button is a GUI (Graphical User Interface) that sends numbers. Click on its cells to output corresponding values. Incoming floats set the value and are passed through (even if outside the range). The 'set' message only sets the value without output. A bang message sends the internal value., f 79;
#X text 34 133 Insert it from the Put menu (named as "Vradio" or "Hradio") or its shortcuts for the Vertical and Horizontal versions respectively. Alternatively \, create it by typing "vradio" or "hradio" (for vertical) and "hslider"(for horizontal) into an object box. You can change the orientation from vertical to horizontal and vice versa via the orientation message. Also right click for properties to set size \, colors \, labels and more., f 79;
#N canvas 730 23 535 369 orientation 0;
#X msg 186 126 orientation \$1;
#X obj 186 94 tgl 19 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000 0 1;
#X text 70 19 The 'orientation' message changes the object from vertical to horizontal and vice versa. A non zero sets to vertical and zero sets to horizontal.;
#X obj 186 170 hradio 19 1 0 8 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000 0;
#X connect 0 0 3 0;
#X connect 1 0 0 0;
#X restore 336 300 pd orientation;
#X connect 0 0 5 0;
#X connect 1 0 8 0;
#X connect 2 0 5 0;
#X connect 3 0 2 0;
#X connect 4 0 5 0;
#X connect 5 0 1 0;
#X connect 25 0 26 0;
#X connect 26 0 27 0;
