Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!crdgw1!sagittarius!dixon From: dixon@sagittarius.crd.ge.com (walt dixon) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: Need routine(s) to generate sound for MSC 5.1 Keywords: sound msc Message-ID: <5799@crdgw1.crd.ge.com> Date: 6 Mar 90 01:51:42 GMT References: <365@trux.UUCP> Sender: news@crdgw1.crd.ge.com Reply-To: dixon@sagittarius.crd.ge.com (walt dixon) Organization: General Electric Corp. R&D, Schenectady, NY Lines: 43 In a previous article Christopher A. Rende writes: >I need a routine that generates sound from MSC 5.1: A beep, a tone/duration, >play a script, etc... >Please post or Email: I have not FTP or Aonon UUCP ability. >If there is interest and I receive some code I'll post a summary. The sample device driver I wrote for Chapter 11 of "The MS-DOS Papers" will do what you want. It recognizes a superset of the BASICA SOUND statement as well as correcting some errors in the BASIC implementation. Since this is a device driver, one can open it and send characters to it from any language. The following C fragment fp=fopen("SOUND","w"); fprints(fp,"%s","O3T100L8GFE-FGGGPFFF4"); plays "Mary Had a Little Lamb". The complete source code for this driver can be found at the end of the chapter. If you don't feel like typing it all in, it is also available (from me) on a supplemental disk. The $10 fee I charge for each disk just covers reproduction, materials, and mailing costs. All the code on this disk carries the following notice: (c) W. V. Dixon. All rights reserved. May be freely copied for personal, non profit use so long as this copyrite notice is retained and usage restrictions are observed. This software may not be used in whole or in part in any program which is sold without prior written consent of the author. This driver started out as a fairly simple example but grew into a fairly sophisticated piece of code. I hope this helps. Walt Dixon {arpa: dixon@crd.ge.com } {us mail: ge crd } { po box 8 } { schenectady, ny 12301 } {phone: 518-387-5798 } Walt Dixon dixon@crd.ge.com