Jump to content

Recommended Posts

Posted

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

Posted

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]

Posted

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

Posted
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.

Posted

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?

Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...