[PD] dropout save metro

Roman Haefeli reduzierer at yahoo.de
Mon Jun 25 13:31:42 CEST 2007


the implementation is quite simple. see attached patch. (though it
requires two instances of pd, that are connected somehow over a digital
audio connection, e.g jack)

roman


On Fri, 2007-06-22 at 19:52 +0200, Roman Haefeli wrote:
> On Fri, 2007-06-22 at 19:40 +0200, Roman Haefeli wrote:
> > On Fri, 2007-06-22 at 19:22 +0200, Roman Haefeli wrote:
> > > one solution, that might would work, came to my mind. you could run two
> > > instances of pd, one does only hold a [metro] and has a slightly higher
> > > priority than the other instance. the second pd does all the audio stuff
> > > and therefore might have some dropouts. now you could send the output of
> > > the 'dropout safe' [metro] to the audio instance of pd. 
> > > 
> > > this would be a clean solution, but it requires some connection between
> > > the two instances of pd, most probably a tcp-connection. due to this
> > > connection, this approach might be inaccurate as well.
> > 
> > frank mentioned using an audio connection. with an audio connection
> > between both instances you wouldn't have any glitches. the main problem
> > is how to 'encode' and 'decode' the audio signal, so that you don't lose
> > sample accuracy. there are possibly many approaches, but one comes to
> > mind using [pack~] and [unpack~] from zexy. dependent on when the 'bang'
> > from the metro happens withing a block, you could encode that time into
> > the first sample of a block with a list like '23 0 0 0 0 0 ..... ' sent
> > to [pack~] . ('23' means, that the bang should be triggered at the 23th
> > sample of that block). on the receiver side, you could use an
> > 
> > [unpack~]
> > |
> > [$1]
> > 
> > construction to 'decode' the audio block. 
> > 
> > hope, that makes sense..
> 
> (sorry for spaming so much about this topic)
> 
> i just realized, that you couldn't send higher values than '1' over an
> audio connection. therefore the 'encode' should scaled down in order to
> fit into the transmittable range.
> 
> roman
> 
> 
> 
> 
> 
> 
> 
> 		
> ___________________________________________________________ 
> Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
> 
> 
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
#N canvas 319 93 579 656 10;
#X declare -stdlib zexy;
#X obj 21 102 bang~;
#X obj 21 157 timer;
#X obj 102 123 metro 1000;
#X obj 21 181 - 0.7;
#X obj 21 203 unpack~;
#X obj 22 323 pack~;
#X obj 22 353 route 0;
#X obj 66 421 del;
#X obj 102 96 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 66 567 timer;
#X obj 66 545 t b b;
#X floatatom 66 588 0 0 0 0 - - -;
#X floatatom 167 96 0 0 0 0 - - -;
#X msg 66 375 \$1;
#X obj 66 398 + 0.7;
#X obj 20 48 declare -stdlib zexy;
#X text 36 275 _____________________________________________;
#X text 237 246 pd instance 1;
#X text 242 317 pd instance 2;
#X text 155 393 instance two does all the audio stuff.;
#X text 155 410 though it sometimes has drop outs \, the metro-input
is not affected.;
#X text 25 269 <- digital audio connnection (e.g. jack);
#X text 135 176 instance 1 should run with higher priority and runs
only this part (-> no drop outs are expected here);
#X text 128 566 <- measures period;
#X text 24 5 this patch tries to show how an implementation of a 'drop
out safe' [metro] with two instances of pd could look like.;
#X connect 0 0 1 0;
#X connect 1 0 3 0;
#X connect 2 0 1 1;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 6 1 13 0;
#X connect 7 0 10 0;
#X connect 8 0 2 0;
#X connect 9 0 11 0;
#X connect 10 0 9 0;
#X connect 10 1 9 1;
#X connect 12 0 2 1;
#X connect 13 0 14 0;
#X connect 14 0 7 0;


More information about the Pd-list mailing list