#N canvas 182 92 1016 541 12;
#X obj 393 245 print foo;
#X obj 352 488 stdout;
#X msg 301 453 a b c;
#X obj 54 249 env~ 8192;
#X floatatom 54 279 8 0 0 0 - - - 0;
#X obj 128 249 env~ 8192;
#X floatatom 128 279 8 0 0 0 - - - 0;
#X obj 257 275 dac~;
#X obj 96 217 adc~, f 5;
#X obj 381 209 receive foo;
#X obj 757 167 print dsp-started;
#X obj 757 264 print dsp-stopped;
#X obj 757 235 bng 19 250 50 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000;
#X obj 757 138 bng 19 250 50 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000;
#X obj 352 453 bng 19 250 50 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000;
#X floatatom 380 453 5 0 0 0 - - - 0;
#X obj 757 109 r pd-dsp-started;
#X obj 757 206 r pd-dsp-stopped;
#X msg 626 197 \; pd dsp 1;
#X obj 381 283 stdout;
#X obj 626 157 ../../doc/5.reference/set-dsp-tgl;
#X text 546 21 DSP must be on both in the sub and super-process in order for audio to run. Control objects in this patch will still work if DSP is off in the sub-process \, but even so the DSP must still be on in the super-process for time to move forward in the sub-process., f 61;
#X text 546 299 Messages sent to 'pd' in the super-process are also possible so you can start/stop the DSP engine in the sub-process and more. This example has [receive] objects that respond to changes in the DSP state from the super process. For reference to all messages you can send to Pd \, open the following documentation patch:, f 61;
#X text 546 447 Note that the above document also shows how to send messages to a Pure Data file \, which is also a possibility to send messages from the super-process to this canvas (such as 'vis 0' and 'vis 1' as shown in the example in the super-process)., f 61;
#X text 21 21 This is a test patch to demonstrate the [pd~] object. It's intended as the patch to run in the sub-process \, which is a separate instance of Pd that can be called from a Pd super-process (or also from a Max super-process if you have the Max version of [pd~])., f 68;
#X text 21 90 Audio inlets and outlets on the [pd~] object (in the super-process) talk to [adc~] and [dac~] objects here - so \, for instance \, the left [adc~] output below corresponds to the first inlet of the [pd~] object. Similarly \, the first channel of [dac~] goes to the second outlet of [pd~] (because the first one is for messages \, as explained below.), f 68;
#X text 21 328 The super-process can send messages to any named object (such as [receive] objects \, arrays \, GUIs with built-in receive names and [value] objects). In this way \, a 'bar baz' message is received by [receive foo] when the super-process sends 'foo bar baz'. On the other hand \, messages sent to [stdout] objects appear on the first outlet of the [pd~] object in the super-process (and you can have more than one [stdout] object)., f 68;
#X obj 257 238 *~ 0.1;
#X obj 257 207 noise~;
#X obj 653 408 ../../doc/5.reference/pd-messages;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
#X connect 5 0 6 0;
#X connect 8 0 3 0;
#X connect 8 1 5 0;
#X connect 9 0 0 0;
#X connect 9 0 19 0;
#X connect 12 0 11 0;
#X connect 13 0 10 0;
#X connect 14 0 1 0;
#X connect 15 0 1 0;
#X connect 16 0 13 0;
#X connect 17 0 12 0;
#X connect 20 0 18 0;
#X connect 27 0 7 0;
#X connect 27 0 7 1;
#X connect 28 0 27 0;
