Contributed by Erik Flister (9-Nov-08, MediaAPI mailing list):

Following instructions for OSX at:
http://cratel.wichita.edu/cratel/cratel_pyportmidi

i'm on 10.4.11/intel and python 2.6 (http://www.python.org/ftp/python/2.6/python-2.6-macosx.dmg)

i downloaded:
portmidi:     http://downloads.sourceforge.net/portmedia/portmidi-src-82.zip?modtime=1213390666&big_mirror=0
vmk:          http://www.fredrikolofsson.com/software/vmk16osx.sit
pyPortMidi: http://alumni.media.mit.edu/~harrison/images/pyPortMidi-0.0.3.zip
pyrex:        http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/Pyrex-0.9.8.5.tar.gz
simplesynth: http://notahat.com/downloads/SimpleSynth-1.0.zip


1) according to portmidi readme, in portmidi directory, i did:
make -f pm_mac/Makefile.osx
output seemed OK
note pyPortMidi's readme says to use "xcodebuild -project pm_mac.pbproj" from inside pm_mac directory -- i didn't do this

2) according to pyrex INSTALL.txt, in pyrex directory, i did:
python setup.py install
output seemed OK
i did not edit Pyrex/Mac/DarwinSystem.py.  the os.environ line was at a much higher line number than 21 in this version.  it read:
os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.3" 

3) copy the following
portmidi/porttime/porttime.h -> pyPortMidi
portmidi/pm_common/portmidi.h -> pyPortMidi
portmidi/pm_mac/libportmidi.a -> pyPortMidi/OSX
portmidi/porttime/libporttime.a -> pyPotMidi/OSX

4) changed line in pypm.pyx to:
while(Pm_Poll(self.midi) != pmNoError): 

5) changed line in pyPortMidi's setup.py to:
libraries = ["portmidi", "porttime"],

6) deleted pyPortMidi's build directory (from previous failed build before i did steps 4-6)

7) in pyPortMidi directory:
sudo python setup.py install
output seemed OK

8) start simplesynth, make sure 'simple synth virtual input' is midi source

9) in pyPortMidi directory: 
python test.py
output works

10) start vmk, make sure 'from vmk 1' is midi port

11)  in pyPortMidi directory: 
python test.py
input works
note: i didn't understand how to use vmk to test portmidi independent of pyPortMidi, as suggested on john's wiki


