PDA

View Full Version : Proposal: add midi channel handling to the IMidiMsg structure


Soundbytes
02-28-2010, 04:16 AM
I found that IMidiMsg did not support midi channel handling.
I have added this to the version that I am using and would propose that it be included in future IPlug revisions. What do you think?

The modified files IPlugStructs.h and IPlugStructs.cpp are attached.

Proposed Changes:

added a Channel() member function.
added a channel parameter to the midi message generating functions.
channel was added last in the parameter list and defaults to 0.
This does not look so nice because the channel information is actually located at the top of the midi message. At least no existing code is broken this way.

MakeNoteOnMsg()
MakeNoteOffMsg()
MakePitchWheelMsg()
MakeControlChangeMsg()

added midi channel display to LogMsg()
fixed a bug with LogMsg() that prevented the midi data bytes from being displayed properly if the midi message was not a note on or note off msg.


Andreas

RRokkenAudio
02-28-2010, 12:21 PM
Thank you, I'm not currently working with this type of thing, but will keep these! Very much appreciated.

~Rob.

Tale
03-01-2010, 04:32 AM
Personally I don't really use IMidiMsg's member functions, but I guess it makes sense to be able to access channel the same way as the other MIDI data.