![]() |
uvi-script
Musical event scripting with Lua
|
| function | getBarDuration () |
| return the duration of a bar in ms. | |
| function | getBeatDuration () |
| return the duration of a beat in ms. | |
| function | getSamplingRate () |
| return the current audio sampling rate. | |
| function | getTempo () |
| return the current tempo. | |
| function | getTimeSignature () |
| the current time signature in the form num,den. | |
| function | getCC (cc) |
| Retrieve the last control change value received for the given cc number. | |
| function | getTime () |
| get the number of milliseconds elapsed since the script engine start. | |
| function | getBeatTime () |
| get song position in beats. | |
| function | getRunningBeatTime () |
| get song position in beats. | |
| function | getNoteDuration (note) |
| return the number of ms since the last note-on for the given note. | |
| function | isKeyDown (note) |
| test whether a note's key is down. | |
| function | isOctaveKeyDown (note) |
| test if a note is down ignoring octave. | |
| function | isNoteHeld () |
| return true if the note that created this callback is still held. | |
Functions for querying the current musical context and performance state.
These functions provide access to timing information (tempo, beat position, time signature), MIDI controller values, key states, and other performance context that your scripts can use to make musically intelligent decisions.
Tempo & Duration:
Beat Position:
Note & Key State:
MIDI State:
| function getBarDuration | ( | ) |
return the duration of a bar in ms.
| function getBeatDuration | ( | ) |
return the duration of a beat in ms.
| function getBeatTime | ( | ) |
| function getCC | ( | cc | ) |
Retrieve the last control change value received for the given cc number.
Only incoming events are tracked, whatever their MIDI channel or input: CCs sent with controlChange() or postEvent() are not, nor are the RPN/NRPN/data entry CCs filtered out by default (see enable_rpn_as_cc()). Before any CC has been received the value is 0, except CC 11 and CC 43 (expression MSB/LSB) which start at 127.
| cc | the control change number in the range 0-127 |
| function getNoteDuration | ( | note | ) |
return the number of ms since the last note-on for the given note.
| note | note number in the range 0-127 |
| function getRunningBeatTime | ( | ) |
get song position in beats.
From the host if playing and using an internal monotonic clock if not
| function getSamplingRate | ( | ) |
return the current audio sampling rate.
| function getTempo | ( | ) |
return the current tempo.
| function getTime | ( | ) |
get the number of milliseconds elapsed since the script engine start.
| function getTimeSignature | ( | ) |
the current time signature in the form num,den.
| function isKeyDown | ( | note | ) |
test whether a note's key is down.
| note | note number in the range 0-127 |
| function isNoteHeld | ( | ) |
return true if the note that created this callback is still held.
| function isOctaveKeyDown | ( | note | ) |
test if a note is down ignoring octave.
| note | note number in the range 0-127 |