nlaha / godot-midi

MIDI file parsing and event playback in Godot 4.1+
MIT License
52 stars 5 forks source link

Hijacking the animation system isn't ideal #4

Closed nlaha closed 8 months ago

nlaha commented 9 months ago

Using the animation system for playback isn't great, it'd be better to either:

  1. Override the animation player UI and classes to better support Midi (possibly adding a Midi editor as well??)
  2. Use threads to play back the midi in the background, invisible to the user/developer. We'd still trigger signals like the current implementation.
nlaha commented 8 months ago

https://github.com/nlaha/godot-midi-4.0/tree/no-animation-refactor

Work on this topic will take place in the above branch. I tried building a custom resource loader/saver for MIDI files, but I couldn't get it to work. Regardless, I think it would work best if instead, I created a simple custom import plugin as it is currently implemented on the main branch. This time though, instead of storing MIDI data in an animation resource, we simply store it in a custom MidiResource.

nlaha commented 8 months ago

The last few commits over on no-animation-refactor add a new MidiResource type and the initial UI for a MIDI resource viewer. image

In the future I might add editing functionality to this

nlaha commented 8 months ago

Closed in https://github.com/nlaha/godot-midi/pull/9