Sequenced Music (MML / MOD / MIDI) in Godot 4?
-
I like keeping file size down when I can and so I want to reduce the size music takes up. Instead of heavy compression, I thought to use sequenced music instead. Common sequenced music formats are MIDI, MOD, and MML.
I've read that "Godot can read MIDI", but after trying it out, it seems Godot doesn't even recognize .MID files.
Installing the addon and trying to enable it results in this error:
Unable to load addon script from path: 'res://addons/midi/GMP.gd'. This might be due to a code error in that script. Disabling the addon at 'res://addons/midi/plugin.cfg' to prevent further errors.
The readme that comes with Godot MIDI Player (Godot 4) does not include instructions or any relevant documentation at all on how to use the feature they created. (Possibly due to a language barrier?) However, after some digging I found this site that has very barebones instructions. However, this appears to be instructions for the Godot 3 version, so it may not work on 4 and furthermore I can't test those instructions on the 4 version because of the addon script error. I tried fixing GMP.scr so that the red error highlight disappears, but that doesn't fix the addon script error at all.
The same creator also made a Mod Player, but it has the exact same issue as the MIDI Player.
Could someone try to get this working? It could be really useful to create rhythm games, reduce music file size, or have dynamic music!
-
Just checking, is this the midi player you're using for godot 4?
https://godotengine.org/asset-library/asset/1667 -
@AnonyBunny Yep, that's it! I did end up getting both the MIDI and MOD Players to work by using the demo file from here, but the main download from the asset store does not work.
-
I see, well I'm glad you managed to solve your problem!
-
@AnonyBunny New problem! It seems to work perfectly in Run Project, but not at all when exporting the game to Windows.
I submitted some bug reports to the original creator, but I don't know if they're going to see/respond to them.
-
@MaplewoodStreet Darn, not sure how to fix that, sorry.