Access Force Controller
Description
This controller outputs the interaction force of a connection at a specific access.
Syntax and Default Values
The access-force controller can be created using the following Mlys (Max), mlys.lua, or Lisp syntax:
In Modalys for Max, this object is named mlys.access-force:
⚠️ Because of the graph-oriented nature of Max, the use of this controller is limited in Max and you can connect its inlet to some object's outlet only. For more flexibility, please use the Lua (mlys.lua) flavor!
modalys.create_controller{kind="access-force",
access=<reference to an existing access>}
(make-controller 'access-force
dimension
access)
Parameters
The Access Force controller takes two arguments:
- dimension: must be set to 1 (automatic for Lua or Max).
- access: reference to an access on an object.
The access reference must have connection associated with it.
Discussion
This is a controller which outputs the interaction force of a connection at an access. It could be used, for example, to acquire the force exerted by one connection and apply it to another object using a 'force controller, as in the following example, which takes the pluck from Modalys example 1 and uses the interaction force from the string to excite the plate from Modalys example 2 (instead of a strike connection):
(setq force-ctl (make-controller 'access-force 1 my-string-plk))
(make-connection 'force my-plate-hit force-ctl)
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
This was formerly called (make-controller 'connection-force ... ) and operated on a connection, instead of an access. A handful of very ancient Modalys scripts may need to be updated to use the new syntax.
★