Menu

Installing_portmidi_on_Windows

Roger B. Dannenberg haochuan

Installing portmidi on Windows

Installing appropriate software

In order to install portmidi on Windows, you will need Microsoft Visual C++ and either Subversion or TortoiseSVN.

SVN options:

If you prefer using the command line, we recommend Subversion download.
If you prefer using the Windows interface, we recommend TortoiseSVN download.
For more information on using SVN, see Using SVN.

Note: you can skip the SVN installation and just download the portmidi-src-nnn.zip file from SourceForge.

After SVN installation, follow the appropriate set of instructions below.

Downloading portmidi

Directions for Subversion:

Click Start > Run..., type cmd, and click OK. Navigate to the directory in which you would like to place the portmidi files and type the following commands:

md portmedia && cd portmedia
svn co https://svn.code.sf.net/p/portmedia/code/portmidi/trunk portmidi

This creates a folder called portmedia and a subfolder called portmidi, then fills the folder with the appropriate files.

You now have the files necessary to build portmidi.

Directions for TortoiseSVN:

Navigate to the directory in which you would like to place the portmidi files. Create a folder called portmedia, and inside that folder create a subfolder called portmidi.

Right-click anywhere inside the portmedia folder and select TortoiseSVN > Repo-browser.
In the URL box that appears, type:

https://svn.code.sf.net/p/portmedia/code/portmidi/trunk

The Repository Browser window appears. Right-click the folder called trunk and select Checkout....
In the Checkout window that appears, set the checkout directory to the portmidi folder you made above and click OK.

Once the files finish transferring, click OK, then click OK again to close the Repository Browser window.

You now have the files necessary to build portmidi.

Java

Portmidi now includes an application written in Java to set default MIDI ports. The Java development kit (JDK) is needed to completely build Portmidi. Install the latest JDK here. If you do not want to build the PmDefaults program, which is used to set default MIDI in and out devices for simple PortMidi applications, you can skip Java.

Building portmidi

After you get sources from SourceForge, follow the directions in pm_win/README_WIN.txt.

You should also have pmdefaults.exe, a graphical interface program for setting portmidi default input and output devices. You need to build the release version of portmidi first. Then you can build !PmDefaults from the command line:

cd portmidi\pm_java
make.bat

The result will be in portmidi\pm_java\win32.

Alternatively, you can download an installer for pmdefaults from !SourceForge: pmdefaults-setup-win32-nnn.zip rather than building your own.

You have now completed the installation of portmidi!

If you wish to test portmidi, run pm_test/testDebug/test.exe or pm_test/testRelease/test.exe.

Further documentation is available in README.txt, pm_common/portmidi.h, and pm_win/README_WIN.txt.