[PD] up-down saw-wave

Frank Barknecht fbar at footils.org
Thu Nov 23 11:52:10 CET 2006


Hallo,
martin brinkmann hat gesagt: // martin brinkmann wrote:

> in the past (reaktor) i have used the songposition most of the time, and 
> made everything counter-based. (always perfectly in sync,
> but harder to manually re-sync).
> since i was happy that my first pd patch (a 'rockafella'-based
> loop-player) was running pretty well (and in sync) with this
> pahsor based approach, i continued to use this method. i agree that it 
> is a waste of cpu. maybe id would be a good idea to use only one phasor
> (or a vline based 'phasor') to drive a counter and than use this
> counter for the different sequencers. at least when it is not
> neccessary to sync the different modules independently.
> (groovebox2...)

Actually for a rather deep technical reason re-syncing of a [phasor~]
is not as accurate in Pd as resyncing a clock-based timing message
like the ones generated by [metro].

The background is: The right inlet of [phasor~] or [osc~] which set
the phase will only accept messages on block boundaries of 64 samples.
So you cannot sync anything more exact than about 1.5msec.
Clock-derive messages like those of metro, delay, pipe or qlist can be
used in conjunction with vline~ to overcome this 64-samples limit. The
difference between both is illustrated in attached patch.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 0 0 878 567 10;
#N canvas 0 0 450 300 (subpatch) 0;
#X array phasor 1024 float 2;
#X coords 0 1 1024 0 512 80 1;
#X restore 100 20 graph;
#N canvas 0 0 450 300 (subpatch) 0;
#X array clock-based 1024 float 2;
#X coords 0 1 1024 0 512 80 1;
#X restore 100 120 graph;
#X obj 260 286 metro 2;
#X obj 260 239 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 260 260 t a a;
#X obj 187 433 tabwrite~ phasor;
#X obj 385 433 tabwrite~ clock-based;
#X msg 683 321 \; pd dsp \$1;
#X obj 683 297 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 661 139 s phasor;
#X obj 649 163 s clock-based;
#X msg 260 310 0;
#X obj 188 382 phasor~ 200;
#X msg 649 109 xticks 0 64 1;
#X obj 384 395 vline~;
#X msg 384 373 0 \, 10 50;
#X text 648 50 marks every 64 samples;
#X obj 649 84 loadbang;
#X text 166 492 The phasor~-phase only gets reset quantized to 64 samples.
This leads to irregularities. vline~ however will give a regular pulse
independent of the 64-samples boundaries.;
#X msg 634 191 const 0;
#X obj 337 286 t b b b;
#X obj 336 266 select 1;
#X connect 2 0 11 0;
#X connect 2 0 15 0;
#X connect 3 0 4 0;
#X connect 4 0 2 0;
#X connect 4 1 21 0;
#X connect 8 0 7 0;
#X connect 11 0 12 1;
#X connect 12 0 5 0;
#X connect 13 0 10 0;
#X connect 13 0 9 0;
#X connect 14 0 6 0;
#X connect 15 0 14 0;
#X connect 17 0 13 0;
#X connect 19 0 9 0;
#X connect 19 0 10 0;
#X connect 20 0 5 0;
#X connect 20 1 6 0;
#X connect 21 0 20 0;


More information about the Pd-list mailing list