Recherche Google
ModalysControllers > Constant Controller
page précédentepage suivante

Constant Controller

Description

This is a controller which outputs a constant, i.e. unchanging, value.

(make-controller 'constant ... ) / (const ... )

Lisp Syntax and Default Values

The 'constant controller can be created using the following Lisp syntax:

(make-controller 'constant dimension value ... )

or:

(make-controller 'constant dimension list )

or:

(const value ... )

or:

(const list )

Parameters

The 'constant controller takes the following arguments:

  • dimension: number of values the controller will output.
  • value: the value(s) output by the controller at any given time.
  • list: a list of value(s) output by the controller at any given time.

The constant controller is one of the most commonly-used controllers in Modalys. It outputs a constant, unchanging, value in all dimensions.

The number of values given depends on the dimension. If the number of values exceeds the dimension given, only the required number of values is used. If the number of given values is less than the dimension, the remaining dimensions are filled with controllers whose value is zero.

Although it can be created using the standard (make-controller ... ) syntax, it has a convenient shorthand version (const ... ) that is more convenient and thus more often used.

On occasion, a numerical value may be provided in the place of a constant controller for some, but not all, Modalys functions.

Discussion

The controller's constant value(s) may be given as a series of individual values as arguments, or as a list:

(make-controller 'constant 3 50 60 70)

or:

(make-controller 'constant 3 '(50 60 70))

When using the shorthand version (const ... ) the number of dimensions is automatically calculated from the number of arguments given:

(const 50 60 70)

or:

(const '(50 60 70))

The above examples are all equivalent and can be used to create a 3-dimensional constant controller outputting 50, 60 and 70 in its three dimensions. The third of these examples is the easiest and therefore is the recommended way to create a controller.

Most often the (const ... ) function is used to create a simple one-dimensional controller such as the following example which outputs the value 0.36 at all times:

(const 0.36)

Options

There are no special options for this controller.

page précédentepage suivante
A propos...©IRCAM 2014Réalisé avec Scenari