Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
153 lines (131 loc) · 12.9 KB

plugins.core.tangent.manager.parameter.md

File metadata and controls

153 lines (131 loc) · 12.9 KB

docs » plugins.core.tangent.manager.parameter


Represents a Tangent Parameter control.

API Overview

API Documentation

Functions

Signature plugins.core.tangent.manager.parameter.is(thing) -> boolean
Type Function
Description Checks if the thing is a parameter instance.
Parameters
  • thing - The other object to test.
Returns
  • true if it is a parameter, false if not.
Signature plugins.core.tangent.manager.parameter:update()
Type Function
Description Updates the Tangent with the current value of the parameter.
Parameters
  • None
Returns
  • Nothing.

Constructors

Signature plugins.core.tangent.manager.parameter(id[, name[, parent]) -> parameter
Type Constructor
Description Creates a new Parameter instance.
Parameters
  • id - The ID number of the parameter.
  • name - The name of the parameter.
  • parent - The parent of the parameter.
Returns
  • the new parameter.

Methods

Signature plugins.core.tangent.manager.parameter:change(amount) -> number
Type Method
Description Executes the change function if present, and returns the new result. If
Parameters
  • amount - The amount to change the parameter.
Returns
  • The current value, or nil if it can't be accessed.
Signature plugins.core.tangent.manager.parameter:get() -> number
Type Method
Description Executes the get function if present, and returns the result. If
Parameters
  • None
Returns
  • The current value, or nil if it can't be accessed.

| Signature | plugins.core.tangent.manager.parameter:maxValue([value]) -> number | self | | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Gets or sets the maximum value for the parameter. | | Parameters |

  • value - The new value.
| | Returns |
  • If value is nil, the current value is returned, otherwise returns self.
|

| Signature | plugins.core.tangent.manager.parameter:minValue([value]) -> number | self | | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Gets or sets the minimum value for the parameter. | | Parameters |

  • value - The new value.
| | Returns |
  • If value is nil, the current value is returned, otherwise returns self.
|

Signature plugins.core.tangent.manager.parameter:onChange(changeFn) -> self
Type Method
Description Sets the function that will be called when the Tangent sends a 'parameter change' request.
Parameters
  • getFn - The function to call when the Tangent requests the parameter change.
Returns
  • The parameter instance.
Signature plugins.core.tangent.manager.parameter:onGet(getFn) -> self
Type Method
Description Sets the function that will be called when the Tangent sends a 'parameter value' request.
Parameters
  • getFn - The function to call when the Tangent requests the parameter value.
Returns
  • The parameter instance.
Signature plugins.core.tangent.manager.parameter:onReset(resetFn) -> self
Type Method
Description Sets the function that will be called when the Tangent sends a 'parameter reset' request.
Parameters
  • resetFn - The function to call when the Tangent requests the parameter reset.
Returns
  • The parameter instance.
Signature plugins.core.tangent.manager.parameter:press() -> nil
Type Method
Description Executes the press function, if present.
Parameters
  • None
Returns
  • nil
Signature plugins.core.tangent.manager.parameter:release() -> nil
Type Method
Description Executes the release function, if present.
Parameters
  • None
Returns
  • nil
Signature plugins.core.tangent.manager.parameter:reset() -> number
Type Method
Description Executes the reset function if present. Returns the current value of the parameter after reset.
Parameters
  • None
Returns
  • The current value, or nil if it can't be accessed.

| Signature | plugins.core.tangent.manager.parameter:stepSize([value]) -> number | self | | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Gets or sets the step size for the parameter. | | Parameters |

  • value - The new value.
| | Returns |
  • If value is nil, the current value is returned, otherwise returns self.
|

Signature plugins.core.tangent.manager.parameter:xml() -> cp.web.xml
Type Method
Description Returns the xml configuration for the Parameter.
Parameters
  • None
Returns
  • The xml for the Parameter.