Loading... Please wait...

Sign up for our newsletter

Please note we're currently out of production. If we get enough interest, we may do a crowd sale supported run in the future. Let us know if you're interested!

You can also follow us on twitter.

Our Newsletter

Python Control of VMeter USB MIDI Device via PyPortMIDI and MidiPort


This tutorial will show how to setup pyMidiPort on OS X to control the VMeter USB MIDI device with python scripts. Using the new sysex commands in the latest VMeter firmware (1.8, only on hardware rev B+), you can control every single LED directly (not just columns as with MIDI Controller messages).


 Check out the video demo here: Binary Clock, Chase, Treadmill, Game of Life via Individual LED control of VMeter.


Warning: installing pyPortMidi may require a bit of installation judo and trial & error. It may take 5 min., but it took us 2 days! If you know other software for MIDI and python let us know! PyGame was a deadend for us. 


Instructions are based on OS X 10.8.2 Mountain Lion. Most of these instructions were gleaned from http://cratel.wichita.edu/cratel/cratel%20pyportmidi#build_on_OS_X.


You may also need to install XCode command line tools.


  1. Install homebrew and run "brew doctor" to make sure everything is ok.
  2. Install portmidi (installing portmidi from source failed for us).
    1. Use homebrew to install portmidi: brew install portmidi
    2. We got the error "Warning: Could not link portmidi. Unlinking...", and had to then run "brew link --overwrite portmidi"
  3. Download PyRex ver Other versions may work, but they're untested.
  4. Change line 21 of Pyrex/Mac/DarwinSystem.py to: os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.6"
  5. Build and install Pyrex: sudo python setup.py install
  6. Download PyPortMidi (ver 0.0.3)
  7. replace portmidi.h, porttime.h with the files from the installed portmidi. In my case, these were located in /usr/local/Cellar/portmidi/200/include/
  8. Copy libportmidi.dylib from the installed portmidi to the OSX directory in pyPortMidi-0.0.3. In my case, this was located in /usr/local/Cellar/portmidi/200/lib/
  9. Change line 357 of pypm.pyx to 
       while(Pm_Poll(self.midi) != pmNoError):
  10. Run the pyPortMidi build: sudo python setup.py install
  11. Plug in a USB Midi device and run the test: python test.py
Good luck!