DirectMidi is released under LGPL license (Lesser General Public License) which means you can use it freely in your projects without any cost. If you are planning to make a commercial version of the project you will not have to pay anything in return, however you are asked to leave the copyright info that appears in the sources code files. Special mentions if you decide to credit the library in some part of your project will be apreciatted.
This library is published without warranty, this means I don't take any responsability for the bad use of the library, directly or indirectly nor the damage derived from improper operation. Please, read the complete license terms before modifying or distributing the library.