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

Random Controller

Description

Outputs one or more equally distributed random sequences (white noise). The output values range from -1 to 1.

(make-controller 'random ... )

Lisp Syntax and Default Values

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

(make-controller 'random dimension period)

Parameters

The 'random controller takes two arguments:

  • dimension: number of dimensions of the output controller.
  • period: sampling period (seconds).

The period is used to define the time between the updates of the controller. If zero is given then it updates every sample.

Discussion

The Random Controller is basically a white noise oscillator with an optional sample-and-hold mechanism, since it outputs values between -1 an 1, and has a user-defined sampling period. It is fairly simple to use and can output different random values in multiple dimensions, such as this example (whose graph is shown above) which outputs 3 dimensions of random values updated every 10 milliseconds:

(setq my-rand (make-controller 'random 3 0.01))

A controller with random values has many practical uses within the Modalys environment - not least of which is to provide a noise source to use with a force connection:

(setq my-string (make-object 'mono-string))

(setq my-string-acc (make-access my-string (const .6) 'trans0))

(setq my-noise (make-controller 'random 1 0))

(setq my-env (make-controller 'envelope 1 '((0 0) (0.1 5) (0.2 2) (0.3 0)) ))

(setq force-ctl (make-controller 'arithmetic 1 "*" my-noise my-env))

(make-connection 'force my-string-acc force-ctl)

Options

There are no special options for this controller.

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