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
#N canvas 195 55 722 477 10; #X floatatom 12 296 0 0 0 0 - - -; #X obj 12 279 vsnapshot~; #X msg 72 206 1; #X obj 74 236 vmetro 100; #X msg 42 205 0; #X msg 13 127 bang; #X obj 13 103 loadbang; #X obj 74 255 del; #X obj 192 226 /; #X msg 192 207 64 44.1; #X floatatom 192 247 5 0 0 0 - - -; #X obj 13 226 phasor~; #X msg 70 90 44100 64; #X obj 70 113 /; #X floatatom 70 131 5 0 0 0 - - -; #X obj 13 204 f 10; #X obj 13 185 t a b; #X obj 73 184 t b a; #X msg 119 195 1000 $1; #X obj 119 212 /; #X obj 119 176 f 10; #X obj 13 156 t a a; #X obj 192 186 loadbang; #X connect 1 0 0 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 4 0 11 1; #X connect 5 0 21 0; #X connect 6 0 5 0; #X connect 7 0 1 0; #X connect 8 0 10 0; #X connect 9 0 8 0; #X connect 10 0 7 1; #X connect 11 0 1 0; #X connect 12 0 13 0; #X connect 13 0 14 0; #X connect 14 0 21 0; #X connect 15 0 11 0; #X connect 16 0 15 0; #X connect 16 1 4 0; #X connect 17 0 2 0; #X connect 17 1 20 0; #X connect 18 0 19 0; #X connect 19 0 3 1; #X connect 20 0 18 0; #X connect 21 0 16 0; #X connect 21 1 17 0; #X connect 22 0 9 0;