Midi2lua -

Enter —a lightweight utility that acts as a translator between the universal language of MIDI and the elegant simplicity of Lua tables. What is midi2lua ? At its core, midi2lua is a parser/converter. It takes a standard .mid file (or raw MIDI bytes) and converts the event stream into a native Lua data structure.

I use midi2lua to control DMX lights. I draw the "chase" pattern in a MIDI clip (C4 = Red, D4 = Blue), convert it to Lua, and let the script run the light show. No expensive lighting software required. A Simple Example (Love2D) Assume you have a file called song.lua that was generated by midi2lua . midi2lua

If you’ve ever built a rhythm game, programmed a generative visualizer, or tried to sync a light show to a backing track, you know the pain of manually transcribing note data. You have a beautiful melody in your DAW (Digital Audio Workstation), but your Lua script just sees a list of numbers. Enter —a lightweight utility that acts as a

# Convert your MIDI file midi2lua my_song.mid --output my_song.lua If you are working in a restricted environment (like a Roblox plugin), you can use a pure Lua MIDI parser. Simply load the binary MIDI file as a string and decode the variable-length values. It takes a standard

Turning MIDI notes into executable code for games, visuals, and custom DAW tools.

-- main.lua local midi_data = require("song") -- A simple scheduler local current_tick = 0 local bpm = 120 local ticks_per_beat = midi_data.ticks_per_beat

Enter —a lightweight utility that acts as a translator between the universal language of MIDI and the elegant simplicity of Lua tables. What is midi2lua ? At its core, midi2lua is a parser/converter. It takes a standard .mid file (or raw MIDI bytes) and converts the event stream into a native Lua data structure.

I use midi2lua to control DMX lights. I draw the "chase" pattern in a MIDI clip (C4 = Red, D4 = Blue), convert it to Lua, and let the script run the light show. No expensive lighting software required. A Simple Example (Love2D) Assume you have a file called song.lua that was generated by midi2lua .

If you’ve ever built a rhythm game, programmed a generative visualizer, or tried to sync a light show to a backing track, you know the pain of manually transcribing note data. You have a beautiful melody in your DAW (Digital Audio Workstation), but your Lua script just sees a list of numbers.

# Convert your MIDI file midi2lua my_song.mid --output my_song.lua If you are working in a restricted environment (like a Roblox plugin), you can use a pure Lua MIDI parser. Simply load the binary MIDI file as a string and decode the variable-length values.

Turning MIDI notes into executable code for games, visuals, and custom DAW tools.

-- main.lua local midi_data = require("song") -- A simple scheduler local current_tick = 0 local bpm = 120 local ticks_per_beat = midi_data.ticks_per_beat