Jump to content

Where to send uncritical messages?


Thomas

Recommended Posts

Hallo!

I need some input for the software design for a MidiBox-Chain.

The first MB is for Motorfader(and menu-buttons) the second are for any other pots and display.

When a fader is moved the first MB should send a message "fader X/1 moved" or something like that.

Or other not time critical messages, debug messages.  Don't know what will t be in the future.

No problem until now, this works.

BUT: those message are relatively long sysex-Strings. So they should not be sended at every call of

AIN_NotifyChange. My idea was to buffer such messages and send them if there is "less traffic on the line"...

Whats the best place to send those messages?

Display_Tick()?

Timer()?

Tick()?

Or somewhere else?

Link to comment
Share on other sites

(...) and send them if there is "less traffic on the line"...

Whats the best place to send those messages?

Display_Tick()?

Timer()?

Tick()?

That clearly depends:

Tick() is called every tick (as the name sais), so this will be quite often, so to speak a lot more often than AIN_Receive

Display_Tick() depends on how often it's called. If you call it every time AIN changes, it will be the same as in AIN. So except having unordered code no gain.

Timer() would be suitable if set up right, but:

the question really remains: Why not sending CCs?

=> http://www.ucapps.de/midibox_link.html

"(...) not only common MIDI events, but also other informations can be transmitted without reaching the host software at the end of the chain"

Regards,

Michael

Link to comment
Share on other sites

Hallo!

I think you mean MIDI-Controller Messages.

As internal (masked stream with f9,fe) stream this would be ok. But CC have only 3bytes. With some kind fo encoding this could would work. 

But I think I will use the timer function to trigger the "remote printing".

Link to comment
Share on other sites

May I ask what you are trying to archive?

Why do you want to encode MIDI Messages? When you split faders and pots over multiple Midiboxes, I think you don't have different cases but two Core Modules in the same housing. So you need a Core-to-Core-Link as described in the link I posted above. You can send every message you like from Core1 to Core2.

MIOS is taking care for marking the messages, so they do not leave the last Core!

Or am i missing something  ???

Link to comment
Share on other sites

Timer() would be a bad choice, because it interrupts the main task, and could therefore also interrupt a MIDI stream; this could result into sporadically sent invalid MIDI events.

So, if timed transactions are required, the Timer should request a send, and Tick() should check for this request flag, clear it and send the events (similar to the approach used for DISPLAY_Tick())

Best Regards, Thorsten.

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...
×
×
  • Create New...