Turning MIDI notes into executable code for games, visuals, and custom DAW tools.
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. midi2lua
Want a boss in your RPG to cast spells on specific beats of the background music? Convert the MIDI percussion track to Lua. When the Lua clock hits tick 1920 , spawn the fireball. It is deterministic and perfectly synced. Turning MIDI notes into executable code for games,
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. Want a boss in your RPG to cast
Instead of hardcoding noteOn(60, 100) a thousand times, you feed your MIDI file into midi2lua , and it outputs a table like this:
# 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.