[Csnd-dev] Default values

Eduardo Moguillansky <[email protected]>
Newsgroups gmane.comp.audio.csound.devel
Message-ID <CAHFFssLjjsr1NtvJL-5=f9nUMYjFneH8iraASYMwa_uyT6pATg@mail.gmail.com>
Hi,

Default values for parameters, together with named arguments, have been
discussed before. At the moment there is no way for an opcode to define
default values outside of some simple cases, like 0, -1 or 1. There are
cases where all of these are actually plausible values and it is not
possible to indicate that a parameter is unset at init time. I would like
to propose a new variable signature, different from o/O(=0), p/P(=1) or
j/J(=-1): u/U (undefined), which would receive a nan value. The opcode
would check that at init time and set it to a sensible default.

The same thing could be done for UDOs, although I would like to see actual
default values implemented.

cheers
eduardo
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.