Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!sri-spam!ames!ll-xn!cit-vax!rgoodman From: rgoodman@cit-vax.UUCP Newsgroups: comp.sys.atari.st Subject: Re: reading midi input Message-ID: <2264@cit-vax.Caltech.Edu> Date: Tue, 7-Apr-87 15:36:44 EST Article-I.D.: cit-vax.2264 Posted: Tue Apr 7 15:36:44 1987 Date-Received: Fri, 10-Apr-87 06:11:35 EST References: <14748@cca.CCA.COM> Organization: California Institute of Technology Lines: 23 Summary: Much MIDI Misunderstanding In article <14748@cca.CCA.COM> m204help@cca.CCA.COM (Keith Hedger) writes: >Recently, I posted a note asking for help with reading the midi port inside a >c program, written with the MEGAMAX C development system. > >In the process, however, I did find out one thing.....the function that I >am using to read the midi port (Bconin(3)) BLOCKS UNTIL a midi byte appears >at the port. I have tested this function by changing the address to that of the >keyboard and it worked fine....as I said my program now works and uses this >function. >Keith Using Bconin(3) is fine, and is in fact the correct way to read data. It is not, however, the correct way to test for end of data! As you correctly point out, it will wait until data appears . . . even if it never appears. For testing that you must use Bconstat(3). If you want a program to ever end then it is not valid to simply do Bconin after Bconin. Ron Goodman -- rgoodman@cit-vax.caltech.edu _______ _________ _________ | rgoodman@cit-vax.bitnet / \#/ \#/ | Pasadena rgoodman@cit-vax.uucp |alifornia |nstitute |echnology | California \_______ ___/#\___ of | | U. S. A.