COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 01-11-2010, 04:11 AM   #1
Stu Kennedy
Human being with feelings
 
Join Date: Mar 2009
Location: Glasgow UK
Posts: 83
Default Change MIDI channel

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?
Stu Kennedy is offline   Reply With Quote
Old 01-11-2010, 05:43 AM   #2
Jeffos
Mortal
 
Jeffos's Avatar
 
Join Date: Dec 2008
Location: France
Posts: 1,969
Default

Not sure I follow but.. I case I correctly understood...
Code:
_pMsg->mStatus = (_pMsg->mStatus & 0xF0) | new_channel;
Jeffos is offline   Reply With Quote
Old 01-11-2010, 06:13 AM   #3
Stu Kennedy
Human being with feelings
 
Join Date: Mar 2009
Location: Glasgow UK
Posts: 83
Default

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 is offline   Reply With Quote
Old 01-11-2010, 07:23 AM   #4
Stu Kennedy
Human being with feelings
 
Join Date: Mar 2009
Location: Glasgow UK
Posts: 83
Default

BTW: do you know if there's a way to send to ALL channels simultaneously, without having to send 16 separate messages?

Stu
Stu Kennedy is offline   Reply With Quote
Old 01-12-2010, 04:01 AM   #5
Jeffos
Mortal
 
Jeffos's Avatar
 
Join Date: Dec 2008
Location: France
Posts: 1,969
Default

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..
Jeffos is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.