A C++ class for writing midi files