MIDI management

How is it supposed to manage the Notify event on the Mediaplayer to play
several midi files, whose filenames are stored in a TStrings?
How do I know when the playing of a file has ended?