Skip to content

API Reference

Complete API reference for scripting and extensions

Lua API

See Lua API for complete reference.

NeuroScript

See NeuroScript for language reference.

MIDI Constants

Message Types

lua
MIDI.NOTE_ON = 0x90
MIDI.NOTE_OFF = 0x80
MIDI.CC = 0xB0
MIDI.PITCH_BEND = 0xE0
MIDI.PROGRAM_CHANGE = 0xC0
MIDI.AFTERTOUCH = 0xA0
MIDI.CHANNEL_PRESSURE = 0xD0

Common CC Numbers

lua
MIDI.CC_MOD_WHEEL = 1
MIDI.CC_BREATH = 2
MIDI.CC_VOLUME = 7
MIDI.CC_PAN = 10
MIDI.CC_EXPRESSION = 11
MIDI.CC_SUSTAIN = 64
MIDI.CC_PORTAMENTO = 65
MIDI.CC_SOSTENUTO = 66
MIDI.CC_SOFT_PEDAL = 67
MIDI.CC_FILTER_CUTOFF = 74
MIDI.CC_REVERB = 91
MIDI.CC_CHORUS = 93

Helper Functions

Note Conversion

lua
MIDI.noteName(60)        // "C4"
MIDI.noteNumber("C#3")   // 49
MIDI.noteToFrequency(69) // 440.0 (A4)

Event Creation

lua
MIDI.noteOn(channel, note, velocity)
MIDI.noteOff(channel, note, velocity)
MIDI.cc(channel, number, value)
MIDI.pitchBend(channel, value)
MIDI.programChange(channel, program)

Utilities

lua
MIDI.clamp(value)        // Clamp to 0-127
MIDI.scale(value, inMin, inMax, outMin, outMax)
MIDI.lerp(a, b, t)       // Linear interpolation

Context API

lua
context.set(scope, key, value)
context.get(scope, key)
context.has(scope, key)
context.delete(scope, key)
context.clear(scope)

Scopes: "local", "graph", "global"

Next Steps

Built with ❤️ for musicians