Skip to content

Last Sample Controller

Description

A controller that always returns the last sample output by the system. (currently appears to be broken)

(make-controller 'last-sample ... )

Lisp Syntax and Default Values

The 'last-sample controller can be created using the following Lisp syntax:

(make-controller 'last-sample dimension)

Parameters

The 'last-sample controller takes just one argument:

  • dimension: number of dimensions of the controller (see note, below).

The dimension for this controller must match the number of audio output channels being calculated (see the set-number-of-channels command).

Discussion

This controller always returns the last sample(s) that were output by the system, using the (make-point-output ... ) function. The dimension of the controller must be the same as the number of output channels. This controller might be useful for writing a 'foreign-call controller to make decisions based on the presence of output sound, or using the output sound in a feedback loop to excite other objects. In this case the default feedback delay time would naturally be one sample, unless the controller were delayed with (make-controller 'delay ... ).

To use this controller, you must first define the number of output channels using the (set-number-of-channels ... ) command, even when only synthesizing the default one channel of sound.

Options

There are no special options for this controller.