logic-pro-types
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

logic-pro-types

TypeScript type definitions for Logic Pro's Scripter.

usage

Now you can do this, complete with type hints:

/// <reference types="logic-pro-types" />
const PluginParameters: PluginParameters = [
  {
    name: "delay",
    type: "lin",
    minValue: 100,
    maxValue: 500,
    defaultValue: 200,
  },
]

function HandleMIDI(e: NoteOn | NoteOff) {
  e.send()

  if (e instanceof NoteOn) {
    const echo = new NoteOn()
    echo.sendAfterMilliseconds(GetParameter("delay"))
  }
}

install

Create a tsconfig.json with the following compiler options:

{
  "compilerOptions": {
    "outDir": "<where you want your scripts written out>",
    "target": "ES6",
    "skipLibCheck": true
  },
  "include": ["<your source files>"]
}

Install logic-pro-types as a devDependency of your project:

$ npm install --save-dev logic-pro-types

Then, in your typescript source files, reference the logic-pro-types types like:

/// <reference types="logic-pro-types" />

api docs

Browseable documentation can be found here.

Package Sidebar

Install

npm i logic-pro-types

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

8.18 kB

Total Files

8

Last publish

Collaborators

  • jeremyruppel