From: John McCabe <john@nospam.assen.demon.co.uk.nospam>
Subject: Re: Thinking of using Ada for a job at home. Couple of questions first.
Date: Wed, 03 Mar 2010 21:10:00 +0000
Date: 2010-03-03T21:10:00+00:00 [thread overview]
Message-ID: <1ojto51loc8muvvshmbob10ioaf6vn6jan@4ax.com> (raw)
In-Reply-To: gajto5lamae80b7g7locjqtrc5c87gipep@4ax.com
John McCabe <john@nospam.assen.demon.co.uk.nospam> wrote:
>>I think I agree with Dmitry, "reading the octet stream or else what is
>>natural for the device or the protocol at hand, and then constructing
>>the necessary Ada objects on the fly".
>Thanks for that. I'll bear it in mind but, as I sort of mentioned, for
>this synth and for the purposes I want it it looks like the data is a
>fixed length, and they're all terminated with EOX anyway.
>That is unless (as I hope is NOT the case) any other MIDI data is
>interspersed with the SysEx messages. I would hope not but you never
>know. Guess it depends on a number of things.
Just checked the MIDI implementation doc; the SysEx messages are all
fixed length starting with a Status octet (16#F0# - nearly gave away
what I've been using recently by writing 0xF0 there :-) and ending in
EOX (16#F7#). Those are the only two octets in the stream that will
have their most significant bit set so I'd need to check anything that
comes in with a set MSB and dump it unless it's a status or EOX octet.
Everything else in the meantime can be shoved in the buffer until the
number of bytes I expect are received.
In saying that, it suggests that, as I'm only ever interested in SysEx
messages I've explicitly requested, then I should be in a position to
just create an object of the expected message type and fill it in on
the fly anyway.
Thanks for that.
next prev parent reply other threads:[~2010-03-03 21:10 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-03 16:19 Thinking of using Ada for a job at home. Couple of questions first John McCabe
2010-03-03 18:22 ` Jeffrey R. Carter
2010-03-03 20:09 ` John McCabe
2010-03-03 21:00 ` Simon Wright
2010-03-03 18:58 ` Hibou57 (Yannick Duchêne)
2010-03-03 20:17 ` John McCabe
2010-03-04 6:22 ` Hibou57 (Yannick Duchêne)
2010-03-04 11:39 ` John McCabe
2010-03-09 14:49 ` Warren Gay
2010-03-09 15:33 ` Jacob Sparre Andersen
2010-03-09 20:22 ` jonathan
2010-03-09 21:57 ` Charmed Snark
2010-03-09 22:54 ` jonathan
2010-03-10 17:46 ` Charmed Snark
2010-03-10 19:12 ` jonathan
2010-03-10 20:41 ` Simon Wright
2010-03-10 21:00 ` Pascal Obry
2010-03-09 20:32 ` Simon Wright
2010-03-10 6:42 ` J-P. Rosen
2010-03-03 19:17 ` Dmitry A. Kazakov
2010-03-03 20:38 ` John McCabe
2010-03-03 20:56 ` Simon Wright
2010-03-03 21:00 ` John McCabe
2010-03-03 21:10 ` John McCabe [this message]
2010-03-04 6:39 ` Hibou57 (Yannick Duchêne)
2010-03-03 21:35 ` tmoran
2010-03-04 6:43 ` Hibou57 (Yannick Duchêne)
2010-03-03 22:20 ` Dmitry A. Kazakov
2010-03-03 19:52 ` Gautier write-only
2010-03-03 20:57 ` John McCabe
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox