<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-1252">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff><SPAN
class=650234216-16072004>Dave,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN
class=650234216-16072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN class=650234216-16072004>For ref on
MIDI messages:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN
class=650234216-16072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN class=650234216-16072004><A
href="http://www.midi.org/about-midi/table1.shtml">http://www.midi.org/about-midi/table1.shtml</A></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN
class=650234216-16072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN class=650234216-16072004>referring to
this table you can see that all "real-time" messages are one
byte.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN
class=650234216-16072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN class=650234216-16072004>Instead of
"replacing" data within any one message they can "interleave" within a
message. The MIDI Timing Clock (0xF8) being the typical byte that
can interleave a message. Your interface must handle this
interleaving so any of the following can occur:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN
class=650234216-16072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN class=650234216-16072004>Say a Note
16d is reported on; for Channel 1; with a Velocity of
64d; You could see: (in hex)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN
class=650234216-16072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN class=650234216-16072004>90 10 40 (no
interleave)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN class=650234216-16072004>90 F8 10 40
(clock between Status and Data)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN class=650234216-16072004>90 10 F8 40
(clock between note spec and velocity)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN
class=650234216-16072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN class=650234216-16072004>If you don't
use the clock, have the "Get Next Byte" portion of your parser "drop it on the
floor" and not return it to message framing. </SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN
class=650234216-16072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN
class=650234216-16072004>regards,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN
class=650234216-16072004>p</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN
class=650234216-16072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN
class=650234216-16072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN
class=650234216-16072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff></FONT> </DIV>
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
owner-synth-diy@dropmix.xs4all.nl [mailto:owner-synth-diy@dropmix.xs4all.nl]
<B>On Behalf Of </B>David Brown<BR><B>Sent:</B> Friday, July 16, 2004 9:14
AM<BR><B>To:</B> synth-diy@dropmix.xs4all.nl<BR><B>Subject:</B> Re: [sdiy]
Processing Midi - Dropping Notes<BR><BR></FONT></DIV><FONT size=3>At 09:34 PM
7/13/2004, you wrote:<BR></FONT>
<BLOCKQUOTE class=cite cite="" type="cite"><FONT face=arial size=2>For even
more fun there is also "real time messages" that can come in-between the bytes
of other messages.<BR></FONT><FONT size=3> <BR></FONT><FONT face=arial
size=2>The real time messages are one byte only.<BR>So just check if a message
is real time, then do something with it, like nothing at
all.</FONT></BLOCKQUOTE><BR>Can you clarify the real time messages? I'm
writing my own MIDI parser and I don't know if I have handled it
correctly. Specifically, can a real time message replace the expected data
in a message? For example ...<BR><BR>Note on command<BR>Note value<BR>Real
time message<BR>Note velocity<BR><BR>In this case, is the real time message
always guaranteed to be one byte?<BR><BR>Thanks. - Dave </BODY></HTML>