A MIDI file importer for Godot 4.x
Note: this is a re-write of my Godot 3.5 extension GodotMidi
Now supporting polyphony!
This plugin aims to make rythm game development and music syncing easier than ever before. Simply import a midi file like you would any other godot asset and it will get converted to an animation, this animation can then be paired with a "MidiManager" node that sends out signals every time a midi event is fired. This project is a work in progress and is lacking some features, so feel free to contribute any code or ideas over on the pull requests page.
2023-01-13.09-40-03.mp4
GodotMidi makes it easy to sync midi files to their corresponding rendered audio, just add an audio stream to the auto-generated audio stream player (a child of MidiManager) and it will play when the midi file starts.
-
Download the latest release over at https://github.com/nlaha/godot-midi-4.0/releases
-
Extract it to your
res://
folder such that both addons and bin are in the root of your project -
Enable the plugin in the godot project settings menu
-
Import a midi file by adding it to your project folder
-
Add a "MidiManager" node to your scene, it will automatically add an AnimationPlayer as well
- Select the animation player and click the animation button to load an animation resource into the player
- Browse to your midi file location, if the import worked correctly, it should be selectable as an animation resource just like a normal animation would.
- Have fun! The animation player should work just as a normal animation player would, each green dot corresponds to a MIDI event and a function call to
note_event_input(...)
in the MidiManager node.
Open the demo project for an included music visualizer script!