[PD] Re: [rradical]example.pd bugs?

Frank Barknecht fbar at footils.org
Fri Oct 8 23:13:27 CEST 2004


Hallo,
chun lee hat gesagt: // chun lee wrote:

> Finally got the example patch in the instruments directory loaded up with no
> errors. But I found a few things that seems a bit strange.
> 
> 1. in the sub-patch "interna" in analosc.pd. I had to swap the order of
> $0-wave-out/in, $0-warm-out/in and $0-inst-out/in to get it to work. In
> addition, the $0-lfo parameter where left out without the "-out" and "-in"
> bit. 

Well, it looks like you find all the unfinished patches first. ;) 
Actually analosc.pd and related patches are very experimental in that
they tried to decouple sound engine and control engine. I'm not
satisfied with the way this is done there.

Regarding your send/recive problem: I cannot really duplicate this,
but in the newer patches, I normally use the same send and receive
names in the IEMGUI object (like it already is for $0-lfo). The "-in"
and "-out" will be removed altogether everywhere to fit with this
model. When I was doing those patches, I didn't knew that this simple
approach can work very well and all the time.

> 2. in the analogue.pd, I got:
> error: scale: no method for "float"
> I had to get rid of the scales the replace it with "/ 127" and its ok.

You got the "wrong" [scale], I was expecting the one from maxlib, you
probably have another one loaded. Replacing it with  [/ 127] at that
place is fine, though. I will replace the [scale] with a [rrad.scale]
abstraction later.

> 3.the level in which the adsr-engine seems to be quite low so I had to take
> out the double "*~" that come after it.

Thanks for spotting this: It is a bug im my handling of quartic
envelopes. See
/usr/lib/pd/doc/3.audio.examples/D04.envelope.quartic.pd 

I forgot the double [sqrt] part!! How could I miss this. Can you
check, if attached rrad.adsr4~ sounds better (with the [*~][*~] in
again)? This has the [sqrt][sqrt] in it.

> are these bugs? I still have not quite get the hand of it in this patch.

(hint: "pd usecases/use-showcase.pd" ;)

Ciao
-- 
 Frank Barknecht                               _ ______footils.org__
-------------- next part --------------
#N canvas 500 433 157 126 10;
#X obj 2 15 cnv 15 150 100 empty \$0-background-cnv empty 20 12 1 14
-228905 -66577 0;
#X obj 433 -3 inlet OSC;
#N canvas 127 377 981 424 saves 0;
#X obj 45 160 originator \$1 \$0;
#X obj 152 132 inlet OSC;
#X obj 47 55 r \$0-substate;
#X obj 15 13 inlet substate;
#X obj 15 35 route substate;
#X obj 159 55 r \$0-copy;
#X msg 159 76 copy;
#X obj 243 50 r \$0-paste;
#X msg 241 71 paste;
#X text 154 15 This is the originator \, including some ready to use
standard functionality.;
#X text 507 56 Put your commun sends here \, if you like.;
#X msg 15 91 setsub \$1;
#X msg 249 184 svdir \$1;
#X obj 250 139 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 250 163 savepanel;
#X obj 152 189 outlet OSC;
#X msg 108 214 svxdir /tmp/svdir.xml;
#X msg 78 241 ldxdir /tmp/svdir.xml;
#X obj 538 176 s \$0-ain;
#X obj 610 176 s \$0-din;
#X obj 682 176 s \$0-sin;
#X obj 776 179 s \$0-rin;
#X obj 536 107 r \$0-a;
#X obj 630 105 r \$0-d;
#X obj 698 106 r \$0-s;
#X obj 769 106 r \$0-r;
#X obj 772 142 commun /r \$0;
#X obj 682 142 commun /s \$0;
#X obj 582 141 commun /d \$0;
#X obj 496 137 commun /a \$0;
#X connect 0 2 15 0;
#X connect 1 0 0 1;
#X connect 2 0 11 0;
#X connect 3 0 4 0;
#X connect 4 0 11 0;
#X connect 4 1 0 0;
#X connect 5 0 6 0;
#X connect 6 0 0 0;
#X connect 7 0 8 0;
#X connect 8 0 0 0;
#X connect 11 0 0 0;
#X connect 12 0 0 0;
#X connect 13 0 14 0;
#X connect 14 0 12 0;
#X connect 16 0 0 0;
#X connect 17 0 0 0;
#X connect 22 0 29 0;
#X connect 23 0 28 0;
#X connect 24 0 27 0;
#X connect 25 0 26 0;
#X connect 26 0 21 0;
#X connect 27 0 20 0;
#X connect 28 0 19 0;
#X connect 29 0 18 0;
#X restore 371 -4 pd saves;
#N canvas 569 61 450 300 cnv.ctl 0;
#X obj 90 188 s \$0-background-cnv;
#X floatatom 108 59 5 100 1000 0 width - -;
#X floatatom 112 83 4 50 500 0 height - -;
#X obj 92 132 pack 0 0;
#X msg 92 159 vis_size \$1 \$2;
#X obj 110 106 t b f;
#X connect 1 0 3 0;
#X connect 2 0 5 0;
#X connect 3 0 4 0;
#X connect 4 0 0 0;
#X connect 5 0 3 0;
#X connect 5 1 3 1;
#X restore 296 -4 pd cnv.ctl;
#X obj 117 34 bng 15 250 50 0 \$0-copy empty copy 0 -6 0 8 -225271
-1 -1;
#X obj 117 62 bng 15 250 50 0 \$0-paste empty paste 0 -6 0 8 -257472
-1 -1;
#X text 184 -4 look! ==>;
#X obj 371 17 outlet OSC;
#X obj 10 37 vsl 8 64 0 100 0 0 \$0-a \$0-ain a 0 -8 1 8 -355 -260818
-143491 0 1;
#X obj 29 37 vsl 8 64 0 127 0 0 \$0-d \$0-din d 0 -8 1 8 -355 -260818
-143491 0 1;
#X obj 49 37 vsl 8 64 0 127 0 0 \$0-s \$0-sin s 0 -8 1 8 -355 -260818
-143491 0 1;
#X obj 69 37 vsl 8 64 0 127 0 0 \$0-r \$0-rin r 0 -8 1 8 -355 -260818
-143491 0 1;
#X obj 189 21 inlet;
#X obj 189 72 outlet~;
#N canvas 0 0 600 400 envelope 0;
#X obj 173 134 r \$0-level;
#X obj 252 35 r \$0-a;
#X obj 293 85 r \$0-d;
#X obj 315 139 r \$0-s;
#X obj 413 132 r \$0-r;
#X obj 25 119 inlet;
#X obj 174 346 outlet~;
#N canvas 231 224 600 400 adsr 0;
#X text 52 50 This patch is used as an abstraction in 25.envelope.pd
;
#X obj 95 108 inlet;
#X obj 298 111 inlet;
#X text 91 79 trigger;
#X obj 95 138 sel 0;
#X obj 144 138 t b;
#X obj 104 359 pack 0 \$2;
#X obj 362 112 inlet;
#X obj 309 301 del \$2;
#X obj 338 324 f \$4;
#X obj 371 369 pack 0 \$3;
#X obj 410 112 inlet;
#X obj 459 111 inlet;
#X obj 504 111 inlet;
#X msg 95 191 stop;
#X obj 517 360 pack 0 \$5;
#X text 378 86 Traditional A \, D \, S \, R;
#X text 296 88 level;
#X text 32 302 ATTACK;
#X obj 371 465 outlet~;
#X text 7 325 recall level;
#X text 7 345 and pack with;
#X text 8 365 attack time;
#X text 28 124 if zero;
#X text 29 141 release;
#X text 17 183 and cancel;
#X text 17 199 decay;
#X text 148 120 bang if attack;
#X text 183 294 on attack \, set a;
#X text 147 307 delay to go to sustain;
#X text 189 324 recall sustain value;
#X text 185 347 multiply by overall level;
#X text 220 370 pack with decay time;
#X text 510 386 on release ramp;
#X text 511 403 back to zero;
#X text 63 12 adsr - arguments: level \, attack time \, decay time
\, sustain level \, release time;
#X text 17 487 When you send this patch a nonzero trigger it schedules
a line~ to do an attack and decay \, and if zero \, it starts the release
ramp.;
#X text 18 533 Objects such as f and pack can be given dollar sign
arguments to initialize their contents from adsr's creation arguments.
Inlets are supplied to update them on the fly.;
#X obj 104 334 f;
#X obj 364 346 * 1;
#X obj 371 426 sqrt;
#X obj 371 405 sqrt;
#X obj 371 445 vline~;
#X connect 1 0 4 0;
#X connect 2 0 38 0;
#X connect 2 0 39 1;
#X connect 4 0 14 0;
#X connect 4 0 15 0;
#X connect 4 1 5 0;
#X connect 5 0 8 0;
#X connect 6 0 41 0;
#X connect 7 0 6 1;
#X connect 7 0 8 1;
#X connect 8 0 9 0;
#X connect 9 0 39 0;
#X connect 10 0 41 0;
#X connect 11 0 10 1;
#X connect 12 0 9 1;
#X connect 13 0 15 1;
#X connect 14 0 8 0;
#X connect 15 0 41 0;
#X connect 38 0 6 0;
#X connect 39 0 10 0;
#X connect 40 0 42 0;
#X connect 41 0 40 0;
#X connect 42 0 19 0;
#X restore 174 292 pd adsr -----------;
#X obj 100 181 s \$0-level;
#X obj 253 62 scale 0 127 0 200;
#X obj 308 164 scale 0 127 0 1;
#X obj 289 119 scale 0 127 0 200;
#X obj 172 168 scale 0 127 0 1;
#X obj 366 202 scale 0 127 0 1000;
#X obj 74 149 select 0;
#X connect 0 0 12 0;
#X connect 1 0 9 0;
#X connect 2 0 11 0;
#X connect 3 0 10 0;
#X connect 4 0 13 0;
#X connect 5 0 14 0;
#X connect 5 0 7 0;
#X connect 7 0 6 0;
#X connect 9 0 7 2;
#X connect 10 0 7 4;
#X connect 11 0 7 3;
#X connect 12 0 7 1;
#X connect 13 0 7 5;
#X connect 14 1 8 0;
#X restore 189 47 pd envelope;
#X text 23 -1 Graphical ADSR;
#X obj 95 37 vsl 8 64 0 127 0 0 empty \$0-level lvl 0 -8 1 8 -62784
-262144 -258699 0 1;
#X obj 116 90 nbx 2 14 -1e+37 1e+37 0 0 \$0-substate \$0-parentstate
preset 0 -6 0 8 -261681 -1 -1 0 256;
#X connect 1 0 2 1;
#X connect 2 0 7 0;
#X connect 12 0 14 0;
#X connect 14 0 13 0;
#X coords 0 0 1 1 152 115 1;


More information about the Pd-list mailing list