When the game start, it will read this outside file and spawn note actor based on the [time] and [what kind of note it is] and [locations] with the music.
How should I do to read an outside file like this and trigger spawn event based on time?
(Maybe generate a timeline based on outside file?)
Recommend Rama’s Victory Plugin (find it in the marketplace) for file I/O if you’re doing a Blueprints-only project.
Then you’ll need a way to parse each line in the file if you don’t already have one in that plugin.
Then you’ll need a way to ensure the timing of the music is exactly synced with the game time in seconds, This often falls out of sync because of differences in how long it takes to initialize objects on a per-instance basis. Maybe you can solve that problem by starting the Music sound cue only at the point at which the rhythm data is all finished loading and the rhythm handling Actor has finished constructing. Maybe on its Beginplay, add a short delay just to make sure, and then after THAT, start its timer AND the sound cue at the same time.