print("}")
The solution is to ditch the streaming audio file (for logic purposes) and import the MIDI data directly into your Lua environment. midi2lua
If you are tired of guessing note timings or hardcoding arrays of integers, give it a try. Compose in the piano roll. Code in Lua. Let midi2lua handle the handshake. print("}") The solution is to ditch the streaming
mid = mido.MidiFile('my_song.mid') print("local song = {") midi2lua
If you are using a sound synthesis library (like LÖVE’s audio API or a synthesis plugin), you can use the MIDI data to trigger synthesized sounds. This allows you to change the instrument of the song on the fly based on player input.