Syncing midi to timeline and triggering Unity callbacks from midi notes

I’m using FMOD in Unity to sync some effects to music. I currently have beat callback and marker callbacks set up and working well. However, this means that my effects either need to land on the beat, or I need to have a marker for each and every time I want a callback to Unity, which is tedious to do by hand. I know that I can get spectrum or loudness data sent back to Unity, and could even have my music spread across different tracks so that I could get spectrum/loudness data for each individual track. However, I think that can get computationally expensive. My one thought was that I could have the original midi data that was used to make the music, and potentially have those notes to trigger something in Unity, but I don’t know if or how this would be possible, or if there is a way to make sure that the midi track stays in sync with the music track. Any guidance here would be appreciated!

I ended up using the drywetmidi unity plugin and occasionally making sure it’s in sync with the FMOD track with beat callbacks. Seems to be working well enough.

Thank you for sharing the solution here!