Difference between revisions of "Lua Midi"

From GiderosMobile
Line 17: Line 17:
 
[[luamidi:base0]] ''xxx''<br/><!--GIDEROSMTD:luamidi:base0() xxx-->
 
[[luamidi:base0]] ''xxx''<br/><!--GIDEROSMTD:luamidi:base0() xxx-->
 
[[luamidi:base1]] ''xxx''<br/><!--GIDEROSMTD:luamidi:base1() xxx-->
 
[[luamidi:base1]] ''xxx''<br/><!--GIDEROSMTD:luamidi:base1() xxx-->
[[luamidi:enumerateinports]] ''xxx''<br/><!--GIDEROSMTD:luamidi:enumerateinports() gets a table of Midi Device Names (its size is equal to luamidi:getinportcount())-->
+
[[luamidi:enumerateinports]] ''xxx''<br/><!--GIDEROSMTD:luamidi:enumerateinports() gets a table of Midi IN port names (its size is equal to luamidi:getinportcount())-->
[[luamidi:enumerateoutports]] ''xxx''<br/><!--GIDEROSMTD:luamidi:enumerateoutports()-->
+
[[luamidi:enumerateoutports]] ''xxx''<br/><!--GIDEROSMTD:luamidi:enumerateoutports() gets a table of Midi OUT port names (its size is equal to luamidi:getoutportcount())-->
 
[[luamidi:getInPortName]] ''gets the Midi IN port name''<br/><!--GIDEROSMTD:luamidi:getInPortName() gets the Midi IN port name-->
 
[[luamidi:getInPortName]] ''gets the Midi IN port name''<br/><!--GIDEROSMTD:luamidi:getInPortName() gets the Midi IN port name-->
[[luamidi:getMessage]] ''xxx''<br/><!--GIDEROSMTD:luamidi:getMessage() xxx-->
+
[[luamidi:getMessage]] ''gets the next incoming message from the queue from to chosen IN port''<br/><!--GIDEROSMTD:luamidi:getMessage(i) gets the next incoming message from the queue from IN port i; in the format c,n,v,_t-->
 
[[luamidi:getOutPortName]] ''gets the Midi OUT port name''<br/><!--GIDEROSMTD:luamidi:getOutPortName() gets the Midi OUT port name-->
 
[[luamidi:getOutPortName]] ''gets the Midi OUT port name''<br/><!--GIDEROSMTD:luamidi:getOutPortName() gets the Midi OUT port name-->
 
[[luamidi:getinportcount]] ''gets the number of Midi IN ports''<br/><!--GIDEROSMTD:luamidi:getinportcount() gets the number of Midi IN ports-->
 
[[luamidi:getinportcount]] ''gets the number of Midi IN ports''<br/><!--GIDEROSMTD:luamidi:getinportcount() gets the number of Midi IN ports-->
Line 28: Line 28:
 
[[luamidi:openin]] ''opens the Midi IN port''<br/><!--GIDEROSMTD:luamidi:openin() opens the Midi IN port-->
 
[[luamidi:openin]] ''opens the Midi IN port''<br/><!--GIDEROSMTD:luamidi:openin() opens the Midi IN port-->
 
[[luamidi:openout]] ''opens the Midi OUT port''<br/><!--GIDEROSMTD:luamidi:openout() opens the Midi OUT port-->
 
[[luamidi:openout]] ''opens the Midi OUT port''<br/><!--GIDEROSMTD:luamidi:openout() opens the Midi OUT port-->
[[luamidi:sendMessage]] ''xxx''<br/><!--GIDEROSMTD:luamidi:sendMessage() xxx-->
+
[[luamidi:sendMessage]] ''sends a message to the chosen OUT port''<br/><!--GIDEROSMTD:luamidi:sendMessage(i,c,n,v) sends a message to OUT port i-->
 
[[luamidi:setQueueSizeLimit]] ''sets the Midi queue size limit''<br/><!--GIDEROSMTD:luamidi:setQueueSizeLimit() sets the Midi queue size limit-->
 
[[luamidi:setQueueSizeLimit]] ''sets the Midi queue size limit''<br/><!--GIDEROSMTD:luamidi:setQueueSizeLimit() sets the Midi queue size limit-->
  

Revision as of 11:49, 27 June 2022

Supported platforms: Platform mac.pngPlatform pc.png
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"

Methods

luamidi:base0 xxx
luamidi:base1 xxx
luamidi:enumerateinports xxx
luamidi:enumerateoutports xxx
luamidi:getInPortName gets the Midi IN port name
luamidi:getMessage gets the next incoming message from the queue from to chosen IN port
luamidi:getOutPortName gets the Midi OUT port name
luamidi:getinportcount gets the number of Midi IN ports
luamidi:getoutportcount gets the number of Midi OUT ports
luamidi:noteOff xxx
luamidi:noteOn xxx
luamidi:openin opens the Midi IN port
luamidi:openout opens the Midi OUT port
luamidi:sendMessage sends a message to the chosen OUT port
luamidi:setQueueSizeLimit sets the Midi queue size limit

Events

Constants