Plugin

Plugin

new Plugin()

Members

(static) API :Map.<string, string>

The Scripter/Scriptex interface that the Plugin will conform to. The default interface is Scriptex.API. Subclasses can return a list of their own bindings for custom integrations

See:
Type:
  • Map.<string, string>
Example
class CustomPlugin extends Plugin {
   // @override
   static get API () {
     return [
       ...super.API
     , [ `ParameterChanged`, `updateModel` ]
     , [ `PluginParameters`, `views`]
     , [ `ResetParameterDefaults`, `needsViewResets`]
     ]
   }

   // @lends Scripter.PluginParameters
   get views () {
     return [
       // parameter definintions
     ]
   }

   // @lends Scripter.ResetParameterDefaults
   get needsViewResets () {
     return true
   }

   // @alias Scripter.ParameterChanged
   updateModel (key, val) {
     key = this.views[key].ID && this[key] = val
   }

   // @alias Scripter.HandleMIDI
   // as defined in Scriptex.API, available via super.API in example
   onMidi (midi) {
     midi.send()
   }
 }

 Trace(CustomPlugin.deploy()) // [ParameterChanged, ResetParameterDefaults, PluginParameters]

Methods

(static) deploy(systemopt, configurableopt, …ctorArgsopt) → {Array.<string>}

Instantiate and integrate a new plugin with the Scripter environment.

See:
Parameters:
Name Type Attributes Default Description
system Object <optional>
Scripter
configurable Boolean <optional>
false
ctorArgs * <optional>
<repeatable>
[]

Any arguments to pass to Plugin subclass constructors.

Returns:
Type:
Array.<string>

An enumeration of the Scripter integrations