Functions

Input(port) Constructor
Input:ignoretypes(sysex, time, sense) Set MIDI message types to ignore
Input:poll() Poll messages (retrieve from the driver queue)
Input:queuesize(bytes) Set MIDI internal queue buffer size

Functions

Input(port)

Constructor

Parameters:

port optional port number or port name

See Also:

Return:

  • Input
Input:ignoretypes(sysex, time, sense)

Set MIDI message types to ignore

Parameters:

sysex boolean ignore MIDI SysEx messages
time boolean ignore MIDI timing messages
sense boolean ignore MIDI sense messages
Input:poll()

Returns an iterator; each iteration returns a message as a table (m), with message arguments in the array portion, and message event type in the m.event field. The main message event types are:

  • noteon (channel, note, velocity)
  • noteoff (channel, note, velocity)
  • aftertouch (channel, note, velocity)
  • cc (channel, controller, value)
  • program (channel, program)
  • pressure (channel, pressure)
  • wheel (channel, bendvalue)


Other message events include: reset, sysex_begin, sysex_end, mtc, song_position, song_select, tune_request, clock, tick, start, continue, stop, active_sense Example:

  for m in input:poll() do
     print(m.event, unpack(m))
  end
 

Return:

  • iterator
Input:queuesize(bytes)

Set MIDI internal queue buffer size

Parameters:

bytes integer size