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-Thread: a07f3367d7,c98f618755b0ddcc,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!eweka.nl!hq-usenetpeers.eweka.nl!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!not-for-mail From: John McCabe Newsgroups: comp.lang.ada Subject: Thinking of using Ada for a job at home. Couple of questions first. Date: Wed, 03 Mar 2010 16:19:31 +0000 Organization: Aioe.org NNTP Server Message-ID: NNTP-Posting-Host: RXEkuaSUwmKe0XIGFYSK7A.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 2.0/32.652 Xref: g2news1.google.com comp.lang.ada:9376 Date: 2010-03-03T16:19:31+00:00 List-Id: Guys I was hoping you'd be able to help me. Some of this I could probably find out by re-reading my books but I'm sure this is the sort of thing some of you guys are doing every day so could probably give a clearer answer. The other one, I just don't know and a search on Google was a bit useless. Basically I have a synthesizer that's not very well supported on the software front, mainly because not many of them were sold and built. I'd like to create an application that runs on MS Windows, probably using Qt that will be able to manage, dump, load patches etc using MIDI. So the first question is do any of you know of any bindings to MS Windows MIDI (presumably the multimedia system) functions that already exist and are open source or something like that? I searched on Google for "ada midi" but it looks like there's a product called that so it came up with loads of stuff. I'm aware there are some binding to Win32 from Ada but, as I've not been doing Ada in anger for a long time, I'm not sure if there's something for Ada 2005. The second question is related to the implementation of the System Exclusive messages. Basically this is part of the reason I thought Ada would be good for this task. The SysEx messages basically consist of a smallish header and a variety of different structures that are differentiated by the "Function" type in the header. Now I seem to remember from when I did use Ada that it's possible to define the record representation of a variant record such that the discriminant is held within the body of the record. This would mean (I think) that I could read a block of data from the synthesizer straight in to a buffer that overlaid the variant record and essentially automatically created a record that could be read as the particular variant related to the incoming data. However I also seem to remember that's not quite a 'recommended' way of doing that sort of thing. The other thing that guided me in Ada's direction is that the structure of the SysEx messages requires a lot of bit-fields and I'm well aware that Ada's representation clauses are fantastic for that sort of thing. So, in principle, would that be the way to do this, or would you be able to suggest a better mechanism? Finally, is there a straightforward way to do that sort of thing using tagged records? E.g. could I define a record which is the header format, then extend that in a number of different tagged extensions to create each individual message as a separate tagged record and use the OO and dispatching facilities to work with them? Any advice you've got the time to give on this would be very much appreciated. John