[PD] accuracy of signal/message-objects

IOhannes m zmoelnig zmoelnig at iem.at
Mon May 7 12:58:41 CEST 2007


Roman Haefeli wrote:
> i made a little vsnapshot~ test patch. it seems that [vsnapshot~] is not
> working as expected, though it definitely gives other results than
> [snapshot~].

i think it is working as expected but there are 2 things to bear in mind:

> one issue might be introduced by the rounding error of floats. the other
> i cannot explain. vsnapshot~ seems to pick sometimes the wrong value.

[vline~] and [vsnapshot~] do not work exactly alike, because of this
vexed causality....

when you send a message to [vline~] it is scheduled to the next
dsp-block (sample accurateley); the last one is already done
when you send a message to [vsnapshot~] it operates on the last
dsp-block; the next one does not yet exist

this is somehow logical: when you query [vsnapshot~] you do want the
result immediately (because that's the way how messages are handled in
pd); the only result it can give you, is that of already known samples.

the only way to overcome this, is by delaying the sampling bang by one
dsp-block.



the other thing with the "irregularities" is simpler:
even when messages have "sub-sample" accuracy, the signal-vectors are
only sample-accurate.
so when you read the sample-values of a sawtooth immediately after the
jump, you will always get different values unless the frequency of your
ugen is "in sync" with your samplerate.
see also: shannon's sampling theorem


attached is a modified patch


fm.asdr
IOhannes
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vsnapshot~-test2.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070507/3ba7fcaa/attachment.asc>


More information about the Pd-list mailing list