Midi2lua

A standard MIDI file contains tracks, channels, notes (pitch, velocity, start time, duration), control changes (CC), pitch bends, and tempo maps. Lua, being a lightweight scripting language, uses tables as its primary data structure. midi2lua creates a structured representation of the MIDI data so that your Lua script can "play back" the sequence programmatically.

-- Generated by midi2lua return format = 1, ticks_per_beat = 480, tracks = -- Track 0: Piano events = tick = 0, type = "note_on", channel = 0, note = 60, velocity = 100 , tick = 120, type = "note_off", channel = 0, note = 60, velocity = 64 , tick = 240, type = "tempo", bpm = 120 , -- etc. midi2lua