Forums > MaxMSP

pfft~ or delay~ bug or me

March 6, 2007 | 5:30 am

Ok just finished installing the latest and greatest Cycling 74 programs. If one were to put a signal through a pfft~ of size 512 and then delay~ the same signal by 512~ shouldn’t one expect silence from the subtraction of the two resultant signals. I get no sound for 448 delay~

Windows Xp
AMD Athlong 64 Dual Core Processor
4800+
2.00GB of RAM

here is the example patch

max v2;
#N vpatcher 15 55 615 952;
#P window setfont "Sans Serif" 9.;
#P message 163 163 14 9109513 1;
#P message 127 221 23 9109513 448;
#P number 147 247 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P user scope~ 135 379 265 509 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0;
#P message 100 90 28 9109513 open;
#P newex 101 332 27 9109513 -~ 0.;
#P newex 101 283 72 9109513 delay~ 512 512;
#P toggle 66 87 15 0;
#P newex 66 369 36 9109513 dac~ 1;
#N sfplay~ 1 120960 0 ;
#P newobj 102 166 48 9109513 sfplay~ 1;
#P newex 197 230 95 9109513 pfft~ pfft_test 512 4;
#P connect 5 0 2 0;
#P connect 3 0 2 0;
#P connect 1 0 4 0;
#P connect 4 0 5 0;
#P connect 10 0 1 0;
#P connect 6 0 1 0;
#P connect 3 0 1 0;
#P fasten 0 0 5 1 202 322 123 322;
#P connect 5 0 7 0;
#P connect 9 0 8 0;
#P fasten 1 1 10 0 145 197 161 197 161 150 168 150;
#P connect 8 0 4 1;
#P connect 1 0 0 0;

here is the pfft patch
"pfft_test"
max v2;
#N vpatcher 15 55 615 455;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 115 288 88 9109513 fftout~ 1 blackman;
#P newex 113 97 82 9109513 fftin~ 1 blackman;
#P connect 0 0 1 0;
#P connect 0 1 1 1;
#P pop;


March 6, 2007 | 9:41 am

On 06 Mar 2007, at 06:30, Tyler Nitsch wrote:

>
> Ok just finished installing the latest and greatest Cycling 74
> programs. If one were to put a signal through a pfft~ of size 512
> and then delay~ the same signal by 512~ shouldn’t one expect
> silence from the subtraction of the two resultant signals. I get
> no sound for 448 delay~

AFAIK the actual delay caused by pfft is fft-size minus signal vector
size.
i guess your sigvs is set to 64.
try patch below.

what makes me wonder though, is that i don’t get complete silence
using a blackman window.
hanning and rectangle is fine.
-volker.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 127 135 43 196617 loop $1;
#P number 317 158 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 317 134 39 196617 !- 512;
#P button 252 55 22 0;
#P number 317 112 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 252 84 75 196617 adstatus sigvs;
#P number 150 256 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user scope~ 135 379 265 509 256 3 128 -1. 1. 0 0. 0 0. 102 255 51
135 135 135 0;
#P message 100 90 28 196617 open;
#P newex 102 332 106 196617 -~;
#P newex 102 283 83 196617 delay~ 512 512;
#P toggle 66 87 15 0;
#P newex 66 369 36 196617 dac~ 1;
#N sfplay~ 1 120960 0 ;
#P newobj 102 166 48 196617 sfplay~ 1;
#P newex 198 230 122 196617 pfft~ pfft_test 512 4;
#P connect 14 0 1 0;
#P connect 3 0 2 0;
#P connect 3 0 1 0;
#P connect 3 0 14 0;
#P connect 1 0 4 0;
#P connect 1 0 0 0;
#P connect 5 0 2 0;
#P connect 5 0 7 0;
#P connect 0 0 5 1;
#P fasten 13 0 8 0 322 214 155 214;
#P connect 12 0 13 0;
#P connect 10 0 12 0;
#P connect 11 0 9 0;
#P connect 9 1 10 0;
#P connect 4 0 5 0;
#P connect 6 0 1 0;
#P connect 8 0 4 1;
#P window clipboard copycount 15;


March 7, 2007 | 12:10 am

I would of thought that the signal vector size would imply the same delay on both the delay object and the pfft~. Not sure why the sig vector needs to be accounted for with the delay? Thanks for the solution though!!


March 8, 2007 | 1:23 pm

Tyler Nitsch schrieb:
> I would of thought that the signal vector size would imply the same
> delay on both the delay object and the pfft~. Not sure why the sig
> vector needs to be accounted for with the delay?

imagine you have the same vector size as fft size, you’d calculate the
whole within one frame and thus be ready at the same time. It’s just the
fastest way to do it… (and that’s what we want… ;-)

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


March 15, 2007 | 6:23 am

Blackman windowing doesn’t work properly for pfft.


March 15, 2007 | 6:32 am

let me tone down the frustration in that last post haha

"blackman windowing appears not to be working properly"

and thanks Volker and Stefan for straightening me out over the delay~ object.


Viewing 6 posts - 1 through 6 (of 6 total)