Skip to content

Référence API

Référence complète de l'API pour le scriptage et les extensions

API Lua

Voir API Lua pour la référence complète.

NeuroScript

Voir NeuroScript pour la référence du langage.

Constantes MIDI

Types de messages

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

Numéros CC courants

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

Fonctions d'assistance

Conversion de note

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

Création d'événement

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

Utilitaires

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

API de contexte

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

Portées : "local", "graph", "global"

Étapes suivantes

Créé avec ❤️ pour les musiciens