Type defitions for Logic Pro' Scripter.
Now you can do this, complete with type hints:
// @ts-check
/// <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 NodeOn) {
const echo = new NoteOn()
echo.sendAfterMilliseconds(GetParameter("delay"))
}
}
Create a tsconfig.json
withe 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" />
Browseable documentation can be found here.
Generated using TypeDoc