Skip to content

Access Position Controller

Description

This is a controller which outputs the position of a given access.

(make-controller 'access-position ... )

Lisp Syntax and Default Values

The 'access-position controller can be created using the following Lisp syntax:

(make-controller 'access-position dimension access_reference)

Parameters

The 'access-position controller takes two arguments:

  • dimension: number of dimensions of the controller (in this case, 1).
  • access_reference: an access on an object.

The dimension for this controller should be set to 1.

Discussion

The Access Position Controller is an easy way of getting the position of a given access on an object every sample, and using it as a controller. When using a 'force connection, you will generally want to use the access' speed, not its position. Nonetheless, the position could also be used for a variation in the resulting timbre.

The following example takes the pluck from Modalys example 1 and uses the access position of the the string to excite the plate from Modalys example 2 (instead of using a strike connection):

(setq force-ctl (make-controller 'access-position 1 my-string-plk))
(make-connection 'force my-plate-hit force-ctl)
This results in a very different sound from using an 'access-force or 'access-speed controller.

The image at the top of this page shows force, position and speed controllers obtained from the plucked access on the string and a position controller from the plucking access on the plectrum as given in the Modalys plucked string example.

Options

Retro-Compatibility

In a lot of older Modalys scripts (those made before this function was added) the (get-info ... ) function was used with a 'foreign-call controller (formerly called a 'scheme controller) to create a controller outputting an access' position. It is suggested you update such old scripts to use the new syntax, since the calculation time will be significantly faster.

This is an example of how this had formerly been achieved using the 'foreign-call (or, even earlier, 'scheme) controller:

(make-controller 'foreign-call 1 0
         (lambda (ins outs) 
                  (vset outs 0 (get-info 'position access-ref)))
         '())
However, obtaining the access speed this way is much more computationally expensive.