Jump to content

Inter-Midibox Communication MIOS


ThomasT
 Share

Recommended Posts

Hi Thorsten!

After getting the first board running, I developed the main core board first. It's a horror for debugging without any dispplay or even a single LED.

This board is ready (it may be still have some errors...) but not soldered. I have to check out what I need and then contact farnell and reichelt. And even then I will solder only the displays and the PIC. (some Rs, Cs and Ts too)

It contains on one 200x150 board two core modules with 80 poties, 80 buttons, 80 leds and two displays connects to the second PIC which will be the last in the chain. It took a week to layout it.

For some reasons I will not publish it...

In this time I want to start to develope the software.

And I have some questions and lack of knowlegdes...

1. How can the Inter-MB communication realized by MIOS? On your MB-Link page there are no hints how to handle such "masked" events in the software.

Communication is neccessary for display (only the last PIC has a display) and for bank changes etc. pp.

The first MB (this one you debugged...) must send a "all MBs please change the bank to 2" to all MBs in the chain. Or "only special faders change your bank". etc.

2. When exactly will this functions be called

USER_MPROC_NotifyFoundEvent

USER_MPROC_NotifyReceivedByte

USER_MPROC_NotifyReceivedEvent

What happens if two events come directy after each other?

What happes if there are to many events to store?

Does the last one win or will it be lost?

What happens after MIDI-Timeout?

Link to comment
Share on other sites

Hi Thomas,

1) check the MIDIbox64 and MIDIbox MF applications, they already support remote access via SysEx, and therefore give you some good examples.

The control bytes for MIDIbox Link are sent by MIOS_MIDI_BeginStream and MIOS_MIDI_EndStream --- see also the functional description (http://www.ucapps.de/mios_fun.html

The easiest way for sending MIDI events: just copy the "midi_evnt.inc" driver from the MIDIbox64 application into your project.

2)

> When exactly will this functions be called

You know where to find the documentation of MIOS functions?

> USER_MPROC_NotifyFoundEvent  

After a complete MIDI event has been received and have been found in MIOS_MPROC_EVENT_TABLE

> USER_MPROC_NotifyReceivedByte  

After any byte has been received

> USER_MPROC_NotifyReceivedEvent  

After a complete MIDI event has been received

> What happens if two events come directy after each other?  

USER_MPROC_NotifyReceivedEvent  will be called twice, for every event seperately.

> What happes if there are to many events to store?  

MIOS provides a Rx buffer of 64 bytes, so an overrun could only happen if your application would stall the USER_Tick for about 60 mS - so long as your project is programmed properly, this shouldn't be an issue. The max. usage of the Rx buffer is normaly about 3 bytes

> Does the last one win or will it be lost?  

The last bytes will lost - but as I wrote: this is no issue with the fast PIC18F

> What happens after MIDI-Timeout?  

The whole buffer will be cancled

Btw.: some additional infos about latency, delays etc. can be found in the uCApps FAQ

Best Regards, Thorsten.

Link to comment
Share on other sites

Hi Thorsten!

I know the documentation. But I wanted to know if not only USER_MPROC_NotifyFoundEvent is called, but also USER_MPROC_NotifyReceivedEvent and three times USER_MPROC_NotifyReceivedByte during a midi-event.

But I saw you uploaded the source code of MIOS. This will answer such questions.

Thomas.

Link to comment
Share on other sites

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

×
×
  • Create New...