Hi,
I've been learning how to program externals for pd for some time now. However, I've been wondering if there is a way to acquire the block size inside the external e.g. inside my_obj_new()?
I'm using fftw, and I need to know the block size to allocate memory and to create the plans for the transforms. Of course I could hard code the frame size, or perhaps have it as a parameter. Still it would make things so much more flexible if I could use the existing block size.
Thanks for any help!
-miikka
Hallo!
I've been learning how to program externals for pd for some time now. However, I've been wondering if there is a way to acquire the block size inside the external e.g. inside my_obj_new()?
you get it in the perform routine: http://pd.iem.at/externals-HOWTO/node6.html :
t_int *pan_tilde_perform(t_int *w) { t_pan_tilde *x = (t_pan_tilde *)(w[1]); t_sample *in1 = (t_sample *)(w[2]); t_sample *in2 = (t_sample *)(w[3]); t_sample *out = (t_sample *)(w[4]); int n = (int)(w[5]) // block size
LG Georg
I've been learning how to program externals for pd for some time now. However, I've been wondering if there is a way to acquire the block size inside the external e.g. inside my_obj_new()?
you get it in the perform routine: http://pd.iem.at/externals-HOWTO/node6.html :
If you are using the blocksize for non-DSP processing, you could also use the DSP method (same howto page) which only gets called when the dsp chain gets recompiled (e.g. when audio is turned on) and not every DSP tick, therefore saving resources.
best greetings, Thomas