If I remember, for a project I did a while ago (not on 3ds, I kinda made a program), It involved doing something similar to your track thing except it was written in java and It would take a midi file and output the contents of stuff like notes as a .txt, instead of having to custom program it all in. I would probably have to rewrite parts of it to the format needed here in the .txt file, while fixing other issues, too. (multiple notes at once). however, those were written for 5 notes not 4 (except for a few), so I would have to do more work on it. I would just have to find time to do that, too.