Difference between revisions of "Lua Midi"
Line 14: | Line 14: | ||
See [https://github.com/dwiel/luamidi/blob/master/src/luamidi.cpp luamidi syntax] for full syntax. | See [https://github.com/dwiel/luamidi/blob/master/src/luamidi.cpp luamidi syntax] for full syntax. | ||
+ | Example for getting a message: | ||
+ | |||
+ | <source lang="lua"> | ||
+ | require "luamidi" | ||
+ | </source> | ||
+ | local midiCount=luamidi.getinportcount() | ||
+ | if midiCount==0 then return end -- no midi device | ||
+ | _midiDeviceName=luamidi.enumerateinports()[1] --the name of the device at first IN port | ||
+ | |||
+ | local s, n, v, _t = pcall(luamidi.getMessage, 1) | ||
+ | if not status then return end | ||
{|- | {|- | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| |
Revision as of 12:36, 27 June 2022
Supported platforms:
Available since: Gideros 2018.12
Description
Provides a simple interface for MIDI I/O.
To add Midi support to your application you call:
require "luamidi"
See luamidi syntax for full syntax.
Example for getting a message:
require "luamidi"
local midiCount=luamidi.getinportcount()
if midiCount==0 then return end -- no midi device _midiDeviceName=luamidi.enumerateinports()[1] --the name of the device at first IN port
local s, n, v, _t = pcall(luamidi.getMessage, 1) if not status then return end
Methodsluamidi:base0 sets that when sending messages the channels are in the range 0-15 |
EventsConstants |