#N canvas 560 45 541 519 12;
#X obj 25 10 inlet;
#X obj 70 10 inlet~;
#X obj 25 38 outlet;
#X obj 75 38 outlet~;
#X obj 273 288 print~;
#X obj 273 208 sig~ 12;
#X floatatom 31 212 5 0 0 0 - - - 0;
#X floatatom 31 264 5 0 0 0 - - - 0;
#X text 27 191 messages in and out;
#X text 243 185 audio in and out;
#X text 19 485 see also:;
#X obj 93 486 block~;
#X obj 285 266 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
#000000 #000000;
#N canvas 486 122 538 582 up/downsampling 0;
#X obj 37 395 print~;
#X obj 55 369 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000
#000000;
#X obj 133 397 print~;
#X obj 151 371 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
#000000 #000000;
#X obj 230 395 print~;
#X obj 248 369 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
#000000 #000000;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$0-tab 64 float 1;
#A 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
#X coords 0 1 63 -1 200 140 1;
#X restore 270 175 graph;
#X obj 362 360 s \$0-tab;
#X msg 362 333 const 0 \, 0 0 1;
#X obj 185 243 print~;
#X obj 185 218 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
#000000 #000000;
#X obj 33 191 tabreceive~ \$0-tab;
#N canvas 162 294 571 346 test-subpatch-upsampled 0;
#X obj 40 17 block~ 128 1 2;
#X obj 183 200 print~;
#X obj 201 174 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
#000000 #000000;
#X obj 43 204 print~;
#X obj 61 178 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000
#000000;
#X obj 317 209 print~;
#X obj 334 183 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
#000000 #000000;
#X text 42 49 Upsampling methods:;
#X text 41 109 sample/hold;
#X text 300 114 linear interpolation;
#X obj 183 144 inlet~ pad;
#X text 183 113 zero-padded;
#X text 43 245 The default \, if no method is specified \, is sample/hold.
;
#X obj 43 144 inlet~ fwd hold;
#X obj 318 149 inlet~ fwd lin;
#X connect 2 0 1 0;
#X connect 4 0 3 0;
#X connect 6 0 5 0;
#X connect 10 0 1 0;
#X connect 13 0 3 0;
#X connect 14 0 5 0;
#X restore 33 295 pd test-subpatch-upsampled;
#N canvas 362 216 585 262 test-subpatch-downsampled 0;
#X obj 319 151 outlet~ lin;
#X text 198 171 sample/hold;
#X text 316 175 linear interpolation;
#X obj 105 28 block~ 32 1 0.5;
#X text 59 167 interleaved zeros;
#X obj 201 81 tabreceive~ \$0-tab;
#X obj 64 144 outlet~ pad;
#X obj 201 147 outlet~ hold;
#X text 233 29 downsampling methods:;
#X connect 5 0 0 0;
#X connect 5 0 6 0;
#X connect 5 0 7 0;
#X restore 37 339 pd test-subpatch-downsampled;
#X text 48 14 When a subpatch is reblocked to a higher or lower sample
rate \, the inlet~ and outlet~ objects offer a choice of three upsampling
methods. (The inlet~ upsamples when entering a subpatch with a higher
sample rate \; the outlet~ upsamples when leaving a subpatch of _lower_
sample rate \, as demonstrated below.) There is no corresponding choice
of downsampling method - downsampling is done simply by dropping the
extra samples.;
#X msg 314 498 \; pd compatibility 0.43;
#X text 48 444 COMPATIBILITY NOTE: in Pd versions before 0.44 \, the
default method was "pad". To get the old behavior \, either change
the patch to specify "pad" \, or set "compatibility" to 0.43 in Pd's
command line or by a message:;
#X text 62 150 (DSP needs to be on);
#X connect 1 0 0 0;
#X connect 3 0 2 0;
#X connect 5 0 4 0;
#X connect 8 0 7 0;
#X connect 10 0 9 0;
#X connect 11 0 9 0;
#X connect 11 0 12 1;
#X connect 11 0 12 0;
#X connect 11 0 12 2;
#X connect 13 0 0 0;
#X connect 13 1 2 0;
#X connect 13 2 4 0;
#X restore 95 325 pd up/downsampling;
#N canvas 309 180 813 339 subpatch-with-inlets-and-outlets 0;
#X obj 97 94 inlet;
#X text 49 64 control inlet for receiving messages;
#X floatatom 97 122 5 0 0 0 - - - 0;
#X floatatom 100 223 5 0 0 0 - - - 0;
#X obj 100 255 outlet;
#X text 64 193 control outlet for sending message;
#X obj 466 217 inlet~;
#X obj 466 268 print~;
#X msg 481 242 bang;
#X obj 635 276 outlet~;
#X obj 635 230 sig~ 34;
#X floatatom 466 191 5 0 0 0 - - - 0;
#X text 365 52 Same for signals. Inlet~ objects take float messages
to set the value if there's no signal connected (the same as with signal
inlets to other Pd objects) and you can also set this value by a "float"
message to the inlet~ object. (You'll have to disconnect the signal
connection on the parent to see this happen.) You can use a "loadbang"
object to pass arguments to initialize signal inlets in abstractions.
;
#X text 427 300 (DSP needs to be on);
#X connect 0 0 2 0;
#X connect 3 0 4 0;
#X connect 6 0 7 0;
#X connect 8 0 7 0;
#X connect 10 0 9 0;
#X connect 11 0 6 0;
#X restore 31 238 pd subpatch-with-inlets-and-outlets;
#N canvas 0 23 600 400 (subpatch) 0;
#X restore 146 486 pd;
#X text 51 83 Inlets/outlets are used to receive and get information
on a patch window. This can be an abstraction or a subpatch. To create
a subpatch \, type "pd" into an object box \, then you can put inlets
and outlets by making "inlet" objects \, etc \, in the subpatch (open
the patch below to see them.);
#X text 230 325 <= details on up/downsampling;
#X text 251 341 for inlet~ and outlet~, f 26;
#X text 325 485 updated for Pd version 0.51;
#N canvas 582 179 543 415 inlet~-forwarding 0;
#X obj 173 182 inlet~ fwd;
#X floatatom 131 145 5 0 0 0 - - - 0;
#X msg 174 145 1 2 3;
#X msg 221 145 poodle 50;
#X obj 174 283 print~;
#X obj 187 255 bng 17 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
#000000 #000000;
#X text 58 16 you can pass "fwd" as an argument to inlet~ to ask for
a second outlet that forwards messages. Float messages aren't forwarded
though - instead \, they set the signal output value in case the parent
inlet isn't connected. Messages to the inlet~ object are treated the
same as messages to the inlet on the parent.;
#X text 64 339 (note: inlet~ objects inside patches that are copied
using clone~ are always connected to incoming signals \, so a float
message to such an inlet~ has no effect.);
#X obj 240 214 print fwd;
#X text 213 255 (DSP needs to be on);
#X obj 106 145 bng 17 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
#000000 #000000;
#X connect 0 0 4 0;
#X connect 0 1 8 0;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 5 0 4 0;
#X connect 10 0 0 0;
#X restore 96 422 pd inlet~-forwarding;
#X obj 74 387 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000
#000000;
#X floatatom 39 385 4 0 0 0 - - - 0;
#X msg 96 387 1 2 3;
#X msg 143 387 poodle 50;
#X text 245 421 <= catching messages to inlet~ objects;
#X text 302 265 (DSP needs to be on);
#X obj 401 191 tgl 17 0 empty empty empty 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X text 425 192 DSP on/off;
#X msg 401 215 \; pd dsp \$1;
#X text 135 10 - control/audio inlet;
#X text 136 38 - control/audio outlet;
#N canvas 229 90 1137 574 reference 0;
#X obj 8 52 cnv 5 530 5 empty empty INLETS: 8 18 0 13 #202020 #000000
0;
#X obj 7 170 cnv 5 530 5 empty empty empty 8 18 0 13 #202020 #000000
0;
#X obj 7 91 cnv 5 530 5 empty empty OUTLET: 8 18 0 13 #202020 #000000
0;
#X obj 30 19 inlet;
#X text 80 19 - control inlet;
#X obj 7 132 cnv 5 530 5 empty empty ARGUMENTS: 8 18 0 13 #202020 #000000
0;
#X text 153 104 anything - any message from parent patch., f 42;
#X obj 8 272 cnv 5 530 5 empty empty INLET: 8 18 0 13 #202020 #000000
0;
#X obj 7 522 cnv 5 530 5 empty empty empty 8 18 0 13 #202020 #000000
0;
#X obj 7 311 cnv 5 530 5 empty empty OUTLET: 8 18 0 13 #202020 #000000
0;
#X obj 7 425 cnv 5 530 5 empty empty ARGUMENTS: 8 18 0 13 #202020 #000000
0;
#X obj 30 239 inlet~;
#X text 84 239 - audio inlet;
#X text 161 144 NONE;
#X text 156 64 NONE;
#X text 134 285 float - set default value for no signal connected.
;
#X text 111 351 signal - signal from parent patch., f 42;
#X obj 7 345 cnv 1 530 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000
0;
#X obj 7 376 cnv 1 530 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000
0;
#X text 111 437 1) symbol -;
#X text 199 438 'fwd' to turn message forwarding on. Alternatively
\, you can set upsampling method: 'hold' for sample/hold (default)
\, 'pad' for zero-padded and 'lin' for linear interpolation)., f 42
;
#X text 112 383 anything -;
#X text 192 383 any message from parent patch (when give a 'fwd' argument.
, f 30;
#X obj 558 52 cnv 5 530 5 empty empty INLET: 8 18 0 13 #202020 #000000
0;
#X obj 557 170 cnv 5 530 5 empty empty empty 8 18 0 13 #202020 #000000
0;
#X obj 557 91 cnv 5 530 5 empty empty OUTLETS: 8 18 0 13 #202020 #000000
0;
#X obj 557 132 cnv 5 530 5 empty empty ARGUMENTS: 8 18 0 13 #202020
#000000 0;
#X obj 558 271 cnv 5 530 5 empty empty INLET: 8 18 0 13 #202020 #000000
0;
#X obj 557 422 cnv 5 530 5 empty empty empty 8 18 0 13 #202020 #000000
0;
#X obj 557 310 cnv 5 530 5 empty empty OUTLETS: 8 18 0 13 #202020 #000000
0;
#X obj 557 353 cnv 5 530 5 empty empty ARGUMENTS: 8 18 0 13 #202020
#000000 0;
#X text 731 144 NONE;
#X text 661 365 1) symbol -;
#X obj 580 19 outlet;
#X text 632 19 - control outlet;
#X text 727 104 NONE;
#X text 676 64 anything - any message to send to parent patch.;
#X obj 580 238 outlet~;
#X text 638 238 - audio outlet;
#X text 684 284 signal - signal to send to parent patch.;
#X text 711 320 NONE;
#X text 749 366 downsampling method: 'hold' for sample/hold (default)
\, 'pad' for zero-padded and 'lin' for linear interpolation)., f 46
;
#X restore 368 33 pd reference;
#X text 459 33 <= click;
#X obj 7 70 cnv 1 525 1 empty empty empty 8 12 0 13 #000000 #000000
0;
#X obj 7 471 cnv 1 525 1 empty empty empty 8 12 0 13 #000000 #000000
0;
#X connect 5 0 14 1;
#X connect 6 0 14 0;
#X connect 12 0 4 0;
#X connect 14 0 7 0;
#X connect 14 1 4 0;
#X connect 21 0 20 0;
#X connect 22 0 20 0;
#X connect 23 0 20 0;
#X connect 24 0 20 0;
#X connect 27 0 29 0;
