PDA

View Full Version : Change MIDI channel


Stu Kennedy
01-11-2010, 04:11 AM
I've searched and searched and I've looked through the IPlug code to try and understand this one, but I just can't figure out how to change MIDI channel!

At the moment my plug-in takes an audio input and creates a MIDI output after doing some processing, but just on MIDI channel 1. (by default)

I want to set a dial in the GUI and change the output MIDI channel dependent on the dial value.

I was hoping there was a value that you set in IMidiMsg before you SendMidiMsg(), but there isn't!
Anyone have any idea?

Jeffos
01-11-2010, 05:43 AM
Not sure I follow but.. I case I correctly understood...

_pMsg->mStatus = (_pMsg->mStatus & 0xF0) | new_channel;

Stu Kennedy
01-11-2010, 06:13 AM
Fantastic!!! Thanks so very much!

just for any others who may read this thread

new_channel = 0x00 -> MIDI channel 1
new_channel = 0x01 -> MIDI channel 2
etc.

Stu Kennedy
01-11-2010, 07:23 AM
BTW: do you know if there's a way to send to ALL channels simultaneously, without having to send 16 separate messages?

Stu

Jeffos
01-12-2010, 04:01 AM
this would be a revolution :) no, you can't but if that midi is received by something you also code (?) you can have your own interpretation of the midi msg..