Delay Controller
Description
A controller whose output is that of an input controller delayed in time.
Syntax and Default Values
The 'delay controller can be created using the following Mlys (Max), mlys.lua, or Lisp syntax:
In Modalys for Max, this object is named mlys.delay:
Connect another controller as input to the first inlet.
The delay parameter can be accessed dynamically through a message to modalys~, ex: {MyDelay@delay 0.3}
👍 If a second inlet is given, you can connect another controller to command the delay parameter.
modalys.create_controller{kind="delay",
input=<some controller>,
delay=0.5}
(make-controller 'delay
dimension
delay
input)
Parameters
The 'delay controller takes three arguments:
- dimension: number of dimensions of the input and output controllers (automatic in mlys.lua and Modalys for Max).
- delay: a controller (or numerical value) expressing the delay time in seconds.
- input: controller to be delayed.
The number of dimensions should be the same as that of the input controller.
The delay time can be either a constant or dynamic controller, or else be given as a numerical value.
Discussion
The following shows a very simple example of using the delay controller to delay a simple envelope by half a second (as shown in the graph, at the top of this page):
(setq my-env (make-controller 'envelope 1 '((0 0.0) (0.2 1.0) (0.4 0)) ))
(setq my-delay (make-controller 'delay 1 0.5 my-env))
(setq speed-ctl (make-controller 'access-speed 1 my-string-plk))
(setq delay-ctl (make-controller 'delay 1 (const 0.25) speed-ctl))
(make-connection 'force my-plate-hit delay-ctl)
★