How can I use this Python module in Blender?
The midi library seems to be only for Python 2.x. Whereas Blender runs off Python 3.3. But if you are adventurous enough, you can probably get it working.

1. Installation:

Download the source from Github. Copy the src folder from the package into blender.app/Contents/MacOS/2.70/python/lib/python3.3/site-packages/ and rename the src directory as midi

2. Auto Convert to Python 3 syntax

Run 2to3 * -w on the midi folder, to automatically convert as much of the code as possible to Py3k. The 2to3 command should come with a system installation of Python3.

3. Manual Fixin'

At this point, you should be able to at least get Blender to recognize the library. Fix errors as you encounter them.

Good luck!