chrisoshea/ofxMidi — pull request #9 by danomatika (2012-02-12 19:06:19+00:00)
Title: updates to make ofxMidi fully-featured

Updates as listed on the [OF forum](http://forum.openframeworks.cc/index.php/topic,2435.msg41540.html#msg41540):

Here's a list of changes and the reasoning behind them:

* moved rtmidi source location to src/rtmidi: The Linux makefiles only build sources in the project src directory, linked libs are added from the libs dir. The layout has worked well for me in ofxPd. See a relevant discussion [here](https://github.com/openframeworks/openFrameworks/issues/896).

* updated rtmidi to 1.0.15, included the rtmidi readme (has license), and added a script to update rtmidi in scripts/: the rtmidi license has a portion that explicitly states the license must be included with the sources

* added exception handling for RtError

* replaced log stream operators with ofLog calls, so it should work with 0062
* opening ports now returns a bool
* ofxMidiOut now sends all message types and also provides a stream interface: the stream interface is similar to the one I use in ofxPd and makes byte sending more compact in code
* made ofxMidiIn protected variables private: As far as I could tell, the class couldn't be inherited and the * ofxMidiListener class is the main interface for midi events anyway.
* no longer grab port names by default: filling the port name vector by default seems redundant if there are multiple instances of ofxMidiIn/ofxMidiOut, it is now only filled when you call getPortList(); you can call listPorts() like before; also portNames is now portList and made private
* moved the ofxMidiInCallback inside ofxMidiIn as a static function
* added ignoreTypes to ofxMidiIn: ignoring sysex, timing, and active sense messages by default seems a reasonable default from RtMidi, users can simple call ignoreTypes themselves to enable receiving these messages
* ofxMidiEventArg renamed to ofxMidiMessage
* ofxMidiMessage now includes variables and raw byte vector (for full sysex messages, etc): bit masking midi messages seemed like an easy enough task to add inside ofxMidiIn and saves us alot of boiler plate
* ofxMidiConstants defines are now enums: this makes for unambiguous status types inside ofxMidiMessage
* all sources are (I believe) now fully commented
* updated the examples
* updated the readme