[PD] setting phasor's phase without clicks

Frank Barknecht barknech at ph-cip.uni-koeln.de
Wed May 15 08:56:53 CEST 2002


Krzysztof Czaja hat gesagt: // Krzysztof Czaja wrote:

> have you tried sending _one_ phasor's output, x, through
> min~(x, a *~ (1 -~ x)), where a > 0?  With one phasor you
> do not have to make phase adjustments... but scaling may
> be tricky (atan?)...

Last night I found another, similar but simpler solution shown in the
attached patch. It adds something to the phasor to get a shifted
signal and then uses [>~ 1] from zexy (I think) to check, if the
shifted sig goes beyond 1. If it does, I substract 1, which is the
result of [>~ 1] if it's true, otherwise I substract 0, which is the
result of [>~ 1] if that's false. This works for a phasor~ but not for
other oscillating objects like the osc~, but here it's okay. 

So now, trisaw~ is a working triangle to up/down-saw morphing
oscillator, that even should be bandlimited, if I understand the used
algorithm (taken from a Istvan Varga Csound instrument) correctly. 

ciao,
-- 
 Frank Barknecht                                  _ _______footils__

-------------- next part --------------
#N canvas 227 95 729 564 10;
#X obj 80 54 inlet;
#X obj 80 260 expr~ 4*$v1*(1-$v1);
#X obj 80 290 -~ 0.5;
#X obj 228 290 -~ 0.5;
#X obj 228 260 expr~ 4*$v1*(1-$v1);
#X obj 134 340 -~;
#X text 451 335 correct amplitude;
#X obj 244 205 >~ 1;
#X obj 228 236 -~;
#X obj 220 480 outlet~;
#X obj 430 357 expr~ 4*$v1*(1-$v1);
#X obj 228 177 +~;
#X obj 430 66 inlet~;
#X obj 430 89 clip~ 0.01 0.99;
#X obj 220 414 /~;
#X obj 80 91 phasor~ 0;
#X text 131 55 frequency;
#X text 489 64 tri-saw factor;
#X connect 0 0 15 0;
#X connect 1 0 2 0;
#X connect 2 0 5 0;
#X connect 3 0 5 1;
#X connect 4 0 3 0;
#X connect 5 0 14 0;
#X connect 7 0 8 1;
#X connect 8 0 4 0;
#X connect 10 0 14 1;
#X connect 11 0 7 0;
#X connect 11 0 8 0;
#X connect 12 0 13 0;
#X connect 13 0 10 0;
#X connect 13 0 11 1;
#X connect 14 0 9 0;
#X connect 15 0 1 0;
#X connect 15 0 11 0;


More information about the Pd-list mailing list