[PD] unit impulse without [dirac~]

Roman Haefeli reduzierer at yahoo.de
Sun Nov 18 07:52:02 CET 2007


hi again..

ok.. now i also had to do my version of it..... :-)
you'll find it in the attachment.

a few notes on the collection:
the one that i saw from uğur güney [ciprit] works only as expected at a
fixed samplingrate (44100). steffens proposal is behaves exactly as the
original [dirac~], as far as i can see it, whereas frank's approach
[vimpulse~] does the time-to-sample conversion automatically, which is,
i think, probably rather the behaviour, that someone usually wants. the
helpfile states, that [vimpulse~] is subsample accurate. as far as i can
see, this is wrong (it is only sample accurate) and also not a behaviour
that someone would want. if it would be truely subsample accurate, then
most of the time the dirac impulse would need to be interpolated and
composed of two subsequent samples (which would it turn unusuable for
many applications). my attached version behaves similar to franks
version, but instead of writing first the signal into a table, it uses
directly [vline~] to create the impulse.


On Sun, 2007-11-18 at 00:38 +0100, Steffen Leve Poulsen wrote:
> Andy Farnell skrev:
> > The [dirac~] object generates a unit impulse (at the sample position given by
> > its input)
> > 
> > I'm trying to think of simple ways to do it in plain vanilla. Frank gave a one way before,
> > differentiating a step impulse with [rzero~], can anyone think of other ways (I'm sure 
> > there's more than one)

i missed this one and i also didn't quite get how it works. can someone
send me this one?

roman


-------------- next part --------------
#N canvas 193 184 320 267 10;
#X obj 20 151 vline~;
#X obj 64 40 samplerate~;
#X msg 64 63 1000 \$1;
#X obj 64 85 /;
#X msg 20 129 1 \, 0 0 \$1;
#X obj 20 107 f;
#X text 104 86 1000 / sr = sampleperiod (ms);
#X obj 20 78 b;
#X obj 64 16 loadbang;
#X obj 20 17 inlet;
#X obj 21 215 outlet~;
#X text 130 180 Author: Roman Haefeli;
#X text 130 197 Version: 2007-11-18;
#X connect 0 0 10 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 5 1;
#X connect 4 0 0 0;
#X connect 5 0 4 0;
#X connect 7 0 5 0;
#X connect 8 0 1 0;
#X connect 9 0 7 0;
-------------- next part --------------
#N canvas 495 232 483 349 10;
#X text 286 252 Author: Roman Haefeli;
#X text 286 269 Version: 2007-11-18;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$0.scope 200 float 0;
#X coords 0 1.1 199 -0.1 200 100 1;
#X restore 274 92 graph;
#X obj 68 167 vdirac~;
#X obj 38 202 tabwrite~ \$0.scope;
#X obj 38 84 t b b;
#X obj 38 48 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 82 112 del 0.2342;
#X obj 97 136 del 2;
#X connect 3 0 4 0;
#X connect 5 0 4 0;
#X connect 5 1 3 0;
#X connect 5 1 7 0;
#X connect 5 1 8 0;
#X connect 6 0 5 0;
#X connect 7 0 3 0;
#X connect 8 0 3 0;


More information about the Pd-list mailing list