Midi routing (through) seems counterintuitive

gabriels

2009-08-19 21:44:18

I think I understand how to utilize midi through in MT now but I'm not sure what's happening under the hood. Would you please confirm that I've got it right?
I have several presets that have the same incoming midi messages. I would have thought that if I uncheck Swallow Midi in the first translator that has that incoming midi message, the midi message would be sent out the through port even if the following translators had their swallow midi checked. This seems not to be true. In fact if any one of the following translators has its swallow checked it seems to block the message from being sent out the through port.
So does a midi message get processed and sent out midi and through ports as soon as a translator has evaluated it (and acted accordingly), or does it have to undergo processing by all presets and/or translators before it is output?
Gabriel

joesapo

2009-08-25 22:41:17

gabriels wrote:I think I understand how to utilize midi through in MT now but I'm not sure what's happening under the hood. Would you please confirm that I've got it right?
I have several presets that have the same incoming midi messages. I would have thought that if I uncheck Swallow Midi in the first translator that has that incoming midi message, the midi message would be sent out the through port even if the following translators had their swallow midi checked. This seems not to be true. In fact if any one of the following translators has its swallow checked it seems to block the message from being sent out the through port.
So does a midi message get processed and sent out midi and through ports as soon as a translator has evaluated it (and acted accordingly), or does it have to undergo processing by all presets and/or translators before it is output?
Gabriel
Translators, as I understand, are processed in top-down order first by preset then by the actual translator ordering in each preset.

I would think that if you try the reverse, unchecking the *last* translator's swallow midi option, that it would transmit to the thru ports normally.

I'm forwarding this post on to Florian. I'm sure he'll be able to give you a more definitive answer on this.

joe

florian

2009-08-26 13:18:06

Hi Gabriels,

interesting question... The logic is as Joe points out. Some clarifications:

The data flow is like that:
An incoming MIDI message will initialize an associated flag "route to thru ports" with TRUE, so by default, any incoming MIDI message will be routed to any configured THRU ports.

Then this message is sent into the MT engine. For every translator with matching incoming action, the "thru" flag is set according to the "swallow" switch of the translator: if "swallow" is checked, the THRU flag is set to FALSE, otherwise the THRU flag is set to TRUE. So if you have multiple translators with the same incoming MIDI action (i.e. an incoming MIDI action that matches the current message), the "THRU" flag is overwritten. The last of such messages determines the "final" state of the THRU flag. You can set the "stop processing" flag to no process following translators with the same incoming message.

After the MIDI message has gone through the MT engine, the THRU flag is checked, and if TRUE, the MIDI message is routed to the thru ports of the MIDI router.

Hope this helps!
Florian

gabriels

2009-08-27 00:36:00

Joe and Florian
This certainly does answer my question. It's a big help to know something of the inner workings of MT.