Re: safe addition of arguments to existing ugens

[email protected]
Newsgroups gmane.comp.audio.supercollider.devel
Message-ID <CAO9Q0tUF20wPXRevgRHoppaqzRhi1owmj1T39nau02iHjwZNtA@mail.gmail.com>
It's probably safe to assume, right, that for each added argument there
exists a default value which preserves the original behavior of the ugen
without the extra arg?

Tom

On Fri, Mar 23, 2018 at 6:13 PM, <[email protected]> wrote:

> i guess the array should always already be allocated with the known size
> of the linked ugen, and when the synthdef requests fewer slots, as
> nathan writes, it will have to fill the uninitalised slots with a
> sensible default value (or if that's not possible at least gracefully
> terminate the ugen initialisation).
>
> best, ...h.h...
>
>
> On 23/03/18 20:51, julian.rohrhuber-QYZGCWsIODmAF8UT6DzBU6xOck334EZe@public.gmane.org wrote:
> >>
> >> i thought of a very simple workaround for this -- in the Ctor code, a
> ugen can look at its own unit->mNumInputs and correctly handle edge cases.
> in the case of backward-compatible addition of arguments, this would mean
> that the new argument is optional and the plugin is smart enough to supply
> a default.
> >
> > This would have to mean that it extends the array of values by some
> default like zero, so that the macros like ZXP() and IN() would never read
> uninitialised data?
> >
> >
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.