nlaha / godot-midi

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

Allow modification of current time after playback has started #19

Closed nlaha closed 3 months ago

nlaha commented 4 months ago

As it is currently implemented, modifying the current time property of the midi player while it is playing will not work as intended. It may be worth modifying the setter for this property so it updates the track_index_offsets when the time is changed.

As of right now, setting the current time to a smaller value will not update track_index_offsets and thus the player will only consider events after the set track_index_offsets which will be after the set current time. Similarly, setting times in the future will cause the player to emit all intermediate events all at once because the track_index_offsets is not updated.