@ClaudiusMaximus said:
Generally, it's useful to look at the source of Pd and other externals to see how its done. I recommend looking at pd-0.41-4/src/d_array.c lines 686-839 ([tabsend~] and [tabreceive~]).
Note that in pd-0.41-4 the array access API has changed: the old API was not 64-bit safe. If you have issues with that change, I can show you how I handled it in my code.
Hi, ClaudiusMaximus
Thanks a lot for your answers.
I have already worked with the "HOWTO write an external for Pure Data" and have some difficulties with, notably (I put the first compiled version of the external in a subfolder to use it within pd, while trying to see the code differences compiling the library elsewhere, without noticing any diference, obviously...), a potential bug in the code for span~.
-
within the text:
typedef struct _pan_tilde {
t_object x_obj;
t_sample f_pan;
t_float f;
} t_pan_tilde;
-
within the code:
typedef struct _pan_tilde {
t_object x_obj;
t_sample f_pan;
t_sample f; // Here is the difference: t_sample rather than t_float (better for the use?)
} t_pan_tilde;
I have made a first partial version (I have not translated the whole appendix) of a translation in French, adding some information about cross compilation, found in another external example.
I will consider to post it, if interesting, as soon as the translation would be enough good according to me. I will try to quote some potential mistyping errors to the author and german remaining formulation within next weeks, as, for the moment, I must first achieve several projects.
I have also studied another external code processing audio signals and begun to study the "m_pd.h" file and the d_array.c file or d_delay.c (quite fastly as I was in a hurry last night). I was searching for quoted versions and for another simple examples.
And I did not think, at this time, to see the code for tabsend~ or tabreceive~ functions: when you have the head in the handlebars, you do not see further than the end of your nose....
So, thanks a lot for the advice.
At this time I will just consider data in 16, 24 fixed or 32 floating point bits, so, I would not need the 64-bit representation: I do not use the FFT, working with an alternative potentially fast temporal method for convolution, needing far less requantization operations and then a less precise format for a more satisfying result.
But I could be quite interested in the future to consider 64-bit operations, so I would be happy to se how you manage this in your code.
I must have finished the related external(s) before next sunday as I will present the algorithm at the Audio Engineering Convention on monday 2008/05/19 at 10 am and I really would like to be able to perform a real time demonstration of the algortihm using pd...
I have much more experience with scilab and matlab prototyping, and I have been working since mid-january, with two assistants (doing a great and heavy work), to perform a C++ cross platform port of a scilab prototype of a perceptive audio scenes analyser I have designed, using the temporal convolution algorithm. So, I have been studying how to realise pd externals to have light but powerful real time demonstrators.
I will publish the sources (with a LGPL-like licence) and offer the binaries (Max OS 10.4 and 10.5.x for PPC or Intel-based processors, Windows XP and Vista at least, maybe Linux if its works directly) for downloading by the end of the year, once the documentation and the code will be enough satisfying and operational.
Once again, thanks a lot for your help. I will give feedback information and, maybe, ask for some more help, in next days... ;O)
Sincerly yours,
Laurent Millot
Acoustics and Signal Processing teacher for sound enginering students - Associate Researcher (Acoustics and Audio Signal Processing)