[PD] writing dsp externals for variable number of inlets
ahmet.kizilay at gmail.com
Sat May 7 23:06:52 CEST 2011
Thanks for your reply.
I looked through the source code and found out about the dsp_addv method,
which was created specifically for this purpose.
On Sat, May 7, 2011 at 7:43 PM, Charles Henry <czhenry at gmail.com> wrote:
> Hi, Ahmet
> I don't know how to create a variable argument type of function definition
> for this purpose, but it should be clear that your dsp function knows how
> many inlets there will be. You will be setting the number of inlets when
> the object is created.
> You could make a maximum number of inlets and add a data structure element
> to store the number of inlets. Then, in your dsp function, put a case
> statement to look up the dsp_add call with the correct number of arguments.
> I'm not sure that's the best way, since dsp_add has a variable number of
> arguments in its definition. It would make sense to me if function calls
> had to have a fixed number of arguments, but I'm just not sure.
> On Sat, May 7, 2011 at 10:01 AM, Ahmet Kizilay <ahmet.kizilay at gmail.com>wrote:
>> I want to write an external which creates the signal inlets dynamically
>> depending on the number of arguments, just like the multiplex~ object from
>> My question is about writing the dsp_add function. How do I set the
>> arguments when I don't exactly know how many signals I will be handling?
>> I hope my question is appropriate for the list (first post)?
>> ahmet kizilay
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management ->
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list