I think the one-sample delay is given by [rzero_rev~ 0] -- (y[n] = -a[n] * x[n] + x[n-1]) -- but [z~] takes an argument for any delay by sample.
Also, using a filter to achieve the delay might be putting the cart before the horse in pedagogical situations -- here [fexpr~] is probably better, but its maximum delay is the current vector length, and to me it feels somewhat expensive in production situations.
Another option for something like [z~] that might integrate better with delay representation in pd could be an object that simply reads from [delwrite~] like [delread~] and [vd~], but whose argument is a sample-wise delay -- however, this is easily done via an abstraction. This would obviate the need for each instance to have its own internal delay allocation which could be useful for someone who wanted to use it to build something like a several-hundred-point direct convolution patch. Still, if others are used to the [z~] in zexy, it might be better to go with that model if it's going to be implemented in vanilla.
Thanks,
Matt
Date: Wed, 23 Apr 2008 13:17:40 -0700 From: Miller Puckette mpuckett@imusic1.ucsd.edu Subject: Re: [PD] Cyclone in vanilla? To: pd-list@iem.at Message-ID: 20080423201740.GI15867@imusic1.ucsd.edu Content-Type: text/plain; charset=us-ascii
I believe z~ is just rzero~ 0.
cheers Miller
On Wed, Apr 23, 2008 at 11:24:34AM +0200, Frank Barknecht wrote:
Hallo, Matt Barber hat gesagt: // Matt Barber wrote:
Actually, for those of us who insist on vanilla and do everything with expr/expr~/fexpr~ or abstractions, is it possible to implement [z~] in fexpr~ for a delay larger than its vector size? You could do it with an abstraction using [delwrite~] and [delread~], setting the [block~] to 1, and then set the delay as a ratio to the [samplerate~] -- the difficulty in making it work correctly here is setting the size of the [delwrite~] efficiently (this could maybe be done with a loadbang routine that would send a message to a subpatch in the abstraction instance to add and connect a delwrite~ with the proper delay allocation...).
You don't need to set the block~-size to 1, and personally I would just make the delwrite~ "big enough". It's cheap to store things in a delay. But anyway, attached is a z~-clone with delwrite~/delread~ that uses a helper abstraction created dynamically.
Ciao
Frank Barknecht _ ______footils.org__
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list