uvi-script
Musical event scripting with Lua
Loading...
Searching...
No Matches
MIDI

Classes

class  Event
 Event types. More...
 
class  MidiEvent
 A Midi Event. More...
 
class  MidiSequence
 A Midi sequence that represent a midi file. More...
 

Functions

void postMidiEvent (MidiEvent e)
 send a MidiEvent directly to the script engine event queue.
 
function controlChange (cc, val, ch, inp)
 sends a ControlChange event.
 
function programChange (val, ch, inp)
 sends a ProgramChange event.
 
function pitchBend (b, ch, inp)
 sends a PitchBend event.
 
function afterTouch (v, ch, inp)
 sends an AfterTouch event.
 
function polyAfterTouch (v, n, ch, inp)
 sends a PolyAfterTouch event.
 

Detailed Description

MIDI event generation, file handling, and event structures.

Provides helper functions for generating outgoing MIDI events, classes for loading and manipulating MIDI files, and functions to post raw MIDI events to the engine.

Event Generation Helpers:

Key Classes:

MIDI File Operations:

Raw Event Posting:

Note
MIDI events posted via postMidiEvent() don't have voice IDs. For advanced voice tracking, use playNote() and releaseVoice() instead.
See also
MIDI Event Generation, Events, Async

Function Documentation

◆ afterTouch()

function afterTouch ( v ,
ch ,
inp  )

sends an AfterTouch event.

Parameters
vMIDI AfterTouch value
ch(optional) MIDI channel
inp(optional) MIDI input
See also
postEvent, onAfterTouch

◆ controlChange()

function controlChange ( cc ,
val ,
ch ,
inp  )

sends a ControlChange event.

Parameters
ccMIDI Control Change number
valMIDI Control Change value
ch(optional) MIDI channel
inp(optional) MIDI input
See also
postEvent, onController

◆ pitchBend()

function pitchBend ( b ,
ch ,
inp  )

sends a PitchBend event.

Parameters
bPitchBend value in [-1;1]
ch(optional) MIDI channel
inp(optional) MIDI input
See also
postEvent, onPitchBend

◆ polyAfterTouch()

function polyAfterTouch ( v ,
n ,
ch ,
inp  )

sends a PolyAfterTouch event.

Parameters
vMIDI AfterTouch value
nMIDI note number
ch(optional) MIDI channel
inp(optional) MIDI input
See also
postEvent, onPolyAfterTouch

◆ postMidiEvent()

void postMidiEvent ( MidiEvent e)

send a MidiEvent directly to the script engine event queue.

MidiEvent are posted as-is to the event queue in order to make midi file playing easy. i.e. they don't have voiceId If you need more advanced events processing, you should use playNote() and releaseVoice() and keep track yourself of which note triggered each voiceId.

Parameters
eMIDI event to be sent
See also
loadMidi, MidiEvent, MidiSequence

◆ programChange()

function programChange ( val ,
ch ,
inp  )

sends a ProgramChange event.

Parameters
valMIDI Program Change value
ch(optional) MIDI channel
inp(optional) MIDI input
See also
postEvent, onProgramChange