alexglvr Posted September 3, 2010 Report Share Posted September 3, 2010 Hello, I am working on a midi project based on the PIC CORE module, and I was wondering something on the MIDI protocol: While reading a midi message, is it possible to know the midi channel of the Sender of the message? Thank you for your help, AG Quote Link to comment Share on other sites More sharing options...
nILS Posted September 3, 2010 Report Share Posted September 3, 2010 Yes. The MIDI Channel is the lower nibble of evnt0. Hence you can do the following to get the channel: ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when a complete MIDI event has been received ///////////////////////////////////////////////////////////////////////////// void MPROC_NotifyReceivedEvnt(unsigned char evnt0, unsigned char evnt1, unsigned char evnt2) __wparam { unsigned char channel = evnt0 & 0x0f; // do something }[/code] Quote Link to comment Share on other sites More sharing options...
alexglvr Posted September 8, 2010 Author Report Share Posted September 8, 2010 Thank you for your Help! I read several documentation on Midi but things are still a bit confused... Each midi component is attributed a midi channel ! But, this channel is only usefull for midi in, isn't it? But for example, for a midi keyboard with a midi-in and a midi-out, how does it work? If it is attributed channel 1, it sends midi orders on channel 1 and receive order on channel 1? In fact I am completely lost... lol Alex Quote Link to comment Share on other sites More sharing options...
nILS Posted September 8, 2010 Report Share Posted September 8, 2010 If it is attributed channel 1, it sends midi orders on channel 1 and receive order on channel 1? Yes. But, this channel is only usefull for midi in, isn't it? No. For any receiver it's important to know where the message is coming from. For any sender it's important to show where the message is coming from. Quote Link to comment Share on other sites More sharing options...
alexglvr Posted September 8, 2010 Author Report Share Posted September 8, 2010 Ok ! So if I want to build a midibox that receives orders from two different pedalboard, I see two possibilities: 1- The two pedalboards plugged on a midi merger, and the output of the midi merger to the MIDIBOX 2- Make a two port midibox. In this case, it could even use a single channel isn't it? Quote Link to comment Share on other sites More sharing options...
nILS Posted September 8, 2010 Report Share Posted September 8, 2010 1- The two pedalboards plugged on a midi merger, and the output of the midi merger to the MIDIBOX That would work. 2- Make a two port midibox. In this case, it could even use a single channel isn't it? That would works as well. Quote Link to comment Share on other sites More sharing options...
xarolium Posted September 9, 2010 Report Share Posted September 9, 2010 You could build a your pedalboard with a Midi THRU too and you chain your pedal to the Midibox IN. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.