On Fri, 2008-04-25 at 16:08 +0100, Andy Farnell wrote:
I've attached again an example of a patch that demonstrates the practical difference between different one sample differentiators.
Try replacing [fexpr~ $x1 - $x1[-1]] in the water flow generator with
/
| [z~] | | [-~] |which is fine.
Then try implementing the same with [rzero~ 1]
It sounds very different
because [rzero~] is _not_ the same as [z~ 1] (see previous posts, 'previouser' posts claiming both to be the same, are wrong). there are several ways to achieve one-sample-delays. however, they need to be implemented correctly, of course. if they are, they also lead to identical results.
i hope, i am not doing a mistake as well, but considering IOhannes' last post, it seems to me that:
/
| [z~]
| |
[-~]
|
which is:
y[n] = x[n] - x[n-1]
is the same as:
[rzero~ 1] (according to the formula in the help-file)
so.. replace the whole thing by [rzero~ 1] and you don't need an external here.
regarding the book: why not making a set of abstractions with meaningful names for the missing standard operators and classes like [z~]? (yo, some people suggested that already) it would be educational and it also wouldn't suggest, that puredata is clean, consistent and complete, but it would show, that some effort is required in order to make it consistent and complete for one-self. i think, that would be just frank. it's a project in progress.
i believe, that starting with abstractions based on vanilla would be a good idea, even if they are not optimized or require a lot of objects. once they can be replaced by built-in classes, you still could change the abstractions so that they can be used as wrappers, in case the new classes don't have the same name as your initial abstractions. i think, going that way, you can make sure, that the examples from the book will work also in the future, when everything what we miss right now, will be there. i think, this would be the better way instead of adding some dependencies to the book examples, that will be obsolete in the future (or even worse, get replaced by built-in classes with same names, but different behaviour).
probably, your book is going to be the killer reason, why those object classes need to be part of vanilla (yeah, i am dreaming ;-) ).
frank already started a set. if still stuff is missing, i'd be glad to help as far as i am able to.
roman
and I have not found a way to correct the accumulating DC error. Try the obvious [rzero~ 0.99999999] etc to hear that the behaviour is still not right.
Fundamentally, [z~] is a *very* useful primitive to have
On Fri, 25 Apr 2008 07:04:10 -0400 Enrique Erne enrique@netpd.org wrote:
IOhannes m zmölnig wrote:
Enrique Erne wrote:
IOhannes m zmölnig wrote:
Enrique Erne wrote:
or [biquad~ 0 0 0 1]
Miller Puckette wrote: > I believe z~ is just rzero~ 0.
no. both of them are equivalent to [z~ 1]
you could also argue that [f] is just the same as [0( :-)
oups, yes ofcorse z~ 1.
the output of 1 sample with rzero~ 0, z~ 1 and biquad~ 0 0 0 1 seems to be slightly different. if one wants to be fuzzy about that :) maybe ome rounding problem?
no, i don't see any rounding errors...
and now i even couldn't do the delwrite/read with the subpatch :( :(
it's generally a good idea to tell [delwrite~] how much space it should allocate for the delayline. e.g. [delwrite~ abcd 1000] helped a lot...
and [rzero~ 0] is not the same as [z~ 1].
the output of [z~ 1] is y[n]=x[n-1] according to [rzero~]s help-patch it does the following:
y[n]=x[n]-a[n]*x[n-1] since you set a[n] to "0", you just get y[n]=x[n] :-(
to get [z~ 1], do something like
| +--+ | | | [rzero~ 1] | | [-~] |
thanks iohannes. it looks good now.
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de