Skip to content

Band-Limited Noise Controller

Description

Outputs bandlimited noise produced by oversampling a noise generator. The output values range from -1 to 1.

(make-controller 'bandlimited-noise ... )

Syntax and Default Values

The 'bandlimited-noise controller can be created using the following Lisp syntax:

(make-controller 'bandlimited-noise
                  dimension
                  period
                  cutoff
                  taps)

Parameters

The 'bandlimited-noise controller takes four arguments:

  • dimension: number of dimensions of the output controller.
  • period: sampling period (seconds).
  • cutoff: a controller specifying the cutoff frequency (in Hz.).
  • taps: integer number of taps used in the smoothing filter (an even integer not less than 4).

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

The cutoff frequency is a controller and therefore can be dynamically variable.

The number of filter taps for the smoothing function can be chosen. This parameter has an effect on the quality of the smoothing (but remember that the computation time increases with the square of taps). A good "clean" value for taps is 30, but anyway this is noise, so taking it down to 10 probably would not affect the sound that much for most uses. The minimum value for this parameter is 4.

Note also that using a higher value for the filter taps parameter will result in sample values that slightly exceed the -1 to 1 range. The random values themselves are within range, but bandlimiting and smoothing process will cause them to exceed these limits slightly.

Discussion

The band-limited noise controller can output multiple dimensions each with its own cutoff frequency. A graph of the following example is also shown in the image, above:

(setq my-rand (make-controller 'bandlimited-noise 3 0 (const 5 12 30) 10))
A controller with random values has many uses - 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 'bandlimited-noise 1 0 (const 880) 10 ))
(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)


★     ★