From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.71.MISMATCH!xlned.com!feeder3.xlned.com!feeder.erje.net!feeder.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Thinking of using Ada for a job at home. Couple of questions first. Date: Wed, 03 Mar 2010 20:56:33 +0000 Organization: A noiseless patient Spider Message-ID: References: <60hto51vmooku9r7j6dmviqbnglhp0pra7@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Wed, 3 Mar 2010 20:56:33 +0000 (UTC) Injection-Info: news.motzarella.org; posting-host="KCXegvZb5vh43D+f3BR6Ew"; logging-data="12247"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18YSMMsczPGqRX6MybOn3h65F59u0N2Mvw=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin) Cancel-Lock: sha1:WS6tIXq1M9b6K4sRUjnRKjT9/yI= sha1:nQOrXAsikdzHbSGrKGpaYJRfDnU= Xref: g2news1.google.com comp.lang.ada:9384 Date: 2010-03-03T20:56:33+00:00 List-Id: John McCabe writes: > BTW - in case anyone's interested, the MIDI format for the synth I'm > interested in is defined at: > > http://www.kawaius-tsd.com/OM/K_SYNTH/K1WAVE~1.PDF You're going to have fun using unchecked conversion (whether by Unchecked_Conversion or overlay), considering that the data dumps are indefinite length (EOX-terminated). Won't you just have to read 4 octets at a time until EOX? (rather like an HTTP request). 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".