Hi, thanks for all your responses. Indeed the issue was how to reflect dsp state right away when a patch is loaded. I want a thing like [output~] for help patches which are supposed to work with all Pd flavors vanilla, extended and L2Ork. Claude's trick with [sig~ 1] and a delayed [snapshot~] seems to do a good job, see attached. Thank you Claude.
Katja On Mon, Jan 12, 2015 at 6:26 PM, Jonathan Wilkes via Pd-list <[email protected]> wrote: > Also, in Pd-l2ork: > > [dsp( > | > [canvasinfo] > | > [print] > > There is probably also an external somewhere in Pd-extended that does the > same thing. > > -Jonathan > > > On Monday, January 12, 2015 10:48 AM, Roman Haefeli <[email protected]> > wrote: > > > On Mon, 2015-01-12 at 17:28 +0200, Alexandros Drymonitis wrote: > > >> On Mon, Jan 12, 2015 at 5:11 PM, IOhannes m zmölnig <[email protected]> >> wrote: >> On 01/12/2015 09:49 AM, Alexandros Drymonitis wrote: >> > Why not store what [r pd] -> [route dsp] outputs to [f ]'s >> right inlet, and >> > bang the left inlet whenever you want to know the dsp state? >> >> maybe because it reports the wrong value if you: >> - start Pd >> - turn DSP on >> - query your [dspstate] abstraction (that implements your >> suggestion) >> I don't understand how this will report a wrong value. If you start Pd >> and turn the DSP on, then [f ] will hold 1, right? If you bang it, it >> will output 1, which is the DSP state. And if you turn the DSP off, it >> will hold 0. How is that wrong? > > I am not entirely clear about what IOhannes meant exactly. But assume > you set the DSP to on and only then you load the patch containing your > [dspstate] abstraction, the query will return a wrong result. Also it is > not always feasible to guarantee a certain patch (the one holding > [dspstate]) is loaded during the whole Pd session. The problem remains > that your [dspstate] abstraction depends on the user once turning DSP on > or off in order to reliably know the DSP state. > > Claude already mentioned some workarounds to query the current state > without knowing it beforehand. > > Roman > > > > _______________________________________________ > [email protected] mailing list > UNSUBSCRIBE and account-management -> > http://lists.puredata.info/listinfo/pd-list > > > > _______________________________________________ > [email protected] mailing list > UNSUBSCRIBE and account-management -> > http://lists.puredata.info/listinfo/pd-list >
#N canvas 525 362 446 257 10; #X obj 38 38 osc~ 200; #X text 106 98 <- mute; #X text 108 79 <- dsp toggle (green = on ); #N canvas 290 261 479 420 output~ 0; #X obj 23 117 hsl 42 23 0.01 1 1 0 \$0-v \$0-v volume 7 13 1 9 -245500 -13381 -1 0 0; #X obj 67 117 tgl 18 0 THIS_IS_HERE_TO_GET_RID_OF_THE_OUTLET \$0-dsp-toggle dsp 2 9 1 9 -262144 -195568 -33289 0 1; #N canvas 364 330 399 371 dsp 0; #X obj 11 7 inlet; #X obj 92 226 select 0 1; #X msg 125 248 6; #X obj 92 57 route dsp; #X obj 92 36 receive pd; #X msg 11 220 dsp \$1; #X obj 11 245 send pd; #X msg 206 278 set \$1; #X msg 109 278 color \$1 20 12; #X obj 180 309 send \$0-dsp-toggle; #X msg 92 247 0; #X obj 204 102 loadbang; #X obj 184 76 sig~ 1; #X obj 184 168 snapshot~; #X obj 204 131 delay 100; #X obj 92 115 change -1; #X connect 0 0 5 0; #X connect 0 0 15 0; #X connect 1 0 10 0; #X connect 1 1 2 0; #X connect 2 0 8 0; #X connect 3 0 15 0; #X connect 4 0 3 0; #X connect 5 0 6 0; #X connect 7 0 9 0; #X connect 8 0 9 0; #X connect 10 0 8 0; #X connect 11 0 14 0; #X connect 12 0 13 0; #X connect 13 0 1 0; #X connect 13 0 7 0; #X connect 14 0 13 0; #X connect 15 0 7 0; #X connect 15 0 1 0; #X restore 92 168 pd dsp logic; #X obj 211 22 inlet~; #X obj 96 293 line~; #X obj 196 353 *~; #X obj 216 383 dac~; #X text 223 42 audio in; #X obj 273 22 inlet~; #X obj 258 352 *~; #X obj 211 93 hip~ 3; #X obj 273 93 hip~ 3; #X obj 20 308 send pd; #X msg 20 287 dsp 1; #X obj 96 272 pack 0 50; #X text 163 271 <-- make a ramp to avoid clicks or zipper noise; #X msg 96 237 0; #X obj 96 214 moses 0.011; #X text 317 94 filter out DC; #X connect 0 0 13 0; #X connect 0 0 17 0; #X connect 1 0 2 0; #X connect 3 0 10 0; #X connect 4 0 9 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 8 0 11 0; #X connect 9 0 6 1; #X connect 10 0 5 1; #X connect 11 0 9 1; #X connect 13 0 12 0; #X connect 14 0 4 0; #X connect 16 0 14 0; #X connect 17 0 16 0; #X connect 17 1 14 0; #X coords 0 -1 1 1 65 40 1 20 100; #X restore 38 78 pd output~; #X text 37 225 Katja Vetter Jan. 2015; #X text 36 150 Vanilla implementation of [output~] almost identical to the method in PDDP but instead of GLOBAL_PDDP_DSP it uses a trick suggested by Claude Heiland-Allen to get dsp state shortly after the patch is loaded. Open subpatch [pd dsp logic] to see how.; #X connect 0 0 3 0; #X connect 0 0 3 1;
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
