No Synthesia does it already, if Synthesia does not block output of lyrics and other text events in midi files? A preprocessor can add such text events per bar, then a background listener would do something at each such event. Simple and efficient. Strange, why it took me so long to find this option we had all the time. So Synthesia has already real-time pdf score switching support when looked this way. Great.... by outputting some position information in real-time, in steps of bars.
Nicholas if Synthesia currently is blocking such text events from its output, could you unblock it or give a new option for this? Then we could have YouTube demonstrations, left screen half with Synthesia, right screen half with SumatraPdf with a loaded score of the same midi file on the left, both move in sync, page by page on the right side. An automatic page turner, as is done in piano concerts by real humans.
For automatic segmentation, Synthesia can use pitchclass chroma features, too, putting a marker where this curve has its biggest changes. Giving at each step for each of the 12 pitchclasses a value between 0 and 1, writing it into a 12 dimensional vector, calculating the vector differences from step to step. Biggest changes happen where values of zero get non-zero or the opposite. Counting the zero-toggling actions between steps. Midi Optimizer above uses chroma features, too, as you can see.