# Haiku MIDI Player

This is a simple application to play MIDI songs.

Differences with the BeOS R5 MidiPlayer:

- User interface looks slightly different (better?)
- Play and Stop are now one and the same button.
- There is no Open File... button. You open MIDI songs by dragging them into the window.
- There is no Live Input feature.
- You cannot set the Quality of the sound (always 44100 Hz).

If people really really want these missing features, then feel free to add them :-)

Note: The code can be a little tricky at times, since it uses fire-and-forget threads to load new songs and to stop playback. The reason for this is the scope: we want to keep repainting the scope view even when fading out a song (because this looks cool), but fading blocks the calling thread. If we were to block the window's looper, then the scope wouldn't repaint during the fade-out. So we fade using a separate thread instead. Unfortunately, this makes the code much less clean as it introduces several race conditions. Yech. See the source for more details.