Skip to content

Access Speed Controller

Description

This controller outputs the speed of vibration of a given access.

Syntax and Default Values

The access-speed controller can be created using the following Lisp or mlys.lua syntax:

(make-controller 'access-speed
                  dimension
                  access)
modalys.create_controller{kind="access-speed",
                          access=[reference to an existing access]}

Parameters

The 'access-speed controller takes two arguments:

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

The dimension for this controller should be set to 1.

Discussion

The Access Speed Controller is an easy way of getting the speed of a given access on an object every sample, and using it as a controller. It is especially useful for simulating sympathetic vibration of objects, since the output sound of an object is generated by the object's speed. Therefore when using a 'force interaction for sympathetic vibration and resonance, you should use the access' speed, and this controller makes it easy to do so.

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

(setq force-ctl (make-controller 'access-speed 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-position 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.

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' speed. 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 'speed access-ref)))
         '())
However, obtaining the access speed this way is much more computationally expensive.
★     ★