Re: [PD] convolution using pd-vanilla
and it took me quite some time to figure it out :) 2014-05-06 10:55 GMT-03:00 Oli Larkin olilar...@googlemail.com: thanks everyone ... Alexandre that is just what i was looking for On 6 May 2014, at 06:09, Alexandre Torres Porres wrote: I did one and shared on the list you can check it at: https://drive.google.com/file/d/0B3AoiT0xk8fnNU9PRHdldVVFbU0/edit?usp=sharing 2014-05-05 16:41 GMT-03:00 katja katjavet...@gmail.com: Brute force time domain convolution for small kernel can be done with [fexpr~]. For zero phase filter kernels, fast convolution in Pd is relatively simple. Multiply real and imaginary part of the signal's spectrum with the filter's spectrum while using four times overlap and Hann windowing before FFT and after IFFT, and normalize. Pd's FFT routines assume x[0] at the start of the filter kernel, not at the center, so you have to rotate your zero phase filter kernel before taking it's Fourier Transform. Katja On Mon, May 5, 2014 at 8:49 PM, david medine dmed...@ucsd.edu wrote: For the FFT based convolution, you could easily modify the example patch I06.timbre.stamp.pd to do straight up convolution in the frequency domain. I wouldn't know how to do it in the time domain without an extern or a lot of painstaking work. It might be a nice thing to have, though. I can tell you, though, that the frequency domain method will out perform the time domain in terms of CPU usage. But, since you are windowing there will be a latency. Apart from that, the output is identical by both methods. y(n) = x(n) * g(n) Y(k) = X(k)G(k), y(n) = IDFT(Y(k)) where g(n) is the impulse response, X(k) is the discrete Fourier transform of x(n) and * is the convolution operation. On 05/05/2014 09:33 AM, Oli Larkin wrote: hi, is anyone aware of an example of both a brute force time domain (e.g. buffir~ in Max) and an FFT-based fast convolution patch in pd-vanilla? I would like to do a comparison of the two. Can be using a small IR, just for demo purposes. cheers, Oli ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
[PD] more sprites!
Hi list, Here's another data structure sprite example: http://www.jonathanwilkes.net/sprite.webm I changed the object name and interface a little bit-- now sprites can have affine transformations. It's neat to use the transform method to see how few objects it takes to animate the sprite across the screen. Under the hood, the transform method should also be more efficient-- instead of vis'ing and unvis'ing the scalar, it just sends updated attribute to the image. Does anyone know if there's a standard sprite sheet format? Some sprite sheets divide up the sections into perfectly equal parts-- others look like they just spread them out arbitrarily through a png or gif. Atm I just take a directory as an arg and slurp up an image sequence. (And use imagemagick to split up the sprite sheet.) Best, Jonathan ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
[PD] recursive controls problem
greetings! i'm sure this is a simple problem, but i can't seem to come up with the solution... i'm trying to control one numerical value in a few ways: 1. have a bang to set an initial value 2. have a slider for mouse control 3. use keyboard keys to increment and decrement the attached patch all works, except i ALSO want the slider position to pick up the current value, as changed by any of the other methods. the problem is, of course, that if i connect the expr result back up to the slider input, i get a loop with stack overflow errors. i'd be most grateful for any pointers you can offer... thanks much! cheers! .pltk. #N canvas 0 29 958 1049 10; #X obj 54 95 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X msg 55 117 0.9; #X obj 251 122 key; #X obj 251 144 select 113; #X obj 125 330 expr $f1+$f2; #X msg 251 167 0.05; #X floatatom 125 352 5 0 0 0 - - -, f 5; #X obj 89 69 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 1000 1; #X obj 211 183 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 150 297 float; #X obj 369 116 key; #X obj 333 178 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 369 138 select 97; #X msg 369 161 -0.05; #X msg 184 134 0; #X connect 0 0 1 0; #X connect 0 0 14 0; #X connect 1 0 9 0; #X connect 2 0 3 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 4 0 9 1; #X connect 5 0 4 1; #X connect 5 0 8 0; #X connect 7 0 9 0; #X connect 7 0 14 0; #X connect 8 0 9 0; #X connect 9 0 4 0; #X connect 10 0 12 0; #X connect 11 0 9 0; #X connect 12 0 13 0; #X connect 13 0 11 0; #X connect 13 0 4 1; #X connect 14 0 4 1; ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list