Re: MIDI conjunction device



Is it better to wait and read in 3 bytes for a full midi command and
then process on a command basis, or is is better to process each byte
of the midi command ?

Of course the later would require more work. Consider the question in a
microcontroller context.

"ahmed.shar...@xxxxxxxxx" wrote:
thank you,

Assuming that you're thanking me, you're welcome. It really helps to
quote the articles to which you're responding so as to provide context.

another note, can you further explain the process of how you managed to
not lose synch with the midi device (output)

There is no sync to lose. When a MIDI controller emits a message it
does
so at the time it wishes any device that might be listening to receive
that message without being synchronized to anything. A merger will, by
its nature, introduce a delay of the message duration plus the time it
takes to process the message. The duration of a NOTE ON message is a
bit
less than one millisecond and the processing time is typically less
than
that. So the merger introduces less than 2 mSec of delay to that note
which is musically negligible. What is more, it introduces this delay
to all messages that flow through it, so the relative timing of those
messages remains roughly constant.

and explain how you manage
to play the proper midi command,

I'm not certain that I understand this question, but I think the answer
is, "By transmitting the messages (commands) that are received.

for example if i receive a program change from 2 devices on the same
channel, which one is outputted?

Both of the received program change messages are transmitted. This is
the point of a merger, to combine multiple streams as if they were one.
There is an issue with MIDI CLOCK messages such that one typically
wants
to filter them from all but one input and sysex messages require
special
handling but, other than those, one simply retransmits the received
messages.

is that considered a running message

Assuming that you mean "running status message", the answer is, "No."
although either of those program change messages may have been received
with running status if they had been immediately preceeded with another
program change message on the same channel.

and hence i would choose one of
thosem essages based on an aglorithm of my choice?

You would not choose but would, instead, transmit both.

--

.