Hi all !
I'm sorry to interfere your conference about soundcards; by the way, as some of you might know, I'm using Win95 and pd definitely works (SoundBlaster AWE32, TerraTEC EWS64).
I have one major problem and that is concerning writing externals (again !) Can I create an oject that has any (!) user-defined (via creation arguments) number of signal in/out-lets ? Me thinketh of something like the multichannel dac~/adc~ objects, but I have to access all ~inlets at the same (!) time and not sequentially...
thanks in advance
hannes
P.S.: Did anyone get Günter's ggext-0.6 to run on Win-platforms already ?
forum::für::umläute writes:
Hi all !
I'm sorry to interfere your conference about soundcards; by the way, as some of you might know, I'm using Win95 and pd definitely works (SoundBlaster AWE32, TerraTEC EWS64).
I have one major problem and that is concerning writing externals (again !) Can I create an oject that has any (!) user-defined (via creation arguments) number of signal in/out-lets ? Me thinketh of something like the multichannel dac~/adc~ objects, but I have to access all ~inlets at the same (!) time and not sequentially...
This seems to be a matter of calling dsp_add with a sufficient number of arguments. I don't know how this could be done dynamically.
thanks in advance
hannes
P.S.: Did anyone get Günter's ggext-0.6 to run on Win-platforms already ?
Most of the new objects won't work under NT, as pd doesn't export the necessary symbols. You'd have to add a "EXPORT" to every missing symbol in g_canvas.h and recompile pd in order to get it working. -- and there may be some other quirks too. Currently (at version 0.8) the code isn't really stable at all. But it's improving.
Guenter
Guenter Geiger schrieb:
forum::für::umläute writes:
Hi all !
I have one major problem and that is concerning writing externals (again !) Can I create an oject that has any (!) user-defined (via creation arguments) number of signal in/out-lets ? Me thinketh of something like the multichannel dac~/adc~ objects, but I have to access all ~inlets at the same (!) time and not sequentially...
This seems to be a matter of calling dsp_add with a sufficient number of arguments. I don't know how this could be done dynamically.
That's exactly what's my question about; surely I could do something really annoying like calling the dsp_add with 64 or so arguments and then use only the desired number; but of course that's not what I wanna do;
hannes
forum::für::umläute writes:
Guenter Geiger schrieb:
forum::für::umläute writes:
Hi all !
I have one major problem and that is concerning writing externals (again !) Can I create an oject that has any (!) user-defined (via creation arguments) number of signal in/out-lets ? Me thinketh of something like the multichannel dac~/adc~ objects, but I have to access all ~inlets at the same (!) time and not sequentially...
This seems to be a matter of calling dsp_add with a sufficient number of arguments. I don't know how this could be done dynamically.
That's exactly what's my question about; surely I could do something really annoying like calling the dsp_add with 64 or so arguments and then use only the desired number; but of course that's not what I wanna do;
hannes
In this case you'd have to reimplement dsp_add the way you want it. It's not that hard, look in "d_ugens.c" for dsp_add and implement a function there which takes the following arguments:
EXTERN void dsp_add_v(t_perfroutine f, int n, t_int* args);
You can then rewrite dsp_add to not use the va_start, va_arg, va_end macros and just iterate over your supplied array of objects.
untested (and may not work at all, but you get the idea) ... :
void dsp_add_v(t_perfroutine f, int n, t_int* args) { int newsize = dsp_chainsize + n+1; int i; dsp_chain = t_resizebytes(dsp_chain, dsp_chainsize * sizeof (t_int), newsize * sizeof (t_int));
dsp_chain[dsp_chainsize-1] = (t_int)f;
for (i = 0; i < n; i++)
{
dsp_chain[dsp_chainsize + i] = *args++;
}
dsp_chain[newsize-1] = 0;
dsp_chainsize = newsize;
add the prototype to m_pd.h and recompile pd ... and later, get Miller to include the function in the pd distribution :)
Well, after all that's how I would try to do it.
Guenter